Yes, I am fully aware that z/OS awk is not among the "blessed" utilities that officially support MVS dataset names. I'm guessing that the underlying awk implementation is fortuitously using fopen() rather than open(). As long as it works I'll continue to use it.
If it ever fails I will use my employer's clout to complain loudly to IBM about it and then set up appropriate "cp //'$INPUT' to /tmp/input.file" and "cp //'$SCRIPT' to /tmp/script.file" steps just to get it working again. And make my employer aware of the increased /tmp storage capacity increase that may be needed. Given IBM's long and steadfast reluctance to break compatibility with whatever they implement in software the first time around it may never happen that it changes either. And maybe Rocket will someday get a z/OS version of gawk out the door. That would be a real blessing. Peter -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Paul Gilmartin Sent: Thursday, February 27, 2020 2:40 PM To: [email protected] Subject: Re: Rexx parse using period as placeholder On Thu, 27 Feb 2020 18:25:03 +0000, Farley, Peter x23353 wrote: >... examples from my employer's z/OS V2.2 system (sanitized): > >//AWKSPLIT EXEC PGM=BPXBATCH,MEMLIMIT2256M >//STDENV DD * >SCRIPT=TSOUSER.TEST.EXEC(AWKSPLIT) >INPUT=TSOUSER.TEST.CSV >//STDPARM DD * >SH echo awk -f "//'$SCRIPT'" "//'$INPUT'" > ; I stand somewhat corrected -- you were not saying that regexen were available, but that awk is available in JCL. In full pedant mode, awk can not appear in LINLIST nor in STEPLIB (unless you somehow relink it), so not available from JCL per se. > awk -f "//'$SCRIPT'" "//'$INPUT'" > Be careful with that construct. Awk in not among the six listed in the Command Ref. Appendix K, "Utilities that support MVS data set names". It may work by happenstance, but if it ever fails you will get no support. I've had such things fail in code reviews; I wouldn't distribute them to customers. (In one case, IBM satisfied an RCF by blessing my usage.) BPXWUNIX might provide an alternative for a single input file, but not for the two you require. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
