ISREDIT MACRO (ID FIND)    /* CACM000U EDIT MACRO */
 
/*                                                               */
/* OPEN TEMP3 OR DSNLIST MEMBER IN CNTL                          */
/*   FOR EACH DATASET THAT HAS THE SPECIFIED ID VARIABLE A       */
/*   LIST OF MEMBERS IS SEARCHED FOR THE STRING SPECIFIED IN     */
/*   THE FIND VARIBLE.                                           */
/*                                                               */
/* ERROR ROUTINE */
ERROR -
  DO
    SET RETURN_CODE = &LASTCC          /* CHECK LAST ERROR CODE */
    RETURN
  END
 
/* CONTROL LIST CONLIST SYMLIST
 
WRITE &ID &FIND
 
SET RETURN_CODE = 0                 /* SET RETURN CODE TO 0 */
 
ISPEXEC  CONTROL  ERRORS  RETURN
 
ISREDIT EXCLUDE ALL '&ID' 1 2
 
ISREDIT DELETE ALL NX
 
ISREDIT RESET
 
ISREDIT (ENDER) = LINENUM .ZLAST
 
SET TROWS = &ENDER
 
SET UCNT = 1
 
/*CONTROL LIST CONLIST SYMLIST
DO CNT = 1 TO &ENDER
  ISREDIT (DATA) = LINE &CNT
 
  SET LOADDSN = &SUBSTR(3:50,&STR(&DATA))
  SET LOADDSN = &LOADDSN
 
  ISPEXEC  LMINIT DATAID(LOAD) DATASET('&LOADDSN')
 
  ISPEXEC  LMOPEN DATAID(&LOAD) OPTION(INPUT)
 
  SET RETURN_CODE = 0
  SET MEMBER =
 
  ISPEXEC LMMLIST DATAID(&LOAD) OPTION(LIST) +
    MEMBER(MEMBER) STATS(NO)
 
  DO WHILE &RETURN_CODE EQ 0
    SET A = &SYSINDEX(&STR(&FIND),&STR(&MEMBER)
    SET B = &DATATYPE(&MEMBER)
    IF &RETURN_CODE GT 100 THEN +
      SET RETURN_CODE = 0
    ELSE +
      DO
        IF &SYSINDEX(&STR(&FIND),&STR(&MEMBER)) GT 0 AND +
          &DATATYPE(&MEMBER) EQ CHAR THEN +
          DO
            WRITE &MEMBER IN &LOADDSN
            SET RETURN_CODE = 0
          END
      END
 
    ISPEXEC LMMLIST DATAID(&LOAD) OPTION(LIST) +
      MEMBER(MEMBER) STATS(NO)
  END
 
  ISPEXEC LMMLIST DATAID(&LOAD) OPTION(FREE)
  ISPEXEC  LMCLOSE DATAID(&LOAD)
  ISPEXEC  LMFREE  DATAID(&LOAD)
 
  SET RETURN_CODE = 0
 
 
  SET UCNT = &UCNT + 1
END
 
EXIT
