pulling Spool data using COBOL



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

pulling Spool data using COBOL

Postby Sivapradeep » Wed Mar 28, 2012 4:57 pm

can anyone tell me how to collect the spool data like SYSTEM RESOURCES into a PS file using COBOL program instead of REXX?
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: pulling Spool data using COBOL

Postby MrSpock » Wed Mar 28, 2012 5:46 pm

How would you accomplish this using REXX? I'm asking because maybe you could use the same process.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: pulling Spool data using COBOL

Postby Sivapradeep » Wed Mar 28, 2012 6:24 pm

i don't know even that. but when i googled most of the search results were showing about "pulling spool data using rexx".
you can even find about this discussion using REXX in this link. other-ibm-tools/topic6411.html

i dont have much knowledge in REXX so i want to do using COBOL if possible.
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: pulling Spool data using COBOL

Postby steve-myers » Wed Mar 28, 2012 7:10 pm

Sivapradeep wrote:can anyone tell me how to collect the spool data like SYSTEM RESOURCES into a PS file using COBOL program instead of REXX?
Just exactly what do you mean by "SYSTEM RESOURCES?" My understanding of the term is z/OS resource data that is kept by z/OS and is not kept by, or known to JES.

On the other hand you may be referring to resource usage data that appears in the JESMSGLG and JESMSGLG datasets. There is no interface available to a Cobol program that would let your program retrieve these datasets.

The more recent z/OS releases have an interface that allows Rexx execs to use SDSF services, but I have never used these services. In any event, it should be possible to translate these services to Cobol terms, but I have no idea where to start.

You should clearly understand most of this data in generally inserted into the datasets by third party tools, and your program would have to extract the data by analyzing the text in the messages. Not so easy.

What's more, the third party tools that insert resource usage data into the JES datasets generally use SMF data passed to a defined z/OS exit routine. You are probably much better off analyzing the SMF data directly in your Cobol program rather than trying to invent a Cobol tool to read JES datasets.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: pulling Spool data using COBOL

Postby dick scherrer » Thu Mar 29, 2012 12:19 am

Hello,

Is this a one-time (or only a few) requirement?

If it is not to be a regular process, you might consider copying the spool file(s) to dasd from within your tso/sdsf session and then reading the file(s) into your cobol program. If you are not familiar with XDC, ask your system support people.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post