- As long as you know the name of the spoolfile (SplName) and you go after the information before printing the next one of that name you can use the following in a CL retrieving the USER, JOB NUMBER and the SPL NUMBER RTVSPLFID SPLF(SplName) SPLNBR(*LAST) RTNUSER(&SPUSER) + RTNJOBNBR(&SPJOBN) RTNSPLNBR(&SPLFNO)
report - I apoligize in advance if this isn't the right way to answer replies; but unfortunately I think I need some more input for the former two replies: ------------------------------------------------------- I guess I wasn't specific; I tried to use RTVJOBA, then I tried to use QUSRJOBI; they both came back with the actual Job information. (Job: VOI; User: QTMHHTTP; Number: 303484) I also tried to do a WRKJOB on the HTTP job, but couldn't find anything to tell me where that spoolfile was going. ---------------------------------------------------------- I don't see RTVSPLFID on this AS400, and I see that it's a TAA productivity tool. I'm pretty low on the upgrading chain of command I'm afraid, esp if it's something that requires payment. Is there any other way to retrieve this information?
report - Sorry about that. We use the RTVSPLFID so much that I didn't even realize that it was from our old copy of TAATOOLS.
report - QPRTJOB is a job that is automatically created by the system when your job tries to create a spool file and the job's current user ID is different to the user ID that the job is running under. For example, in your GUI application, the HTTP server job starts running under user QTMHHTTP. When you then logon to the job as, for example, user JDOE the system recognises that the current user profile has changed and directs all spooled output to job QPRTJOB/JDOE/nnnnnn. Each QPRTJOB can hold up to 9999 spool files, after which a new QPRTJOB job is created for the user. The QPRTJOB remains active and is re-used until either 9999 spool files are created for the job, or all spool files for the job have been deleted and there have been no more spool files written for 24 hours. I would try using the QUSLJOB (List Jobs) API, specifying a job name of QPRTJOB/user_id/*ALL and a status of *ACTIVE. This should create an entry in a user space which you can then interrogate to get the full job name back. Hope it helps Jonathan
report
![Retrieve Spool File Attributes As400 Retrieve Spool File Attributes As400](/uploads/1/2/5/8/125857907/387197119.png)
JT400 - Get spool file generated by a command. I found out that the command runs in a JOB with the user QUSER, but an spool file with the result is generated under the user 'user' specified when I instantiate the object AS400. I can successfully run the command, but instead of the messages in the queue I have as result: 'Printer output created.'