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.