IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYSOUT is getting deleted after execution of the JOB


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Mon Oct 05, 2009 10:30 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Oct 05, 2009 10:45 am
Reply with quote

DA(*) means that you allocate the file to your terminal. Why can't you allocate it to a permanent dataset?

O.
Back to top
View user's profile Send private message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Mon Oct 05, 2009 10:49 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Oct 05, 2009 11:07 am
Reply with quote

Hi,

change the SYSOUT statement to "ALLOC FI(SYSOUT) SYSOUT(X)"

or to a class that is not purged.


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Oct 05, 2009 12:09 pm
Reply with quote

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
View user's profile Send private message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Mon Oct 05, 2009 12:58 pm
Reply with quote

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
View user's profile Send private message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Mon Oct 05, 2009 2:50 pm
Reply with quote

icon_neutral.gif 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
View user's profile Send private message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Mon Oct 05, 2009 3:00 pm
Reply with quote

but the requirement is that i need to write in the Spool itself.

Please help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Oct 05, 2009 3:24 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Oct 05, 2009 5:59 pm
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Mon Oct 05, 2009 7:44 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Mon Oct 05, 2009 9:23 pm
Reply with quote

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
View user's profile Send private message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Mon Oct 05, 2009 10:59 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Tue Oct 06, 2009 12:58 am
Reply with quote

Quote:
SYSOUT(X)


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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
No new posts No sysout coming in spool JCL & VSAM 4
No new posts Parallel Sysplex - subprogram execution CICS 7
No new posts Prod parallel execution on mainframe ... CICS 1
Search our Forums:

Back to Top