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



On 18-Mar-2015 20:04 -0500, Steve Landess wrote:
<<SNIP>>

In my RPGIV program, if an error occurs, after I close the error
report I want to copy the spooled file to a database file. Also,
before the printer file was opened, an OVRPRTF was executed to change
the name of the spooled file.

Example:
OVRPRTF FILE(QSYSPRT) SPLFNAME(WINGNUT)

Thus the report was created with the name 'WINGNUT'.

I need the actual spooled file name and spooled file number for
CPYSPLF.

From what I have observed,

1) The INFDS for the printer file does not give the full six-digit
spooled file number, only a 4-digit spooled file number.
2) The INFDS for the printer file also does not appear to have a
field containing the actual spooled file name which was opened.

How Do I get the full six-digit spooled file number and spooled file
name for the report?


Consider foregoing use of the INFDS entirely in that scenario, and just invoke an API to get the necessary info:
<http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/QSPRILSP.htm>
_Retrieve Identity of Last Spooled File Created (QSPRILSP) API_
"...
The Retrieve Identity of Last Spooled File Created (QSPRILSP) API returns the complete spooled file identity of the last spooled file created for the current job or thread.
..."


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.