|
I hope you can help me with this one, I'm confused. I have 2 subfiles. My main file which is internally described in the program. The second one is a subfile and is externally described. The first internally described subfile contains 2 records, the main screen, which is supposed to overlay either the subfile record in the other file, or another record in the same file. In my program I can display the subfile record, then overlay the main record and it works well. In my program I can display the 2nd internal record, then overlay the main record, and it works well. Here's the problem: If I every show the 2nd internally described record then I can never display the subfile record. That is, I want to be able to alternate between the two, and I can't. It seems that when the READ statement for the main subfile is reached, it redisplays the 2nd internally described file record, even though I am not writing it that cycle. I don't know how to make it disappear, other than closing the program and reopening the program. I have considered trying to close the main display file and reopening it, but I don't think I'd like the performance hit that would get me. Here's some snippets of details: ---------------------------------------------------- STR002FM (Internally described file) A R DUMMY A ASSUME A 1 30'DUMMY RECORD' A R S1 ... A SLNO(01) A CLRL(12) A OVERLAY ... A R S4 A KEEP ---------------------------------------------------- STR002FN (Externally described subfile) A R DUMMY A ASSUME A 13 10'DUMMY' A R SFLHEAD A KEEP ... A R SFLCTL SFLCTL(SUBFILE) A OVERLAY A KEEP A 46 SFLDSP A N45 SFLDSPCTL A 45 SFLCLR A 49 SFLEND ... ---------------------------------------------------- My Program snippet: FSTR002FM CF F 1920 WorkStn FSTR002FN CF E WorkStn SFile(SubFile:SF_RecNum) D ShowSubFile S Like(*IN01) Inz(*On) C Eval *IN46 = *On C If ShowSubFile C Write SflHead C Write SflCtl C Else C Except S4 C EndIf C EXCEPT S1 **** >>> This is where S4 gets shown even if it's not on the display when this is reached (seen in debug) C READ STR002FM 06 C If *INKC C Eval *INLR = *On C EndIf C If *INKU C Eval ShowSubfile = NOT ShowSubfile C EndIf OSTR002FM E S1 O K2 'S1' OSTR002FM E S4 O K2 'S4' Regards, Jim Langston Me transmitte sursum, Caledoni! +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.