|
I've always had a template for doing this. I'll share it with you. ?*-Define data structures-------------------------------------------------------- ?* Error indicators for display file d DspInds ds d SflDsp n Overlay(DspInds : 40) d SflClr n Overlay(DspInds : 41) d SflEnd n Overlay(DspInds : 42) ? *------------------------------------------------------------------------------- ?* Clear subfile c Exsr Clear_Sub ?* Load subfile c Exsr Load_Sub ?* Loop until user presses F2 c DoU *Inkb ?* Write footer c Write Footer ?* Display subfile c Eval SflDsp = *On c Eval SflEnd = *On c Exfmt Header c Eval SflDsp = *Off c Eval SflEnd = *Off c EndDo c Eval *InLr = *On ?*---------------------------------------------------------- ?* Clear_Sub - Clear subfile ?*---------------------------------------------------------- c Clear_Sub BegSr ?* Reset rrn, clear subfile c Eval Rrn = 0 c Eval Rcd# = 1 c Eval SflClr = *On c Write Header c Eval SflClr = *Off c EndSr ?*---------------------------------------------------------- ?* Load_Sub - Load subfile ?*---------------------------------------------------------- c Load_Sub BegSr ?* Setup whatever loop for loading the subfile c Read File c DoW Not(%EOF(File)) ?* Check to see that this matches the street name selected ?* Load field values c Eval Sfopt = *Blanks c Eval Sfdsc = Some_Field ?* Increase RRN c Eval Rrn += 1 ?* Write subfile c Write Subfile c Read File c EndDo ?* If none found c If Rrn = 0 c Eval Sfopt = *Blanks c Eval Sfdsc = 'No Files Exist' c Eval Rrn += 1 c Write Subfile c EndIf c Endsr HTH, Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 Tel: 709-576-8132 Email: rpower@xxxxxxxxxx Website: http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Douglas W. Palme" <dpalme@xxxxxxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 23/03/2005 02:12 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG Group" <rpg400-l@xxxxxxxxxxxx> cc Subject Footer records in subfile display Today must not be my day, I keep running into problem after problem. I have a footer record which contains a display line to let the user know that pressing the F12 key will exit the program and to scroll you need to use the pgup or pgdwn buttons. It is set on line 23. In the DDS for the subfile I have the keyword overlay set for the CTL record and I have the keyword OVERLAY set on the footer1 record as well. In the rpgle code after I write all the records I am then writing the footer1 with a write statement. But for some reason it never displays on the screen. The subfile splsiz is 15 and the sflpag is 14 so I know its not overwriting the footer1 record and when it displays there is still room for it. Suggesitons? Hints? or tell me to get lost LOL -- This is the RPG programming on the AS400 / 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 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.