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
 

 

Read the sysout (spool) of a job and get a value using cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ramp_senti

New User


Joined: 17 Mar 2006
Posts: 26

PostPosted: Fri Nov 03, 2006 2:55 am    Post subject: Read the sysout (spool) of a job and get a value using cobol
Reply with quote

Hi ,
I need to read the sysout (spool) of a job and get a value using cobol program.

Can i do this ? Can i read the spool file like any other file ? If yes, please tell me how it is done.

I have one constrain,I can't XDC the spool into my personal dataset as i have to read the spool of many jobs and that would take a lot of time.

Rama
Back to top
View user's profile Send private message

MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Nov 03, 2006 5:41 am    Post subject: Re: Sysout of a job .
Reply with quote

You can execute SARBCH to dump SAR in a file and read it.

Also your shop might have SAR information in some file, contact your Sys Admin to get DSN name and usually this will info about lot of jobs.

By the way, why can't the programs write the value your application is looking for to a file so that it is available for your application. It would be more simplier that reading whole bunch of SAR records.
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Fri Nov 03, 2006 2:54 pm    Post subject:
Reply with quote

hi rama,

you can write your SYSOUT to a file in the JCL.
All you need to do is ...modify your jCL .

Code:
//SYSOUT DD DSN=KBY@V1.TEST.SPOOL,
//          DISP=(NEW,CATLG,DELETE),
//          UNIT=(SYSDA),SPACE=(TRK,(5,5),RLSE),
//          DCB=KBY@V1.DB10Y01.REPORT


Again the SYSOUT dataset can be read by your COBOL program.

~Vamsi
Back to top
View user's profile Send private message
ramp_senti

New User


Joined: 17 Mar 2006
Posts: 26

PostPosted: Sat Nov 04, 2006 1:11 am    Post subject: Re: Read the sysout (spool) of a job and get a value using c
Reply with quote

Hi Rasheed & Vamsi
Thanks for ur replies .

but what i actually wanted to know is can i read the spool from a program.

I can't do sysout into a file or write the spool in a file itself , these are production jobs and i need to modify many of them thats a big task and probably business will not allow.
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Sun Nov 05, 2006 6:06 am    Post subject: Re: Read the sysout (spool) of a job and get a value using c
Reply with quote

Sorry, I don't know if there is a way to do that.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Nov 05, 2006 11:26 am    Post subject:
Reply with quote

You can issue SDSF command from within COBOL. Among those commands, you can browse through outputs and PRINT.

For more information about batch SDSF, please refer to the fine manual.

O.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


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