CC'ed to IBM-MAIN for a wider audience.

I have a need to run a simple fgrep looking for a constant string on a large 
number (> 400) of PDS members in a variety of different PDS's.  I have verified 
that this set of commands run from a shell prompt as a z/OS Unix shell script 
stored in a z/OS Unix file system works and generates the results I need for 
each PDS member - the DSN on one line, and any lines in the member containing 
the string to be found in following lines.

DSN='TSOUSER.PDS(MEMBER01)'
echo $DSN
cat //"'$DSN'" | fgrep ''' STRING-TO-FIND '''

I am generating the list of PDS(member) names in a batch job using non-Unix 
programs so I just want to be able to run this set of shell commands for each 
dsn(mbr) in the list and get output to STDOUT as an MVS file.

I have tried this JCL to accomplish running the commands from a file.  It runs 
with CC=0, but STDOUT is never populated:

//RUNCMDS EXEC BPXBATCH,REGION=256M,
// PARM='PGM /bin/sh . //"''TSOUSER.UNIXCMDS.SH''"'
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD DUMMY

Note that there are both doubled apostrophes and double quotes in that PARM.

I did try using BPXBATSL with no change in the behavior.  I do not have access 
to the CoZ batch tools, only standard z/OS Unix facilities.

Any advice you can offer on how to accomplish this small task is appreciated.

Peter
--


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

Reply via email to