Controlling REXX output



IBM's Command List programming language & Restructured Extended Executor

Controlling REXX output

Postby nkulkarni » Mon Sep 28, 2015 3:21 pm

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?
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Controlling REXX output

Postby steve-myers » Mon Sep 28, 2015 7:08 pm

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.

These users thanked the author steve-myers for the post:
nkulkarni (Thu Oct 08, 2015 8:08 pm)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Controlling REXX output

Postby nkulkarni » Mon Sep 28, 2015 7:21 pm

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...
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Controlling REXX output

Postby Pedro » Tue Sep 29, 2015 1:19 am

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.
Pedro Vera

These users thanked the author Pedro for the post:
nkulkarni (Thu Oct 08, 2015 8:08 pm)
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Controlling REXX output

Postby nkulkarni » Tue Sep 29, 2015 12:53 pm

Hi Pedro,

Thank you for your response and inputs.

I will try it out and check...
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Controlling REXX output

Postby nkulkarni » Thu Oct 15, 2015 3:04 am

Hi Steve Myers,

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

Thank you very much
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Controlling REXX output

Postby nkulkarni » Fri Oct 16, 2015 9:33 pm

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
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Controlling REXX output

Postby steve-myers » Fri Oct 16, 2015 11:49 pm

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.

These users thanked the author steve-myers for the post:
nkulkarni (Fri Oct 16, 2015 11:50 pm)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Controlling REXX output

Postby nkulkarni » Fri Oct 16, 2015 11:53 pm

Thank you Steve-Myers for your help with this one
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post