On Fri, 15 Jan 2021 18:22:09 +0000, Frank Swarbrick wrote:

>For in-stream data sets: with the SH option, trailing blanks are not 
>truncated. Records in in-stream data sets are concatenated with blanks as 
>separator characters, and the string remaining after the SH token is passed as 
>a single argument to a /bin/sh -c command. For the PGM option, the string is 
>divided not only at line boundaries but also at blanks within a line.
>
>From "Guidelines for defining STDPARM", 
>https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.bpxa400/gfdstdparm.htm
> 
Sigh.  Users Guide.  Syntactic rules belong not in a Users Guide
but in a Command Ref., which is where I looked.

>  *   [...]
>  *   An JCL in-stream data set
>
>The BPXBATCH parameter data immediately follows the STDPARM DD statement. 
>Trailing blanks are truncated for in-stream data sets, but not for other data 
>sets.
>
And that's JCL. It belongs in the JCL Ref., where it undoubtedly appears.
It shouldn't be duplicated here, except in an example.

>    ...
>Here is another way, placing the arguments on separate lines:
>
>//STDPARM  DD *
>SH /myscript.sh AAAA
>BBBB
>CCCC
>/*[Copy code]
>
"[Copy code]"?

The example might instructively show a trick to concatenate (long) lines with
a command substitution:
    //STDPARM  DD *
    SH /myscript.sh AAAA
    BBBB$( : These lines are 
      concatenated! )CCCC
    /*
Is equivalent to:
    //STDPARM  DD *
    SH /myscript.sh AAAA
    BBBBCCCC
    /*

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to