Hi, first of all thanks for all the replies.
Either I don't understand or it doesn't make sense to me. For example, with perl on Linux: $ perl -e "\$s='nosuchdir'; chdir \$s or die \"Can't cd to \$s: '\$!'\n\"" Can't cd to nosuchdir: 'No such file or directory' $ echo $? 2 $ perl -e "\$s=\$ENV{X} or die \"no such environment variable: '\$!'\n\"" no such environment variable: '' $ echo $? 255 $ and "equivalent scripts" with perl on VMS: $ perl -e "$s='nosuchdir'; chdir $s or die ""Can't cd to $s: '$!, $^E'\n""" Can't cd to nosuchdir: 'no such file or directory, %RMS-E-DNF, directory not found' %SYSTEM-F-ABORT, abort $ sh symbol $status $STATUS == "%X0000002C" perl -e "$s=$ENV{X} or die ""no such environment variable: '$!, $^E'\n""" no such environment variable: 'invalid argument, %SYSTEM-F-NOLOGNAM, no logical name match' %SYSTEM-F-NOLOGNAM, no logical name match $ sho symbol $status $STATUS == "%X000001BC" $ and regarding 1.) A failed lookup in %ENV sets errno / vaxc$errno in our getenv implementation (specifically Perl_vmstrenv in [.vms]vms.c). This is normal and as it should be. 2.) die() (specifically Perl_my_failure_exit in perl.c) retrieves the most recent value of vaxc$errno and uses it as the VMS exit status. This is also normal behaviour. In the first example vaxc$errno was set to %RMS-E-DNF but $status is %SYSTEM-F-ABORT. In the second example, a usual, aka C, getenv() doesn't set errno. Why setting errno to EINVAL and vaxc$errno to NOLOGNAM "is normal and as it should be" for the VMS implementation is not obvious to me. Anyway, in the second example I expected a more generic return/exit code like %SYSTEM-F-ABORT and not an implementation specific one like %SYSTEM-F-NOLOGNAM. Whether DCL should inhibit the message or not is most probably a different question. Anyway I'm off on vacation for the next 2 weeks, so don't expect any quick responses. John