/* REXX *** */ /* THIS IS AN EXEC TO return text for USS errors */ PARSE ARG error reason If reason = '' then reason = 0 /* you can specify 0 for first option if you only want to provide a reason value */ If error = '' then Do Say 'errtext {errno} {reason}' Exit 4 End Parse Source rxenv /* avoid SYSCALLS in the OMVS shell environment */ If Subword(rxenv,7,2) \= 'SH OMVS' then , If SYSCALLS('ON')>3 THEN DO SAY 'Unable to establish the SYSCALL environment' Exit 12 END Address syscall 'strerror 'error reason msg. If msg.SE_ERRNO \= '' then , Say 'Errno('error') 'msg.SE_ERRNO If msg.SE_REASON \= '' then , Say 'Reason('reason') 'msg.SE_REASON If msg.SE_ACTION \= '' then , Say msg.SE_ACTION If msg.SE_MODID \= '' then , Say msg.SE_MODID Exit 0