|
Dan Yes, after updating the subfile record with SFLNXTCHG turned on, a READC on the subfile should pick up that record. At first glance, shouldn't your READC be against MAPTRA1S, the actual subfile record? What's UGLTRA1S? Could you possibly post more of the code to code.midrange.com and post the link to it back here? Thanks Bob Cagle IT Manager Lynk, Inc. -----Original Message----- From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan Sent: Wednesday, May 13, 2015 10:17 AM To: RPG400-L@xxxxxxxxxxxx Subject: SFLNXTCHG head-scratcher It's been several years... meh, a decade since I last worked with subfiles prior to this job I started a few months ago. Have a situation where SFLNXTCHG is not working as I expect it to. DSPF: A R MAPTRA1S SFL A 39 SFLNXTCHG RPGLE: FMAPTRADF CF E WORKSTN INFDS(INFDS) F SFILE(MAPTRA1S:RRNSF1) F INDDS(DS@INDDS) ... D DS@INDDS DS d SflNxtChg 39 39n ... *** A field defined in the subfile record is updated by the program, then... c Eval SflNxtChg = *on SFLNXTCHG (for READC C UPDATE MAPTRA1S c Eval SflNxtChg = *off SFLNXTCHG reset ---> At this point, should a READC pick up the record that was just updated? In the program I'm modifying, the next I/O operation on the workstation file is a READC on the subfile. Does there need to be an intervening EXFMT / WRITE of the subfile control record? I tried a "1 SETLL MAPTRA1S" after the update above, but the compiler isn't buying it. (Also tried *LOVAL in factor 1.) Here is the code with the EOF test: C READC(E) UGLTRA1S C DOW %EOF = *OFF Given the earlier code, I would have expected the READC to find the updated record, but debug is showing that %EOF is *on, and is skipping the DOW group. Ideas, advice appreciated! - Dan
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.