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.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to