Thank you Philippe!
It worked.
Actually it worked with some small change:
SH echo "mkdir -p /some/dir && chmod -R 750 /some/dir" | su
Note there are only two ampersand characters.
Thanks!
--
Radoslaw Skorupka
Lodz, Poland
W dniu 25.08.2026 o 18:19, Philippe Leite pisze:
You can try to use STDPARM and piping the command to SU:
//STEP0001 EXEC PGM=BPXBATCH
//STDENV DD *
_BPX_SHAREAS=YES
_BPX_BATCH_SPAWN=YES
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDPARM DD *
SH echo "mkdir -p /some/dir &&&& chmod -R 750 /some/dir" | su
On Tue, Aug 25, 2026 at 1:13 PM Radoslaw Skorupka <
[email protected]> wrote:
The following job step
//K10 EXEC PGM=BPXBATCH,
// PARM='SH mkdir -p /some/dir &&&& chmod -R 750 /some/dir'
There are two commands in a step:
a) mkdir
b) chmod
It works fine, however it require UID(0) or other authorities in
UNIXPRIV class.
However the submitter has neither UID(0) nor the authorities in UNIXPRIV.
But he has access to BPX.SUPERUSER, so he's allowed to enter TSO OMVS
and issue "su" command (without parameters) to get effective UID(0) for
subsequent commands.
Question:
is it possible to add "su" to the PARM field?
How to code it?
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN