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



I am missing something with a hidden field in a subfile. This in an enhancement to an old program, so it is fixed format with a mix of coding styles.

The application displays a subfile screen with about 15 records. The user chooses one by cursor position and presses enter.
Initially, all the program needed was the field GRDESC. Now I need a second field, GRALLY.
I added GRALLY , a hidden field, as seen in the A specs. The field will be either blank or Y.

When I read the subfile, the last record in GRDREC has the Y in GRALLY.

My rpg code chains to the subfile (in this case record #1). It retrieves the correct GRDESC and the corresponding field GRALLY should be blank.
Instead it is keeping the value Y from the last record read from GRDREC when I filled the subfile.

When debugging, each read of GRDREC that loads the subfile shows the correct value for each record. It's on the subsequent read of the subfile control I have a problem. Somehow my read only gets the first field, not the hidden field.





A R SFDRM3 SFL
A TEXT('subfile for quote')
A*
A GRDESC R O 1 2REFFLD(GRDREC/GRDESC SPC5LI
A GRALLY R H REFFLD(GRDREC/GRALLY SPC5LI





C EXFMT SFDRMCT3
C*
C WINCUR IFGT 0
C WINCUR CHAIN SFDRM3 99
C MOVE GRDESC QTDESC
C eval wkaloy = GRALLY




I don't think the problem is in the control record, but here it is:

A R SFDRMCT3 SFLCTL(SFDRM3)
A TEXT('subfile control quote
A N89 ROLLUP(86 'roll up')
A N88 ROLLDOWN(87 'roll down')
A INDTXT(80 'subfile display'
A INDTXT(81 'subfile control
A INDTXT(82 'initialize subfi
A INDTXT(83 'delete subfile')
A INDTXT(84 'clear subfile')
A INDTXT(85 'subfile end')
A OVERLAY
A SFLCSRRRN(&WINCUR)
A 80 SFLDSP
A 81 SFLDSPCTL
A 82 SFLINZ
A 83 SFLDLT
A 84 SFLCLR
A SFLSIZ(0040)
A SFLPAG(0010)
A 88 SFLMSG('Beginning of file h
A reached. Press reset.' 88)
A 89 SFLMSG('End of file has bee
A d. Press reset.' 89)
A WINDOW(10 3 13 40)
A WDWTITLE((*TEXT 'GRADE. PAG
A WINCUR 5S 0H




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.