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



"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 07/19/2016
11:50:35 AM:
Do you ever have lines of code between the write and the read?

Depends upon how you define "code" I guess. I compile without the
RPG cycle using a main procedure as follows. All output and input are
separated from each other using two subprocedures. In this case, the last
statement in the output procedure is a WRITE and the first statement in
the input procedure is a READ. However, there could certainly be
additional statements after the WRITE or before the READ to set indicators
on and off and/or to reset or clear data structures, etc.

dcl-proc ACTMPS2R; // main procedure
dcl-pi *n extpgm;
pPgmName like(gPgmName);
pKeyData likeds(TrgMgt_KeyData);
end-pi;

callp Initialize(pPgmName: pKeyData); // do one time on entry

dow more_input // do until requested termination
and gPgmName = PROC_PGM; // or different program requested
callp DisplayTheScreen(); // send display to workstation
callp ProcessTheScreen(); // process input from workstation
enddo;

callp Cleanup(pPgmName: pKeyData); // do one time on exit

return; // return to caller
end-proc;


Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.