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: Jan 31, 2012  2:46 PM GMT
UPDATED: March 17, 2012  5:57:47 AM GMT
66,935 pts.

Answer Wiki:
Last Wiki Answer Submitted:  Mar 17, 2012  5:57 AM (GMT)  by  TomLiotta   66,935 pts.
Latest Answer Wiki Contributors:  Rebek4love   3,500 pts.
To see other 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

 24,725 pts.

 

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

 36,420 pts.

 

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

 36,420 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

 36,420 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

 66,935 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.

 4,945 pts.

 

[...] 4. Philpl1jb and CharlieBrown show Bonx how to get to the job attributes of an old spool file. [...]