Ciao,
take in perspective that you are basically doing a sort of remote procedure call when involving xmlservice (i.e. via php toolkit).
You call into a different process/job to which you are delegating work to (outside of the apache job).
It detaches spools maybe because of user handle swap or the setting in the job.
QSPRILSP should give the last coordinate for the (detached) spool.
But be aware of the execution model of the server job, if a job/process is "shared" it can technically provide, according to the conditions of the case, logics etc., the spool of a previous user.

Have a look at these IBM pages:

https://www.ibm.com/support/pages/retrieving-spooled-files-generated-host-server-job
https://www.ibm.com/support/pages/finding-and-working-spooled-files-generated-under-qprtjob-job







On Wednesday, April 1, 2026 at 07:23:42 AM GMT+2, Don Brown via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:





Hi All,

I am totally confused by what I am seeing and am hoping it is something obvious to one of you.

Let me walk you through the scenario.

System is V7R5 and current on PTF's as of a couple of weeks ago.

I am running Seidens Community Edition PHP which is using XMLService.

I was testing a change to a php page that called a service program to generate a PDF. In my testing I found the library list was missing a library. The library list is controlled by a job description assigned to the user being used for the web page.

I ended the XMLSERVICE job.

I reran my test and a spool file was created

In job 262585/PHPUSERLEG/XMLSERVICE the joblog shows the messages generated by the process to create the PDF.

The process is as follows.

Php script calls service program SRVPGM001 (Activation group *CALLER)

SRVPGM001 calls program to create the spool file (PGM001) (Activation group GRP001)

PGM001 calls a service program to copy the spool file to a PDF (Activation group *CALLER)
The Program Status Data Structure is used to retrieve the job name, user and job number.
The INFDS for the printer file is used to retrieve the Spool file name and spool number.

In this joblog there is an error CPF3342 Job 262585/PHPUSERLEG/XMLSERVICE not found generated by the CPYSPLF command.

Checking further I found the spool file that was to be copied but the job name has me stumped.

The job name is JOB(262482/PHPUSERLEG/QPRTJOB).

This job is not active but has all the spool files from my testing and is the reason the CPYSPLF is failing as the job details are incorrect.

Where is this QPRTJOB getting created and how would I retrieve this job name to be able to use the CPYSPLF ?

After further searching I think because the XMLSERVICE job is a prestart job that this may be working as designed but I have not found a document that explains that ... yet.

I also found API QSPRILSP to retrieve the last closed spool file created by the current job or thread. I think this may do what I need - has anyone used this before for this reason ?

Thanks
Don


Brisbane - Sydney - Melbourne


Don Brown

Senior Consultant




P: 1300 088 400




DISCLAIMER. Before opening any attachments, check them for viruses and defects. This email and its attachments may contain confidential information. If you are not the intended recipient, please do not read, distribute or copy this email or its attachments but notify sender and delete it. Any views expressed in this email are those of the individual sender

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.