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



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