Brad -
1) Perhaps you missed the first line of my original post:
  The system is running on IBM i V7.1
2) I also indicated that I need the /actual/ spooled file name (“WINGNUT”)
   created when the printer file was opened with the
   OVRPRTF FILE(QSYSPRT) SPLFNAME(WINGNUT) in effect,
   not the name referenced internally.
3) Results obtained when using the INFDS as defined below:
   FIIFIL = ‘QSYSPRT’
   FIFILE = ‘QSYSPRT’
   FISPNO = 0007
JDE copy book for the INFDS.
(Original JDE RPG/400 code which was run through CVTRPGSRC).
    D* 
00001
    D*  This member contains the structure of the file information
    D*  data structure (INFDS).  This data structure may be defined
    D*  for any file in your RPG program by specifying an INFDS
    D*  continuation record for the file description specification
    D*  of the desired file.  You will have to specify the desired
    D*  data structure name both in the file description specification
    D*  and the data structure specification.
    D*
    D*  Portions of this data structure are loaded at the time the
    D*  file is opened, other portions of this data structure are
    D*  loaded as you perform I/O on the file.
    D*
    D DSXXX           DS
    D*           Internal program file name
    D  FIIFIL                 1      8
    D*           Open indication (1=OPEN)
    D  FIOPEN                 9      9
    D*           End Of File indication (1=End of file)
    D  FIEOF                 10     10
    D*           Status code (09999=I/O Error)
    D  FISTAT                11     15  0
    D*           Operation code
    D  FIOPCD                16     21
    D*           Name of RPG routine exception/error occured
    D  FIROUT                22     29
    D*           RPG source statement sequence number
    D  FISEQN                30     37
    D*           User-Specified reason for error on *SPECIAL file
    D  FIRESN                38     42  0
    D*           Recore format being processed (External file)
    D*           Record ID (Left justified for internal file)
    D  FIFRMT                38     45
    D*           Machine OR CPF message number
    D  FIEXNO                46     52
    D*           Machine instruction/Object definition template number
    D  FIMI                  53     56
    D*           UNUSED
    D  FIFLR1                57     80
    D*           Open data path type (DS-Device DB-Data Base SP-Spool)
    D  FIODP                 81     82
    D*           Name of file actually opened
    D  FIFILE                83     92
    D*           Name of library containing file (Blank if spool file)
    D  FILIBR                93    102
    D*           Name of spooled file (set only on spool files)
    D  FISPNM               103    112
    D*           Name of library where spooled file is located
    D  FISPLB               113    122
    D*           Spooled file number (set only on spool files)
    D  FISPNO               123    124B 0
    D*           Primary record length (bytes transferred at a time)
    D  FIPRCL               125    126B 0
    D*           Secondary record length (bytes transferred at a time)
    D  FISRCL               127    128B 0
    D*           Member Name:
    D*                        .  If ODP type is DB, this entry is the
    D*                           member name in file named in position
    D*                           83 through 92.
    D*                        .  If ODP type is SP, this entry is the
    D*                           member name in the file named in
    D*                           positions 103 through 112.
    D*
    D  FIMBR                129    138
    D*           Input buffer length (zero if no buffer allocated)
    D  FIIBLN               139    142B 0
    D*           Output buffer length (zero if no buffer allocated)
    D  FIOBLN               143    146B 0
    D*           Device Class (supplied only if ODP type is DS or SP)
    D*             1 = Display
    D*             2 = Printer
    D*             3 = Card
    D*             4 = Diskette
    D*             5 = Tape
    D  FIDVCL               147    148B 0
    D*           Diskette location(value from 1 to 23 = slot location)
    D  FIDKLC               149    151
    D*           Number of rows on display screen or lines on a page
    D  FIVDRW               152    153B 0
    D*           Number of columns on display screen or printed line
    D  FIVDCM               154    155B 0
    D*           Number of records in file at time of open
    D  FIRCNT               156    159B 0
    D*           Access type (only supplied if ODP type is DB)
    D*             KU = Keyed, Unique
    D*             KF = Keyed, FIFO W/Duplicate keys
    D*             KI = Keyed, LIFO W/Duplicate keys
    D*             AR = Arrival sequence
    D  FIACTY               160    161
    D*           Duplicate key indication (D=Allowed U=Not allowed)
    D  FIDUPK               162    162
    D*           Source file indication (Y=Source file)
    D  FISRCI               163    163
    D*           User file control block parameters in effect
    D  FIFCBP               164    173
    D*           User file control block overrides in effect
    D  FIFCBO               174    183
    D*           Offset to volume label fields of open feedback
    D*             (Supplied only for tape or diskette)
    D  FIOVLF               184    185B 0
    D*           Number of records to be transferred on file open
    D  FIRTFO               186    187B 0
    D*           Overflow line number (printer files only)
    D  FIOFLN               188    189B 0
    D*           UNUSED
    D  FIFLR2               190    240
    D*           Offset to device dependent feedback information
    D*             (See Appendix D of the CPF Programmer's Guide for
    D*              layout of feedback information for specific
    D*              devices)
    D  FIODFB               241    242B 0
    D*           Put operation count
    D  FIPUTC               243    246B 0
    D*           Get operation count
    D  FIGETC               247    250B 0
    D*           PutGet operation count
    D  FIPGC                251    254B 0
    D*           Non-I/O operation count (update of subfile records)
    D  FINIOC               255    258B 0
    D*           Current operation (Last operation requested)
    D*             X'01' = Get
    D*             X'02' = Get W/Subfile record number
    D*             X'03' = Get by key
    D*             X'05' = Put
    D*             X'06' = PutGet
    D*             X'07' = Update
    D*             X'08' = Delete
    D*             X'09' = Force End of Data
    D*             X'0D' = Release
    D  FICOPR               259    260
    D*           Name of record format just processed:
    D*             .  Specified on the I/O request, or
    D*             .  Determined by default processing
    D  FICFMT               261    270
    D*           Device Class
    D*             Position 271
    D*             X'00' = Data Base
    D*             X'01' = Keyboard display
    D*             X'02' = Printer
    D*             X'03' = Card
    D*             X'04' = Diskette
    D*             X'05' = Tape
    D*             Position 272 (If position 271 contains X'00')
    D*             X'00' = Nonkeyed file
    D*             X'01' = Keyed file
    D*             Position 272 (If position 271 not X'00')
    D*             X'00' = 5250 Display station, 960 characters
    D*             X'01' = System console, 1024 characters
    D*             X'02' = 5256 Printer
    D*             X'03' = 5211/3262 Printer
    D*             X'04' = MFCU
    D*             X'05' = 3411/3410 Tape
    D*             X'06' = 72M Diskette
    D*             X'07' = 5250 Display station, 1920 characters
    D*             X'08' = Spooled
    D  FIDCLS               271    272
    D*           Device name (Last completed operation)
    D  FIDNAM               273    282
    D*           Length of last I/O record processed
    D  FILIOL               283    286B 0
    D*           Routing data information
    D  FIRDTA               287    366
    D*           Current line number within a printer page
    D  FICLNO               367    368B 0
    D*           AID character indication:
    D*             X'F1' = Enter/Rec Adv
    D*             X'F5' = Roll up
    D*             X'F4' = Roll down
    D*             X'F6' = Print
    D*             X'F8' = Home
    D*             X'BD' = Clear
    D*             X'F3' = Help
    D*             X'3F' = Auto Enter
    D*             X'31' = Command KEY 01
    D*             X'32' = Command Key 02
    D*             X'33' = Command Key 03
    D*             X'34' = Command Key 04
    D*             X'35' = Command Key 05
    D*             X'36' = Command Key 06
    D*             X'37' = Command Key 07
    D*             X'38' = Command Key 08
    D*             X'39' = Command Key 09
    D*             X'3A' = Command Key 10
    D*             X'3B' = Command Key 11
    D*             X'3C' = Command Key 12
    D*             X'B1' = Command Key 13
    D*             X'B2' = Command Key 14
    D*             X'B3' = Command Key 15
    D*             X'B4' = Command Key 16
    D*             X'B5' = Command Key 17
    D*             X'B6' = Command Key 18
    D*             X'B7' = Command Key 19
    D*             X'B8' = Command Key 20
    D*             X'B9' = Command Key 21
    D*             X'BA' = Command Key 22
    D*             X'BB' = Command Key 23
    D*             X'BC' = Command Key 24
    D  FIAID                369    369
    D*           Cursor line in hex (display files only)
    D  FICURL               370    370
    D*           Cursor position in hex (display files only)
    D  FICURP               371    371
    D*             Note:  By simply defining a 2 byte binary field
    D*                    and moving the cursor line/position field
    D*                    into it right justified you will have the
    D*                    numerical value of the line/position field.
    D*                    Remember the binary field must be set to
    D*                    zero prior to the move.
    D*
    D*           Number of records transmitted
    D  FIRTRM               371    372B 0
    D*           UNUSED
    D  FIFLR4               373    375
    D*           RRN of last subfile record written/updated
    D  FISRRN               376    377B 0
    D*           RRN of first subfile record on display
    D  FISRCN               378    379B 0
    D*           UNUSED
    D  FIFLR5               378    396
    D*           RRN of data base record
    D  FIRRN                397    400B 0
    D*           Data base file key
    D  FIRKEY               401    528
Bradley Stone wrote:
Can you let us know what OS version you are running and show us your
declaration of the INFDS and spooled file number you're using?
Brad
www.bvstools.com
On Wed, Mar 18, 2015 at 8:04 PM, Steve Landess <sjl_abc@xxxxxxxxxxx> wrote:
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.
As an Amazon Associate we earn from qualifying purchases.