I have a JCL job to compile multiple Netview REXX execs for the Message Automation Table:
********************************* Top of Data ******************************
//REXXCOMP JOBCARD
//*--------------------------------------------------------------------
//*
//* BATCH REXX COMPILE
//*
//*--------------------------------------------------------------------
//REXXCOMP PROC
// EXEC REXXC,OPTIONS='XREF OBJECT'
//REXX.SYSIN DD DSN=SYSAOC.PRODNETV.EXECS(&MEMIN),DISP=SHR
//REXX.SYSCEXEC DD DSN=SYSAOC.PRODNETV.CEXEC(&MEMIN),DISP=SHR
// PEND
//*--------------------------------------------------------------------
//S01 EXEC REXXCOMP,MEMIN='MEMBER01'
//S02 EXEC REXXCOMP,MEMIN='MEMBER02'
//S03 EXEC REXXCOMP,MEMIN='MEMBER03'
//S04 EXEC REXXCOMP,MEMIN='MEMBER04'
//S05 EXEC REXXCOMP,MEMIN='MEMBER05'
//S06 EXEC REXXCOMP,MEMIN='MEMBER06'
//S07 EXEC REXXCOMP,MEMIN='MEMBER07'
//S08 EXEC REXXCOMP,MEMIN='MEMBER08'
//S09 EXEC REXXCOMP,MEMIN='MEMBER09'
//S10 EXEC REXXCOMP,MEMIN='MEMBER10'
I would like to create another PROC for this job to fire the NCCF MEMSTOUT command: MEMSTOUT &MEMIN
What's the ideal way to do this?
A timer, a route command, another REXX or JCL job?
EDIT:
Ideally I would like to add the following command to the PROC
MVS RO *ALL,%MEMSTOUT &MEMIN
Which at our shop routes to all LPARS the Netview command (%).
ie
//REXXCOMP PROC
// EXEC REXXC,OPTIONS='XREF OBJECT'
//REXX.SYSIN DD DSN=SYSAOC.PRODNETV.EXECS(&MEMIN),DISP=SHR
//REXX.SYSCEXEC DD DSN=SYSAOC.PRODNETV.CEXEC(&MEMIN),DISP=SHR
// COMMAND 'RO *ALL,%MEMSTOUT ''&MEMIN''
// PEND
I just do not know how to incorporate symbolic within the COMMAND. Keep getting JCL runtime error.
You cannot do what you want this way. According to the documentation...
Because the system usually executes an in-stream command as soon as it is converted, execution of the command will not be synchronized with the execution of any job or job step in the input stream. To synchronize a command with job processing, tell the operator the commands you want entered and when they should be issued, and let the operator enter them from the console.
...meaning that the command likely will execute before the unnamed step executing REXXC.
You might be able to accomplish your goal by using IEBGENER to submit a job via writing to INTRDR. That would also solve your symbolic substitution problem, as you can use the SYMBOLS parameter with instream data.
Maybe something like this...
//REXXCOMP PROC
// EXPORT SYMLIST=*
// EXEC REXXC,OPTIONS='XREF OBJECT'
//REXX.SYSIN DD DSN=SYSAOC.PRODNETV.EXECS(&MEMIN),DISP=SHR
//REXX.SYSCEXEC DD DSN=SYSAOC.PRODNETV.CEXEC(&MEMIN),DISP=SHR
//SUBCMD EXEC PGM=IEBGENER
//SYSUT1 DD *,DLM=$$,SYMBOLS=JCLONLY
//jobname JOB job-parameters
// COMMAND 'RO *ALL,%MEMSTOUT ''&MEMIN''
//*
$$
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
// PEND
...which is just freehand modifications to what you wrote, but I think you get the idea.