|
In order to use the SFLDSP keyword you must have written data to the
sub-file record RECSFL first. Try this, since you almost always want to
display the sub-file header (control) record all the time, regardless if you
have detail or not, do not condition the keyword SFLDSPCTL. After you have
finished with loading data to the sub-file detail record, RECSFL, use the
RRN counter to condition *IN51.
Pseudo code
Clear subfile
Do while data to load
Add 1 to RRN counter
Write detail
End
If there are detail records
Set *IN51 = *ON
Do until F3 is pressed
EXFMT RECCTL
IF F3 was not pressed
Do something
End
End
Exit program with LR on.
Oh, and always make your RRN field(s) at least 4.0. You can put up to 9999
records into a sub-file. If you leave it at 3.0 to run the risk of getting
an error about attempting to write to a sub-file record that already exists.
Thank you,
Matt Tyler
WinCo Foods, Inc
mattt@xxxxxxxxxxxxxx
-----Original Message-----
From: Douglas W. Palme [mailto:dpalme@xxxxxxxxxxxxxxxxxxxxx]
Sent: Monday, November 22, 2004 10:19 a
To: RPG programming on the AS400 / iSeries
Subject: Unusual error that I cannto figure out
I am working with subfiles and thought I had this down, but unfortunately I
am getting an unusual error message when I try to run the program. Here is
the dds for the subfile and the program that is calling it.
All I am trying to do at the moment is display the subfile to the screen.
The error message is the following, which I have never seen before:
Job 182784/DPALME/QPADEV0010 started on 11/22/04 at 11:45:21 in subsystem BA
Session or device error occurred in file SUBFILE (C G D F).
Application error. RNX1255 unmonitored by JDEAL at statement 0000000014,...
Any suggestions or comments would be appreciated.
Douglas
DDS:
A*%%TS SD 20041122 114708 DPALME REL-V5R2M0 5722-WDS
A*%%EC
A DSPSIZ(24 80 *DS3)
A R RECSFL SFL
A*%%TS SD 20041122 114708 DPALME REL-V5R2M0 5722-WDS
A NOTES 75 B 3 5
A R RECCTL SFLCTL(RECSFL)
A*%%TS SD 20041122 114708 DPALME REL-V5R2M0 5722-WDS
A CA03(03)
A 51 SFLDSP
A 51 SFLDSPCTL
A 52 SFLCLR
A SFLSIZ(0016)
A SFLPAG(0015)
A 1 24'THIS IS THE CONTROL RECORD HEADER'
PGM:
*program: subfiler
Fsubfile CF E workstn
F sfile(recsfl:rrn)
Drrn s 3 0
C DOU *IN03
C EVAL *IN52 = *ON
C WRITE RECCTL
C EVAL *IN52 = *OFF
C EVAL *IN51 = *ON
C EXFMT RECCTL
C ENDDO
C EVAL *INLR = *ON
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.