View previous topic :: View next topic
|
Author |
Message |
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
One REXX program is calling one COBOL program. In the COBOL program, I have added some display statements. In the REXX program, i am allocating the sysout by the following command.
"ALLOC F(SYSOUT) DA(*) SHR"
once the execution is done, I am releasing the SYSout by the following command.
"FREE F(SYSOUT)"
Hence, during the execution of the job, sysout is there in the spool but once the execution is done, SYSout is getting vanished from SPool - So I am not able to see the SYSout after the execution.
after that I have removed the "FREE F(SYSOUT)" statement from the REXX and now SYSout is there also after the execution. As this is a normal practice to FREE something after the execution so this is not a elegant solution may be.
Could someone please throw some light on this? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
DA(*) means that you allocate the file to your terminal. Why can't you allocate it to a permanent dataset?
O. |
|
Back to top |
|
|
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
Actually I don't want to allocate SYSOUT to a parmanent dataset. is there any option so that SYSOUT won't be deleted after the execution?
Thanks |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
change the SYSOUT statement to "ALLOC FI(SYSOUT) SYSOUT(X)"
or to a class that is not purged.
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Is this again something to do with "Bull Mainframe Systems"?
PS. Sorry, if I add clutter... just thought that thread may have a clue... |
|
Back to top |
|
|
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
Thanks Gerry.
I have "ALLOC FI(SYSOUT) SYSOUT(J)" but still the sysout is not coming. Do you have any idea how can I use the CATALOG command in REXX with SYSout. Actually I have jus chcked that if I will use CATALOG command then it will be catalogged after the FREE.
Please help... |
|
Back to top |
|
|
sijayapal
New User
Joined: 23 Dec 2008 Posts: 69 Location: India
|
|
|
|
I am not a expert in rexx.. but i believe u can write the sysout in a file instead of writing to a spool... |
|
Back to top |
|
|
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
but the requirement is that i need to write in the Spool itself.
Please help. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
This works perfectly well for me
Code: |
"FREE FI(REPOUT)"
"ALLOC FI(REPOUT) SYSOUT(X)"
DO A = 1 TO 5
PUSH A
"EXECIO 1 DISKW REPOUT"
END
"EXECIO 0 DISKW REPOUT ( FINIS"
"FREE FI(REPOUT)" |
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
change the SYSOUT statement to "ALLOC FI(SYSOUT) SYSOUT(X)"
SYSOUT(X) whould have to be a class that is held on your system! |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Also, ensure that the ALLOC command completes successfully by keeping MSGS ON. The SYSOUT DD is fairly common and may have already been allocated in your LOGON procedure. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Quote: |
after that I have removed the "FREE F(SYSOUT)" statement from the REXX and now SYSout is there also after the execution. |
I am not sure how this is different that what you want. |
|
Back to top |
|
|
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
Thanks Craq. I will try the SYSOUT(X) option tomorrow. I have already used so may options like NOHOLD, CATALOG, KEEP etc but none of them are working.
Regarding Pedro's comment. Actually if I am removing the FREE option then my purpose is getting solved but as we always should free all the files whatever we have allocated during the program - hence this is not an elegant solution. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
It is not clear if you understand. The classes are defined by your system programmer and it is likely different on your system than on someone else's system.
Use the same class on your SYSOUT(x) parm as is specified on your JOB card MSGCLASS parameter. |
|
Back to top |
|
|
|