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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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
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: 2358
Location: Israel

PostPosted: Sun Nov 05, 2006 11:26 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top