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



Hi Shannon,

Not at all specific/unique. The same problem occurs all over the place on IBM i, with CGI programming, PHP calls, Java calls, etc.

This is the way it's always worked. Any application that uses the profile handle APIs or profile token APIs will do this. (Whether it calls the APIs directly, or the OS calls them for you, under the covers, in either case, the printouts come out as QPRTJOB)

As Charles already pointed out, the QSPRILSP API was created expressly for this purpose -- it's a foolproof way to get the spooled file identity of the last spooled file created in the job (even when QPRTJOB is used.) Works great.



On 9/21/2011 12:23 PM, Shannon ODonnell wrote:
This might be too "out there" for the list as it probably requires that you
have the same type of setup on your iSeries, but maybe someone else has
already discovered this problem and can help.

Here's the situation I have with a client:

I created an RPGLE program that I turned into a web service (running in the
iSeries Integrated Web Service Server).

The web service runs under a user profile named WEBSVC1 (that's an
important detail).

The RPG program, when it's called by the service, calls another CL program.

When the CL program initiates, I do a RTVJOBA command and store the job info
and then I dump it (DMPCLPGM) to see the job #, job name and user profile.

These values are: 02456/QZRCSRVS/QUSER

Next, the CL program calls another RPGLE program that creates a spooled
file. I retrieve the job info from the *SDS in that RPG and print it on the
printer file.

These values are: 02456/QZRCSRVS/QUSER

Which are the same as the CL (as you would expect).

However, when the processes all complete, if you WRKSPLF WEBSVC1 you find
the spooled file the second RPGLE program created and the job info on that
spooled file (if you F11 it so you can view that information) is:

02455/QPRTJOB/WEBSVC1

I have a vendor product (Keyes) that creates a PDF from that spooled file
and it finds it by you passing the job info of the spooled file to it.
However, in this case, I cannot figure out how to get the actual spooled
file's job information! I actually don't even understand why it's
different.

So as I said in the beginning.this problem might be too specific and too
unique to my setup for an easy solution, but I wanted to float it out here
anyway hoping someone might have some good suggestions on it.

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.