Did you specify OVRSCOPE(*JOB) as required?
Peter
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Boman, James
Sent: Wednesday, 11 February 2009 7:46 a.m.
To: RPG programming on the IBM i / System i
Subject: RE: CGI Spool File from WRKACTJOB
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
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
########################################################################
#############
This correspondence is for the named person's use only. It may contain
confidential or legally privileged information, or both. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this correspondence in error, please immediately delete
it from your system and notify the sender. You must not disclose, copy
or rely on any part of this correspondence if you are not the intended
recipient. Any views expressed in this message are those of the
individual sender, except where the sender expressly, and with
authority, states them to be the views of Veda Advantage. If you need
assistance, please contact Veda Advantage on either :- Australia 133124
or New Zealand +64 9 367 6200
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
#####################################################################################
This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Veda Advantage. If you need assistance, please contact Veda Advantage on either :- Australia 133124 or New Zealand +64 9 367 6200
As an Amazon Associate we earn from qualifying purchases.