$(fromdsn //DD:DSNS)  
returns a multiline string as one arg.   Actually it won't work, since $(  ) 
does a fork into a different address space and the DD isn't there.

xargs is completely different, but works perfectly for when you want to 
tokenize a stream into additional arguments for a command.

On Mon, Apr 4, 2022, at 7:44 PM, Paul Gilmartin wrote:
> On Apr 4, 2022, at 10:47:36, Kirk Wolf wrote:
> >     ...
> > //AWK  EXEC PGM=COZBATCH
> > //DSNS DD   *
> > "//'SYS1.MACLIB(ACB)'"
> > "//'SYS1.MACLIB(CHECK)'"
> > "//'SYS1.MACLIB(CLOSE)'"
> > "//'SYS1.MACLIB(DYNALLOC)'"
> > /*
> > //STDIN DD  *
> > fromdsn //DD:DSNS |
> >  xargs awk '/STR/ {print FILENAME ":" NR "\t" $0 }'
> > //
> >  
> In utter ignorance of "fromdsn", I wonder. What can xargs do that
> can't be done equally we'll with command substitution, e.g.:
>     //STDIN DD  *
>        awk '/STR/ {print FILENAME ":" NR "\t" $0 }' $(
>             fromdsn //DD:DSNS )
> 
> I've found xargs useful only with non-portable filenames, then:
>     find ... -print0 | xargs -0 <some-command>
> 
> Alas, z/OS supports neither "find ... -print0" nor "xargs -0"
> 
> -- 
> gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

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

Reply via email to