Page 1 of 1

Controlling REXX output

PostPosted: Mon Sep 28, 2015 3:21 pm
by nkulkarni
Hi,

I'm executing 3 REXX programs (#RXPGM1, #RXPGM2 and #RXPGM3) from library ABC.DEF.GHI.RXLIB and writing the output to a single file ABC.DEF.GHI.OUTPUT in a single step STEP01 (JCL is as below)

//STEP01 EXEC PGM=IKJEFT1A,DYNAMNBR=200
//SYSEXEC DD DISP=SHR,DSN=ABC.DEF.GHI.RXLIB
//SYSTSPRT DD DISP=(NEW,KEEP,DELETE),
// DSN=ABC.DEF.GHI.OUTPUT,
// SPACE=(TRK,(50,20),RLSE),
// BLKSIZE=27951,RECFM=FB,LRECL=121,DSORG=PS
//SYSTSIN DD *
#RXPGM1
#RXPGM2
#RXPGM3
/*

The output file contains below data

READY
#RXPGM1

_Output from the program #RXPGM1
READY
#RXPGM2

_Output from the program #RXPGM2
READY
#RXPGM3

_Output from the program #RXPGM2
READY
END


Could anyone please suggest how can I get rid of the words which REXX is automatically writing to the output (Highlighted in Red)? Is there any way to suppress those words?

Re: Controlling REXX output

PostPosted: Mon Sep 28, 2015 7:08 pm
by steve-myers
You cannot get rid of the last READY and END lines. You can get rid of the remaining READY and #RXPGMx lines by preparing a Rexx EXEC like this:

/*REXX */
#RXPGMx

#RXPGMx

Run the new Rexx EXEC using the EXEC statement PARM parameter and specify //SYSTSIN DD DUMMY in your JCL.

Re: Controlling REXX output

PostPosted: Mon Sep 28, 2015 7:21 pm
by nkulkarni
Hi Steve Myers,

Thank you very much for the response, if we cannot get rid of the last READY and END lines then I'll use one more step to filter those words...

Re: Controlling REXX output

PostPosted: Tue Sep 29, 2015 1:19 am
by Pedro
Your rexx programs are using the same output file as TSO is (PGM=IKJEFT1A).

If you do not want the file to have both outputs, how about having your rexx programs write to a different file? You would need to allocate the file and use EXECIO.

Re: Controlling REXX output

PostPosted: Tue Sep 29, 2015 12:53 pm
by nkulkarni
Hi Pedro,

Thank you for your response and inputs.

I will try it out and check...

Re: Controlling REXX output

PostPosted: Thu Oct 15, 2015 3:04 am
by nkulkarni
Hi Steve Myers,

It worked, I called the REXX program using PARM/EXEC and made SYSTSIN DUMMY.

Thank you very much

Re: Controlling REXX output

PostPosted: Fri Oct 16, 2015 9:33 pm
by nkulkarni
Hi,

To get the messages suppressed I changed the code as below

//STEP01 EXEC PGM=IKJEFT1A,DYNAMNBR=200,PARM='#RXPG123'
//SYSPROC DD DISP=SHR,DSN=ABC.DEF.GHI.RXLIB
//SYSTSPRT DD DISP=(NEW,KEEP,DELETE),
// DSN=ABC.DEF.GHI.OUTPUT,
// SPACE=(TRK,(50,20),RLSE),
// BLKSIZE=27951,RECFM=FB,LRECL=121,DSORG=PS
//SYSTSIN DD DUMMY

Where #RXPG123 is the combined program including contents of #RXPGM1,2 & 3

Re: Controlling REXX output

PostPosted: Fri Oct 16, 2015 11:49 pm
by steve-myers
Yes, combining the three EXECs into one EXEC will have the same effect.

I proposed the outer EXEC; it seemed simpler plus if there was reason to run the original EXECs in a different order, or just run one or two of the three for some reason, it would be simpler to update the outer EXEC or just create a new outer EXEC. Plus, you could create the outer EXEC from the batch job very easily.

Re: Controlling REXX output

PostPosted: Fri Oct 16, 2015 11:53 pm
by nkulkarni
Thank you Steve-Myers for your help with this one