On Mon, 17 Apr 2017 14:07:25 -0500, John McKown wrote: > >But I was wondering what other EXEC ??? pre-processor might be created if >IBM were to release (or just license under NDA) this interface. What was I >thinking of? Well, maybe an EXEC UNIX or maybe call it EXEC SYSCALL (to >match REXX SYSCALL), to more tightly integrate some UNIX facilities into >COBOL. Not that I'm disparaging the excellent BPXUNIX() subroutine which >can be used. I just think that something like: > >EXEC UNIX Z'cd ~/junk' > >is easier to understand than: > >CALL "BPXUNIX" USING Z"cd ~/junk" > Note that either of these would do a chdir() in a separate subshell, not affecting the caller's current working directory.
I have a simple Rexx EXEC which does tilde substitution then SYSCALL chdir. If called as a TSO comand it changes the current working directory for the rest of the session, for better or for worse. Authors of Rexx EXECS should not assume that in the TSO environment CWD is guaranteed to be HOME. >or, hardest to understand, but "best" for diagnostic use (and what the EXEC >UNIX might actually do): > >77 CHDIR PIC X(100) VALUE Z'cd ~/junk'. >77 CHDIR-LEN PIC S9(9) BINARY VALUE +9. >... >CALL BPX1CHD USING CHDIR, CHDIR-LEN, RETURN_VALUE, RETURN_CODE, REASON_CODE. > Might the existing Rexx SYSCALL API be invoked other than from Rexx? Might not be very useful since so many SYSCALLs depend on the Rexx variable pool. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
