View previous topic :: View next topic
|
Author |
Message |
ramp_senti
New User
Joined: 17 Mar 2006 Posts: 26
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
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 |
|
|
ramp_senti
New User
Joined: 17 Mar 2006 Posts: 26
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Sorry, I don't know if there is a way to do that. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
|