/* Position the cursor, then TBSCAN . ----------------------------------------------------------------- */ Z_REFIND: /*@ */ if branch then call BRANCH address ISPEXEC "TBSKIP" $tn$ "ROW("lastfnd") NOREAD" call Z_TBSCAN /* -*/ pfkey = "" /* prevent re-use */ return /*@ Z_REFIND */ /* The table is positioned to find a row and the argument is set. . ----------------------------------------------------------------- */ Z_TBSCAN: /*@ */ if branch then call BRANCH address ISPEXEC "TBSCAN" $tn$ "ROWID(LASTFND) POSITION(LASTCRP)" /* set LASTFND and LASTCRP if successful */ if rc = 8 then do /* not found */ zerrsm = "Not found" if pfkey = "F5" then, zerrlm = "End of table encountered." else, zerrlm = "No rows found to match" fld"="val zerrlm = exec_name "("BRANCH("ID")")", zerrlm address ISPEXEC "SETMSG MSG(ISRZ002)" end /* not found */ "TBSKIP" $tn$ "ROW("lastfnd") NOREAD" /* position to LASTFND */ return /*@ Z_TBSCAN */