× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I had discovered the ownership issue and that's why I wanted to know if
there was a way around it. I had tried the SPLFOWN(*JOB) on the OVRPRTF
command, but that didn't work either.

Anyway, many thanks to everyone for the responses.

James


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Connell
Sent: Tuesday, February 10, 2009 6:08 PM
To: RPG programming on the IBM i / System i
Subject: RE: CGI Spool File from WRKACTJOB

James,
It appears that this problem could be related to the fact that it is
commonly overlooked that spool files generated by HTTP job have one
significant difference, which is the owner of the spool file.

Since server jobs, for example an HTTP server, process requests on
behalf of a client, IBM boots the server under a nominated user profile
but swaps to another for each request then back again. Consequently,
objects created during the request are owned by the swap profile.
Hence, the spool file will be owned by QTMHHTP1 not QTMHHTTP. If the
HTTP server has been configured for log in using an OS400 profile
specifying UserID %CLIENT then the server will swap to the OS400 user
profile and the spool file will be owned by that user. A side effect to
this is that the spool file is no longer associated with the server job
but to a system job named QPRTJOB, which is essentially a fake (never
active) job.

However, a spool file can be retained by the original profile and job,
in this case QTMHHTTP simply by specifying the keyword SPLFOWN(*JOB) on
either the CHGPRTF or OVRPRTF command. Then it behaves just as you would
expect with a regular green screen job.

Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Boman, James
Sent: Wednesday, 11 February 2009 0:41
To: rpg400-l@xxxxxxxxxxxx
Subject: CGI Spool File from WRKACTJOB

I have an RPGLE CGI job that is performing a WRKACTJOB to *PRINT and I
want to use the spooled file to build a list of active jobs on the
system. I am performing an override of the file before running the
WRKACTJOB command, so the spool file is being created. The problem is
the HTTP job is running under QTMHHTTP and the spool file is created
under the user QTMHHTP1.



How can I control this so the spool file is shown under QTMHHTTP or is
there another way to retrieve the spool file?



I can perform this process from a green screen session and it works
correctly.



I had tried several of the IBM API's, but they are very slow.



Any help would be appreciated.



James Boman




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-2024 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.