On Wed, 26 Aug 2026 20:23:49 +0200, Radoslaw Skorupka <[email protected]> wrote:
>I wish I would have the following: >//STEP EXEC PGM=some-pgm >//SOME DD * >su /*if needed*/ >cd /some/directory >some_cmd -with -some -parms >/* > >Just as simple as above. With no &&&& tricks, no SH echo >"command&&command" | su gimmicks, etc. > >-- >Radoslaw Skorupka >Lodz, Poland If you put the commands in a unix file, you can feed them into bpxbatch/su via STDIN: //*-----------------------------------------------------------------*/ //* Copy command to uss file //*-----------------------------------------------------------------*/ //OCOPY1 EXEC PGM=IKJEFT01 //SYSTSPRT DD SYSOUT=* //FILE DD PATH='/tmp/cmd.txt', // PATHOPTS=(OWRONLY,OCREAT), // PATHMODE=(SIRWXU,SIRGRP) //SYMOUT DD SYSOUT=* //CARDS DD *,SYMBOLS=(EXECSYS,SYMOUT) cd /u/zzzz/ibm/zzz-3_1_1-20260810 pax -ppx -rvzf zzzz-3.1.1-zzzzz-20260810.pax.Z /* //SYSTSIN DD * OCOPY + INDD(CARDS) + OUTDD(FILE) + TEXT + PATHOPTS(OVERRIDE) /* //*-----------------------------------------------------------------*/ //* Issue command under su //*-----------------------------------------------------------------*/ //UNMOUNT EXEC PGM=BPXBATCH, // PARM='SH su' //STDIN DD PATH='/tmp/cmd.txt',PATHOPTS=(ORDONLY) //STDOUT DD SYSOUT=* //STDERR DD SYSOUT=* //*-----------------------------------------------------------------*/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
