Check out this program:
$ perl 'f$env("procedure")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !
$ exit++ + ++$status != 0 and $exit = $status = undef;
#use VMSish;
use strict;
use diagnostics;
use English;
use VMS::Stdio qw ( &tmpnam );
my $filenm = tmpnam();
my $cmds = q{$
$ SS_F_BADPARAM = %X00000014
$ write sys$output "hi"
$ exit 'SS_F_BADPARAM};
open FILE, ">$filenm";
print FILE $cmds;
close FILE;
my $status = system ("\@$filenm.");
print '$status = ', $status >> 8, "\n";
print "signal = ", $status & 127, "\n";
print "core = ", $status & 128, "\n";
if (!$status) { warn ("Error $!:$^E"); }
unlink $filenm;
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 ?
Thanks,
-- Pat
p.s. Here's my perl & system info:
$ cc/version
DEC C V6.0-001 on OpenVMS Alpha V7.1-2
$ perl "-V"
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=VMS, osvers=V7.1-2, archname=VMS_AXP
uname='VMS lpsrvb V7.1-2 AlphaServer 8400 5/625'
hint=none, useposix=false, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='CC/DECC', optimize='undef', gccversion=undef
cppflags='undef'
ccflags
='/float=ieee/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/N
oList'
stdchar='char', d_stdstdio=define, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=N, prototype=define
Linker and Libraries:
ld='Link', ldflags ='/NoTrace/NoMap'
libpth=/sys$share /sys$library
libs=
libc=(DECCRTL), so=exe, useshrplib=undef, libperl=undef
Dynamic Linking:
dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags='/Share'
Characteristics of this PERLSHR image:
Compile-time options: DEBUGGING
Built under VMS
Compiled at Sep 29 1999 16:58:13
%ENV:
PERLSHR="PATH:PERLSHR.EXE"
PERL_ROOT="DSA20:[free-utilities.lib.perl.]"
@INC:
perl_root:[lib.VMS_AXP.5_00503]
perl_root:[lib]
perl_root:[lib.site_perl.VMS_AXP]
perl_root:[lib.site_perl]
.
--
This message does not represent the policies or positions
of the Mayo Foundation or its subsidiaries.
Patrick Spinler email: [EMAIL PROTECTED]
Mayo Foundation phone: 507/284-9485