Colin wrote
<snip>
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.*
So according to the doc you cannot pass parameters to the program.
</snip>

A reminder: it is helpful (sometimes necessary) to point out where within 
the vast sea of documentation you found something.

There are at least two places where the doc does not say that and does 
describe the optional arg's. 

https://www.ibm.com/docs/en/zos/2.5.0?topic=utility-passing-parameter-data-bpxbatch
https://www.ibm.com/docs/en/zos/2.5.0?topic=utility-invoking-bpxbatch-in-batch-job#btch

The inconsistency is, of course, unfortunate and should be corrected.

To get back to the initial problem, the parameter passed to BPXBATCH was 
this:
SH /u/mqweb3/conf/ccc.sh aa &AV REST
This was passed to the shell, and now shell syntax comes into play.

"&" means something special in shell syntax: run the command that precedes 
it asynchronously. The line above indicates to process two shell commands, 
with the commands separated by the "&". That is why the parameter passed 
to the first is "aa".

While JCL substitution is quirky, understanding shell syntax is important 
if you're going to use shell commands. 


Peter Relson
z/OS Core Technology Design


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

Reply via email to