One of the many way to execute an operator command from a batch rexx program.
With this solution here, with Rexx and SDSF, you can embed the commands in more complex business logic, and use Rexx variables to dynamically establish values for the commands to be issued.
By the way I have started a repository on GitHub on which I will share assets in the future.
https://github.com/execpgm/execpgm-assets
I have added this tool here:
https://github.com/execpgm/execpgm-assets/tree/master/Tools
Direct link:
https://github.com/execpgm/execpgm-assets/blob/master/Tools/OperatorCommandSDSFbatch.txt
//GENER EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD ,BLKSIZE=800,LRECL=80 GENERATE LABELS DATA=ALL /* //SYSUT1 DD * /* REXX / RC=ISFCALLS('ON') YOURSTC = "MYSTC" ADDRESS SDSF "ISFEXEC '/P "YOURSTC"'" ISFDELAY="5" /* REPLY IS IN STEM ISFULOG. */ /* //SYSUT2 DD DSNAME=&&DS1(CMD),DISP=(NEW,PASS), // UNIT=SYSDA,SPACE=(TRK,(5,,2)) //* //RDWRJ EXEC PGM=IKJEFT01 //SYSPRINT DD SYSOUT=* //SYSPROC DD DISP=SHR,DSN=&&DS1 //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * CMD /* //