On Sun, 5 Dec 2021 16:51:07 +0000, Colin Paice wrote:

>I've raised a doc comment as the BPXBATCH doc says
>*BPXBATCH accepts one parameter string as input, the combination of SH|PGM
>and program_name.*
>
I believe a mention of "sh -c" I suggested (below) would help greatly.

>So according to the doc you cannot pass parameters to the program.
>I've also asked for clarification of what is accepted.  If you have a & it
>seems to end the parsing of the data.
>
You suspect a bug.  Perhaps.  Also likely is that sh takes "&" as a connand
separator.  Use "\&" to suppress this.

Peter seems to wish for discovery of a bug in UNIX rather than JCL, perhaps
because Peter knows that UNIX support is likely to be more responsive than
JCL support.

Also, use max MSGLEVEL. and
    PGM=BPXBATCH,PARM="SH set -x; command - string" for additional
tracing to //STDERR  DD.

>On Sun, 5 Dec 2021 at 16:31, Paul Gilmartin  wrote:
>
>> On Sun, 5 Dec 2021 10:05:22 -0400, Peter Relson wrote:
>> >    ...
>> >Maybe BPXBATCH and SH do not process the parameter string as you are
>> >thinking/expecting they do.
>> >
>> >I have no idea what the BPXBATCH rule is for passing parameter data
>> >supplied on a SH statement. I think you have subsequently concluded that
>> >
>> The UNIX System Services Command Ref. makes this pretty clear:
>> BPXBATCH
>> Parameters
>>     ...
>> SH
>>     Instructs BPXBATCH to start the shell and to run shell commands or
>> scripts
>>     provided from stdin or the specified program_name. BPXBATCH passes all
>>     of the argument data, blanks included as is, to the shell as one
>> parameter.
>>         BPXBATCH PARM='SH command string'
>>     ...
>>     If you specify SH with no program_name information, BPXBATCH attempts
>>     to run anything read in from stdin.
>>
>> (The first paragraph is awkward, even misleading in thee use of "specified
>> program_name".  Should I submit an RCF to change it to:
>> SH
>>     Instructs BPXBATCH to start the shell, passing it the entire remainder
>> of
>>     the argument data, blanks included as is, to the "sh -c" as one
>> parameter.
>> ?
>> That's the behavior I've experienced.)
>>
>> May we assume without further explanation that's the PARM in "equivalent
>> JCL", described in the JCL Ref.?
>>
>> >your problem is not with how the parameter string itself is presented to
>> >the BPXBATCH program, but further downstream.  A bug in BPXBATCH
>> >processing (and/or a doc problem), is worth reporting.
>> >
>> Max MSGLEVEL should clarify sufficiently.

-- gil

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

Reply via email to