ISREDIT MACRO NOPROC (AWORD, BWORD)                                     00010000
    CONTROL NOFLUSH NOPROMPT NOLIST NOMSG                               00020000
/*  CONTROL MSG LIST CONLIST SYMLIST                                    00030000
    ISPEXEC CONTROL ERRORS RETURN                                       00040000
ISREDIT (AROW, ACOL) = CURSOR                                           00050000
ISPEXEC VPUT (AROW ACOL) PROFILE                                        00060000
IF &STR(&AWORD) ^= &Z THEN +                                            00070000
   DO                                                                   00080000
     GOTO FINDIT                                                        00090000
   END                                                                  00100000
                                                                        00110000
IF &AROW = 0 | &ACOL = 0 THEN +                                         00120000
   DO                                                                   00130000
     SET &ZEDSMSG = &STR(PLACE CURSOR BOZO)                             00140000
     SET &ZEDLMSG = &STR(MUST SUPPLY STRING OR PLACE CURSOR IN+         00150000
                     EDIT AREA)                                         00160000
     ISPEXEC SETMSG MSG(ISRZ000)                                        00170000
     EXIT CODE(1)                                                       00180000
   END                                                                  00190000
ISREDIT PROCESS                                                         00200000
ISREDIT (ALINE) = LINE .ZCSR                                            00210000
SET &ABEG = &ACOL                                                       00220000
IF &SUBSTR(&ABEG:&ABEG,&ALINE) = &Z THEN +                              00230000
   DO                                                                   00240000
     SET &ZEDSMSG = &STR()                                              00250000
     SET &ZEDLMSG = &STR(MUST SUPPLY STRING OR PLACE CURSOR ON +        00260000
                       THE WORD)                                        00270000
     ISPEXEC SETMSG MSG(ISRZ000)                                        00280000
     EXIT CODE(8)                                                       00290000
   END                                                                  00300000
                                                                        00310000
DO WHILE (&SUBSTR(&ABEG:&ABEG,&ALINE) ^= &Z) AND (&ABEG > 1)            00320000
   SET &ABEG = &ABEG - 1                                                00330000
END                                                                     00340000
IF &SUBSTR(&ABEG:&ABEG,&ALINE) = &Z THEN +                              00350000
   DO                                                                   00360000
   SET &ABEG = &ABEG + 1                                                00370000
END                                                                     00380000
IF &STR("&SUBSTR(&ABEG:&ABEG,&ALINE))" = &STR("(" THEN +                00390000
   DO                                                                   00400000
   SET &ABEG = &ABEG + 1                                                00410000
END                                                                     00420000
SET &AEND = &ABEG + 1                                                   00430000
                                                                        00440000
ISREDIT (DROW, DCOL) = DISPLAY_COLS                                     00450000
                                                                        00460000
DO WHILE (&SUBSTR(&AEND:&AEND,&ALINE) ^= &Z) AND (&AEND < &DCOL)        00470000
   SET &AEND = &AEND + 1                                                00480000
END                                                                     00490000
IF &SUBSTR(&AEND:&AEND,&ALINE) = &Z THEN +                              00500000
   DO                                                                   00510000
   SET &AEND = &AEND - 1                                                00520000
END                                                                     00530000
IF &STR("&SUBSTR(&AEND:&AEND,&ALINE))" = &STR(".") THEN +               00540000
   DO                                                                   00550000
   SET &AEND = &AEND - 1                                                00560000
END                                                                     00570000
IF &STR("&SUBSTR(&AEND:&AEND,&ALINE))" = &STR("))" THEN +               00580000
   DO                                                                   00590000
   SET &AEND = &AEND - 1                                                00600000
END                                                                     00610000
                                                                        00620000
SET &AWORD = &SUBSTR(&ABEG:&AEND,&ALINE                                 00630000
SET &ACOL  = &ABEG                                                      00640000
   ISREDIT CURSOR = (AROW, ACOL)                                        00650000
FINDIT: +                                                               00660000
ISREDIT FIND PREV &AWORD &BWORD                                         00670000
SET &RC = &LASTCC                                                       00680000
SET &YY = &STR(AWORD)                                                   00690000
ISREDIT (FC) = FIND_COUNTS                                              00700000
SET &FC = &SUBSTR(6:8,&FC)                                              00710000
IF  &SUBSTR(1:1,&FC) = 0 THEN +                                         00720000
   DO                                                                   00730000
    SET &FC = &SUBSTR(2:3,&FC)                                          00740000
    IF  &SUBSTR(1:1,&FC) = 0 THEN +                                     00750000
       DO                                                               00760000
         SET &FC = &SUBSTR(2:2,&FC)                                     00770000
       END                                                              00780000
   END                                                                  00790000
IF &RC = 0 THEN +                                                       00800000
   DO                                                                   00810000
     SET &ZEDSMSG = &STR(AT PREV "&AWORD")                              00820000
     SET &ZEDLMSG = &STR()                                              00830000
     ISPEXEC SETMSG MSG(ISRZ000)                                        00840000
     EXIT CODE(0)                                                       00850000
   END                                                                  00860000
ELSE +                                                                  00870000
   DO                                                                   00880000
   ISREDIT CURSOR = (AROW, ACOL)                                        00890000
   IF &RC = 4 THEN +                                                    00900000
    DO                                                                  00910000
     SET &ZEDSMSG = &STR("&AWORD" NOT FOUND FELLA)                      00920000
     SET &ZEDLMSG = &STR(RETRY OR PF5)                                  00930000
     ISPEXEC SETMSG MSG(ISRZ000)                                        00940000
     EXIT CODE(0)                                                       00950000
   END                                                                  00960000
   ELSE +                                                               00970000
   IF &RC > 4 THEN +                                                    00980000
    DO                                                                  00990000
     SET &ZEDSMSG = &STR(PUT STRING IN QUOTES)                          01000000
     SET &ZEDLMSG = &STR(PUT QUOTES AROUND THE STRING)                  01010000
     ISPEXEC SETMSG MSG(ISRZ000)                                        01020000
     EXIT CODE(1)                                                       01030000
   END                                                                  01040000
END                                                                     01050000
STOP: +                                                                 01060000
END                                                                     01070000
