Thanks for the "fgrep -n" suggestion, that will definitely help in solving the 
actual business issue.

Using "sh -x" is not as helpful though because although you get a separate 
output line for the "cat" of the MVS data set (good, would allow removal of the 
"echo" command) but you also get another line for the piped "fgrep" (not-so 
-useful noise).

Now if fgrep actually accepted MVS data set syntax on its command line like awk 
does then "sh -x" would be very useful, since the only command necessary would 
be fgrep.  Perhaps the coming "unification" of the file systems will help (once 
my employer's systems get to that OS level at some fairly long time post-GA).

Thanks again for your prompt and helpful assistance.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Paul Gilmartin
Sent: Sunday, April 3, 2022 4:40 PM
To: [email protected]
Subject: Re: Running z/OS Unix commands from an MVS sequential dataset

EXTERNAL EMAIL

On Sun, 3 Apr 2022 19:35:34 +0000, Farley, Peter x23353 wrote:

>That worked, got output to STDOUT as desired.
> 
Yaaay!  (With no setup copy?)

>Thankoyou for your help!
> 
You' re welcome.  A couple extra thoughts:
    // PARM='SH  /bin/cp //"''TSOUSER.UNIXCMDS.SH''" /dev/fd/1 | /bin/sh -x 
2>&1'

"-x" logs the commands to identify data sets, merging that log with stdout.

"fgrep -n" numbers the lines.

--


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