From the z/OS Unix System Services Command Reference 
(https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.bpxa500/bpxbatr.htm):


BPXBATCH supports a parameter string up to 32754 characters when called from a 
TSO command environment. Also from both a batch and TSO environment, up to 
65,536 characters can now be supplied via the a new input DD named stdparm. 
When the stdparm DD is allocated BPXBATCH will use the data found in the z/OS 
UNIX file or MVS data set associated with this DD rather that what is found on 
the parameter string or in the stdin DD. As a warning to the user, an 
informational message BPXM079I will be displayed indicating that this is 
occurring.
The stdparm DD will allow either a z/OS UNIX file, or an MVS SYSIN PDS, PDSE or 
sequential data set. The following are characteristics of the parameter data 
that can be supplied in the stdparm DD, if a z/OS UNIX file is specified:

  *   It must be a text file defined with read access only
  *   Specify one argument per line
  *   The file cannot have sequence numbers in it.
TipIf you use the ISPF editor to create the file, set the sequence numbers off 
by typing number off on the command line before you begin typing data. If 
sequence numbers already exist, type UNNUM to remove them and then type number 
off.

If a MVS data set is specified:

  *   Specify one argument per line. If the parameter string for an argument 
spans more than one line of a data set or file, this string will be divided 
into two or more arguments that are passed to the corresponding shell script or 
program.
  *   The maximum length of a single argument supplied to the program is 
32,760, which is the same as the maximum LRECL for an unspanned non-VSAM data 
set.
  *   The record format of the data set can fixed or variable (unspanned).
  *   The data set cannot have sequence numbers in it. If you use the ISPF 
editor to edit the data set, set the sequence numbers off by typing number off 
on the command line before you begin typing in the data. If sequence numbers 
already exist, type UNNUM to remove them and set number mode off.
  *   Trailing blanks are truncated for SYSIN and variable block data sets, but 
not for fixed block data sets. For a fixed block data set, trailing blanks will 
be included in the parameter text for a given argument up to the end of the 
record.

I would agree that it's not all that clear.

As for the note about "JCL in-stream data set", I disagree that it belongs in 
the JCL ref.  The behavior is specific to how BPXBATCH itself handles instream 
data.  I don't think it's a general statement about instream data.

BTW, the "copy code" is an artifact of cut and paste from a web page.  🙁

________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Friday, January 15, 2021 12:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU>
Subject: Re: JCL to tar USS directory

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

----------------------------------------------------------------------
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