The following clist code can be used to Tag COBOL code with comments.
ISREDIT MACRO (PARM1) NOPROCESS ISPEXEC CONTROL ERRORS RETURN IF &LASTCC >= 16 THEN EXIT CODE(&LASTCC) ISREDIT (CMD) = RANGE_CMD ISREDIT FIND ‘IDENTIFICATION DIVISION’ ALL /********************************************************************** /********* VALIDATING THAT IT IS A COBOL PROGRAM BEFORE /********************************************************************** SET &ZEDSMSG = &STR(NOT VALID COBOL) ISPEXEC SETMSG MSG(ISRZ001) /********************************************************************** /********* CHECKING LENGTH OF TAGNAME /********************************************************************** IF &LENGTH(&PARM1) > 8 THEN + SET &ZEDSMSG = &STR(INVALID TAG NAME) ISPEXEC SETMSG MSG(ISRZ001) /********************************************************************** /*STORING FIRST AND LAST LINE NUMBERS /********************************************************************** ISREDIT (FIRST) = LINENUM .ZFRANGE ISREDIT (LAST) = LINENUM .ZLRANGE /********************************************************************** /*GETTING TOTAL NO OF LINES /********************************************************************** SET TOT_LINES=&LAST – &FIRST + 1 SET &ZEDSMSG = &STR(LINE COMMAND ‘V’ PENDING) ISPEXEC SETMSG MSG(ISRZ001) IF &STR(&CMD) = &STR(V) THEN + SET &PARM1=&STR(#WORKEFF) ISPEXEC SETMSG MSG(ISRZ001) *******&PARM1***&SYSUID*****&SYSDATE****************START*********) *******&PARM1***&SYSUID*****&SYSDATE*****************END**********) ISREDIT LINE_AFTER &EVAL(&ROWNO) = ISREDIT LINE_AFTER &EVAL(&ROWNO + 1) = SET &ZEDSMSG = &STR(COMMENT BOX ADDED) ISPEXEC SETMSG MSG(ISRZ001)
; ; ; ;