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



Today's machines are fast. Consider a solution where you have a loop which reads every record in the subfile. If the option field is not blank then process a subroutine. The last piece of the subroutine is to blank the option field and update that record in the subfile.

In other words, scrap all the MODIFIED stuff. Today's machines don't need the help and it takes a lot of lines of code out of your source.

Also, when I do this I load all the detail fields for the details display into a data structure which becomes a hidden field. The data structure becomes the parameter to PgmB so there is no need for a second chain for the record to get the detail data.



On 7/15/2016 11:48 AM, Stone, Joel wrote:
In pgmA, I am presenting a subfile with only the OPTION field input-capable.

If user selects a record by keying "5" into the OPTION field, then I call pgmB to display it.

When control returns to pgmA, I am not able to repeat the above.

I put the pgm into debug, and any record selected from the subfile with an option 5 does nothing, ie the subfile continues to display and ignores the option 5.


Its cobol, but don't let that scare you. Should be the same as RPG.

In the SFL pgmA, I am looping thru a READ NEXT MODIFIED to grab the next changed SFL record.

Using STRDBG, the OPTION field that should contain '5" shows only blank.



When pgmB returns to pgmA, do I have to somehow reset the SFL cursor back to the top? Or something else?

Thanks in advance!


when key-ENTER-pressed
perform select-entry until EOF-SFL

...




select-entry.
read subfile DISPLAY-FILE next modified
format is 'SFLX'
indicators are ws-screen-indicators
at end
set EOF-SFL to true
not at end
move link-userID to parm-userID
move SITE of SFLX-o to parm-site
move CSCTYPE of SFLX-o to parm-csctype
move CSC-N of SFLX-o to parm-csc-n

evaluate scr-opt of SFLX-o
when '5'
move space to scr-opt of SFLX-o
move 'N' to parm-update
call 'CMP702' using parm-key
end-evaluate
rewrite subfile DISPLAY-rec
format is 'SFLX'
indicators are ws-screen-indicators
end-rewrite
end-read


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.