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