Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYSOUT is getting deleted after execution of the JOB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: SYSOUT is getting deleted after execution of the JOB
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: 2360
Location: Israel

PostPosted: Mon Oct 05, 2009 10:45 am    Post subject:
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    Post subject: Reply to: SYSOUT is getting deleted after execution of the J
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: 1703
Location: Australia

PostPosted: Mon Oct 05, 2009 11:07 am    Post subject:
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

Senior Member


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

PostPosted: Mon Oct 05, 2009 12:09 pm    Post subject:
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    Post subject: Reply to: SYSOUT is getting deleted after execution of the J
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    Post subject:
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    Post subject: Reply to: SYSOUT is getting deleted after execution of the J
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: 8593
Location: Back in jolly old England

PostPosted: Mon Oct 05, 2009 3:24 pm    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Oct 05, 2009 9:23 pm    Post subject: Reply to: SYSOUT is getting deleted after execution of the J
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    Post subject: Reply to: SYSOUT is getting deleted after execution of the J
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

Senior Member


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

PostPosted: Tue Oct 06, 2009 12:58 am    Post subject: Reply to: SYSOUT is getting deleted after execution of the J
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts output DDname JESMSGLG job during exe... italo_pm TSO/ISPF 16 Tue Jun 21, 2016 11:13 am
No new posts Can a DB2 insert trigger execution of... TS70363 DB2 6 Tue Nov 24, 2015 10:44 pm
No new posts Count the number of rows updated or d... Chetan Kumar DB2 6 Tue Jul 14, 2015 7:57 pm
No new posts Fetch execution time of a job using R... ashirwad CLIST & REXX 3 Wed Apr 08, 2015 6:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us