5 pts.
 How to get the Job attributes of a relatively old spool file
how can I retrieve JOB(NUMBER/NAME/USER) of a spool file generated by other user few days ago, I know the spool file name and I am able to view all that I need through the command WRKSPLF and pressing F11, but I need to automate the process.

Software/Hardware used:
software
ASKED: January 31, 2012  2:46 PM
UPDATED: March 17, 2012  5:57 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Michael Tidmarsh   11,410 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Since you cannot output the WRKSPLF to a disk file, you can output to *PRINT then copy that to a disk file and write something to process that.
Not the best way.
*
The best would be to use an API to get the data that you want.
I am not familiar enough with them to tell you which one to use, but I am positive someone else will be able to give you that guidance.
Here is a link that may help
http://www.think400.dk/apier_8.htm

 32,915 pts.

 

Option 8 on an item in WRKSPLF will show that info.

 44,200 pts.

 

But I haven’t got an answer to programatically retriving this data.

 44,200 pts.

 

Of course .. let me get in the way back machine, I’ve done this ..
wrksplf can be restricted as you described and output to *PRINT — this contains your info

Copy it to a file and extract your data.

Phil

 44,200 pts.

 

I know the spool file name and I am able to view all that I need …, but I need to automate the process.

What do you need to automate? Displaying the attributes of that spooled file? That would be easy, but I assume it’s something more complicated.

For example, I assume that you need a program to search through a list of spooled files for a user and to find the one with the known name and with the latest creation date. Or perhaps you know that a job with a known name runs every day, and you want a program to find the most recent job with that known name in order to locate the spooled file.

Or…? It isn’t clear what you want to happen in an automated process. Please provide a description of the desired process.

Tom

 108,330 pts.

 

hello you can find a number of API’s to transfer spool file into disk file or you can use FTP also. Than make a new job if you dont have authority to change other user job or you can do it with the simple command WRKUSRJOB search for the job there you can change the status of JOB or Schedule it also.

 100 pts.

 

If you list the contents of an output queue using the QUSLSPL and the SPLF0200 format you can retrieve the various attributes of the spool files including the job information.

IBM has an example here which includes a bit about the keys.

 5,670 pts.