×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Steve,

As Jim pointed out, you can easily get the spooled file number from the
INFDS and it is the proper size. I don't see how using an API would be any
easier than that.

The reason I asked to see how you were defining the INFDS was to show you
it wasn't 4 if it was done correctly.

Brad
www.bvstools.com

On Thu, Mar 19, 2015 at 7:15 AM, Steve Landess <sjl_abc@xxxxxxxxxxx> wrote:

Alan-
Sounds interesting, can you share them?
-sjl

"Alan Campin" wrote in message news:mailman.2000.1426743320.
14083.rpg400-l@xxxxxxxxxxxx...

I created some service programs that wrapper the spool file api's if you
are interested.

I have a short(Runs listing directly) version and a long(Use List api for
long running) version.

Just call functions to set spool attributes you want and call and you get
back a list with all the information.

On Wed, Mar 18, 2015 at 10:24 PM, midrange <franz9000@xxxxxxxxx> wrote:

It's a binary nbr so not 4.0 but 9.0

FADRSQL7P O E PRINTER OFLIND(*IN88)
F INFDS(@INFDS1)
D* * * * * * * * * * * * * * * * * * * * *
D* PRINTER FILE INFORMATION DATA STRUCTURE
D* * * * * * * * * * * * * * * * * * * * *
D @INFDS1 DS
D @FILE1 1 8
D @SPLF#1 160 163B 0
D @LINE#1 367 368B 0

Jim


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve
Landess
Sent: Wednesday, March 18, 2015 9:05 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Retrieving spooled file information inside an RPG program

IBM i System running V7.1
----------------------------------

I'm working in a JDE shop using the standard JDE copy books for the file
information data structure.

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?

-sjl

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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 (AS/400 and iSeries) (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 (AS/400 and iSeries) (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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.