On Wed, 2 Oct 2019 11:58:35 -0500, John McKown wrote: >> >Don't use STDIN. Use STDPARM. Example that I use on z/OS 1.12! > Easy enough when you have only one shell command and no comments.
(I didn't know semicolons were optional between awk pattern-action statements. YLSED.) It's a pity that "//DD:DDNAME" isn't supported as an operand of "cp". Some say it works regardless, just if it breaks you get to keep both pieces. >//PS001 EXEC PGM=BPXBATCH,REGION=0M >//*PARM='SH printenv ' >//STDOUT DD SYSOUT=* >//STDERR DD SYSOUT=* >//STDIN DD DUMMY >//STDPARM DD * >SH awk 'BEGIN {count=0;file="";} > file != FILENAME && file != "" > {print "file " file " has " count " records"} > FNR == 1 {file=FILENAME;count=0;} > {count++;} > END {print "file " file " has " count " records"}; > ' > "//'sys1.maclib(getmain)'" > "//'sys1.maclib(read)'" | > cp /dev/fd/0 "//'tsh009.stdout.txt'" >/* >// -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN