Page 1 of 1

pulling Spool data using COBOL

PostPosted: Wed Mar 28, 2012 4:57 pm
by Sivapradeep
can anyone tell me how to collect the spool data like SYSTEM RESOURCES into a PS file using COBOL program instead of REXX?

Re: pulling Spool data using COBOL

PostPosted: Wed Mar 28, 2012 5:46 pm
by MrSpock
How would you accomplish this using REXX? I'm asking because maybe you could use the same process.

Re: pulling Spool data using COBOL

PostPosted: Wed Mar 28, 2012 6:24 pm
by Sivapradeep
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.

Re: pulling Spool data using COBOL

PostPosted: Wed Mar 28, 2012 7:10 pm
by steve-myers
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.

Re: pulling Spool data using COBOL

PostPosted: Thu Mar 29, 2012 12:19 am
by dick scherrer
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.