12 FETCH and sub-procedures
**FREE ctl-opt ActGrp(*CALLER) DftActGrp(*NO); //********** Prototypes for Subprocedures ********** dcl-pr OpenCursor ind end-pr; dcl-pr FetchCursor ind end-pr; dcl-pr CloseCursor ind end-pr; //********** Stand Alones ********** dcl-s MyLib char(10); dcl-s MyFile char(10); //********** Main Loop ********** *inlr=*on; if not OpenCursor(); // perform error routine to alert the troops Else; Dow FetchCursor(); // putting the fetchcursor on the do loop allows the user of // iter, and thus iter will not perform an infinite loop // normal processing here... EndDo; CloseCursor(); EndIf; return; //********** OpenCursor ********** dcl-proc OpenCursor; dcl-pi OpenCursor like(ReturnVar) end-pi; dcl-s ReturnVar ind; // The immediately following /EXEC SQL is SQL's version...