|
The program is functioning as written. The O spec has a Detail line,
and has no indicators on that line, so it will output each time.
Since there are no other fields on that record besides RCDOUT, you
are getting a blank line, because RCDOUT only appears on the line
when LR is on.
I******* ^^-- the 01 is not valid here; see below
If you always want an output line for each input, then remove the LR
indicator on the field RCDOUT and also remove the SETON LR
calculation line. In a simple file copy program, you would want all
input to be copied to output, so let RPG manage LR for you. Because
S36INP is defined as a Primary file, RPG will turn on LR when all
records have been read from S36INP.
I would also remove the "XX" from the input spec and replace it with
a indicator. Then condition the O spec with that indicator.
Like this:
FS36INP IP F 55 DISK
FS36OUT O F 55 DISK A
E ARRY 1 3 8
I* .1....+....2....+....3....+....4....+....5....+....6....+.
IS36INP 01
I 1 55 RCDINP
C MOVE ARRY,2 ARRY,3
C MOVE RCDINP RCDOUT 55
C* .1....+....2....+....3....+....4....+....5....+....6
OS36OUT DADD 01
O RCDOUT 55
**
COMPILE
TIME
ARRAY
Hope this helps,
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.