MPE::CIvar - Perl extension for CI variables and JCWs on MPE/ix
use MPE::CIvar ':all';
$acct = hpcigetvar("HPACCOUNT");
hpciputvar("TEMPVAR", 1); hpciputvar("TEMPVAR", hpcigetvar("TEMPVAR")+1); $hold = hpcigetvar("TEMPVAR"); hpcideletevar("TEMPVAR"); print "tempvar value was $hold\n"; setjcw(32768); $jcw = getjcw(); $ci = findjcw("CIERROR"); putjcw("CIERROR", 0);
hpcicommand("build TOOOLONGNAME.PUB,invaliddomain", undef, undef, 2); if ($CIVAR{HPCIERR}) { print "Error message: $CIVAR{HPCIERRMSG}\n"; }
hpcicmds("purge larry", "build larry;rec=-80,,f,ascii", "file input=larry,old", "run darryl.pub") or die "Error on cmd: '$MPE::CIvar::lastcmd': $CIVAR{HPCIERRMSG}\n";
$CIVAR{HPPATH} .= ",PERL.PUB"; # append PERL.PUB to HPPATH
Access to the MPE/iX intrinsic functions:
setjcw, getjcw putjcw, findjcw hpciputvar, hpcigetvar hpcideletevar hpcicommand
See the MPE/iX documentation at http://docs.hp.com/mpeix/all/ Specifically relevant for this module are:
MPE/iX Intrinsics Reference Manual Command Interpreter Access and Variables Programmer's Guide Interprocess Communications Programmer's Guide
You may also access the CI variables through the tied hash, %CIVAR. This is analogous to %ENV but currently does not support 'each' or 'keys'.
setjcw(VALUE)
getjcw()
findjcw($name)
hpcigetvar($name)
hpcideletevar($name)
$CIVAR{$name} hpcigetvar($name)
$CIVAR{$name}=VALUE hpciputvar($name, value)
delete $CIVAR{$name} hpcideletevar($name)
HPCICOMMAND
with the command string. The other arguments
are optional. A value of 0 will be returned on success, otherwise an error
value will be returned and assigned to $cmderr if a variable is passed
as the second argument. You can set $msglevel to 1 to suppress warnings
and set it to 2 to suppress errors as well as warnings. For example,
hpcicommand($command, undef, undef, 2);
hpcicommand
for each string in @cmdlist
. It will stop
processing the list on an error, but not a warning. You can set
the msglevel
(see above) by assigning to $MPE::CIvar::msglevel
before calling hpcicmds
. You can see the last command
executed by looking at $MPE::CIvar::lastcmd
and any error in
$MPE::CIvar::cmderr
.
None by default.
Ken Hirsch <kenhirsch@myself.com>
This module may be used and distributed on the same terms as Perl.
perl(1).