btw
if this is a custom web thing where you just want the PDF... investigate if makes sense in your situation to avoid CPYSPLF by setting the pdf file directly tostmf in the override or the prtf.
ciao
On Wednesday, April 1, 2026 at 11:54:05 AM GMT+2, cesco via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
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.