When I looked into this a while back, here's what I came up with. I really don't like the semi-colons and I really want to see the output along with the commands. I'm also a fan of having everything contained in one member so that I don't have to maintain stuff in different spots.
--- //DONBPX2 JOB (,R282),POITRAS,NOTIFY=SASDTP,TIME=(0,10),CLASS=A, // REGION=1M,MSGCLASS=A //* //* The idea here is that I'd like to see the commands printed //* along with the output. set -x will do that (while printing //* a "+" in front of the commands, but that's ok), but sends //* it's debugging output to stderr. By setting stdout and //* stderr to the same file, the output is interleaved and the //* final step prints the result. //* //COPY1 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSUT1 DD * set -x cd /u/sasdtp/temp pwd ls -Fartl date /* //SYSUT2 DD PATH='/u/sasdtp/donbpx2.txt', // PATHOPTS=(ORDWR,OTRUNC,OCREAT),PATHMODE=SIRWXU, // PATHDISP=(KEEP,DELETE),FILEDATA=TEXT //SYSPRINT DD SYSOUT=* //BPXBAT EXEC PGM=BPXBATCH,PARMDD=PARMINDD //STDIN DD DUMMY //STDOUT DD PATH='/u/sasdtp/donbpx2.out.txt', // PATHOPTS=(OWRONLY,OTRUNC,OCREAT),PATHMODE=SIRWXU, // PATHDISP=(KEEP,DELETE),FILEDATA=TEXT //STDERR DD PATH='/u/sasdtp/donbpx2.out.txt', // PATHOPTS=(OWRONLY,OTRUNC,OCREAT),PATHMODE=SIRWXU, // PATHDISP=(KEEP,DELETE),FILEDATA=TEXT //PARMINDD DD * sh /u/sasdtp/donbpx2.txt /* //COPY2 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSUT1 DD PATH='/u/sasdtp/donbpx2.out.txt', // PATHOPTS=(ORDONLY), // RECFM=VB,LRECL=1024,BLKSIZE=3000 //SYSUT2 DD SYSOUT=* //SYSPRINT DD SYSOUT=* // --- Running this job sends the output to sysout: --- + cd /u/sasdtp/temp + pwd /u/sasdtp/temp + ls -Fartl total 20172 -rw-r--r-- 1 SASDTP CCD 5797 Jan 19 2011 hexdump.C -rwxr-xr-x 1 SASDTP CCD 118784 Jan 19 2011 hexdump* -rwx------ 1 SASDTP CCD 129024 Jan 20 2011 hexdump.pax* -rw-r--r-- 1 SASDTP CCD 10000000 Jul 30 2018 tmp.txt drwxr-xr-x 2 SASDTP CCD 8192 Jul 30 2018 ./ drwxr-xr-x 130 SASDTP CCD 32768 Oct 4 15:29 ../ + date Wed Oct 30 09:34:09 EDT 2019 --- -- Don Poitras - SAS Development - SAS Institute Inc. - SAS Campus Drive sas...@sas.com (919) 531-5637 Cary, NC 27513 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN