At 2:03 PM -0600 11/1/00, Patrick Spinler wrote:
>
>   exit $status >> 8;
>
>I get this result:
>
>   $ perl -w test.pl
>   hi
>   %SYSTEM-F-BADPARAM, bad parameter value
>   $status = 4
>   signal = 0
>   core = 0
>   %NONAME-F-NOMSG, Message number 00000004
>
>Running the program either as a "$ perl -w test.pl" or as "$ @test.pl",
>and whether I have the "use VMSish;" statement commented or not.
>
>What's happening to the "real" DCL exit status value 0x14 ?  Why isn't
>perl getting this ?


OK, I finally found this, and it is documented in perlvar.pod:

"Under VMS, the pragma C<use vmsish 'status'> makes C<$?> reflect the
actual VMS exit status, instead of the default emulation of POSIX
status."

So, you don't want "use VMSish" but rather "use vmsish 'status'".
An example with and without:

$ perl -e "$x = system('nocommand'); print $x; exit($x);"
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
  \NOCOMMAND\
256
%SYSTEM-W-ILLSER, illegal service call number

[the Posix status of 256 obviously means something else to DCL]

$ perl -e "use vmsish 'status'; $x = system('nocommand'); print $x; exit($x);"
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
  \NOCOMMAND\
229520
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling

And for confirmation that it's got the right status:

$ write sys$output f$message(229520)
%CLI-W-IVVERB, unrecognized command verb - check validity and spelling

$ search climsgdef.h ivverb
#define CLI$_IVVERB 229520

-- 
____________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

Reply via email to