Hi Again,
I downloaded the following utility from the web which indents rexx and clist programs.
I have tried to invoke it from command line "TSO INDENT",
"TSO INDENT (member-name)" and etc.... I have even tried to invoke it as a line command in the edit dataset mode.
-------------
thanks.
manu
(Boston)
I downloaded the following utility from the web which indents rexx and clist programs.
I have tried to invoke it from command line "TSO INDENT",
"TSO INDENT (member-name)" and etc.... I have even tried to invoke it as a line command in the edit dataset mode.
Code:
/* REXX : FP REFORMAT REXX AND CLIST SOURCE */
/* THIS EDIT MACRO WILL READ THE EDIT FILE AND APPLY STRUCTURING */
/* AND INDENTATION TO IT BEFORE REPLACING THE EDIT DATA. YOU MUST */
/* MANUALLY CHECK IT AFTERWARDS ESPECIALLY WHERE LINES ARE SPLIT. */
/* OPTIONAL PARM OF LOGICAL LINE (NOT LRECL) LENGTH TO FORMAT TO. */
/*******************************************************************/
ADDRESS ISREDIT "MACRO (LEN)"
IF LEN = '' THEN
LEN = 71 /* OUTPUT LINE LENGTH */
ADDRESS ISREDIT "RESET" /* REMOVE MESSAGE LINES IF ANY */
ADDRESS ISREDIT "(ML) = LINENUM .ZLAST" /* MAXIMUM LINES */
ADDRESS ISREDIT "(LINE) = LINE 1" /* GET FIRST LINE */
IF INDEX(LINE,'REXX') > 0 THEN /* REXX OR CLIST TYPE */
DO; C1 = ','; C2 = ','; END /* REXX LINE BREAKS */
ELSE
DO; C1 = '+'; C2 = '-'; END /* CLIST LINE BREAKS */
/* PROCESS THE EDIT LINES INTO A CONTINUOUS VARIABLE */
DATA = ''
DO I = 1 TO ML /* COMBINE INTO SINGLE STRING */
ADDRESS ISREDIT "(LINE) = LINE" I /* GET LINE FROM EDITOR */
SRC = STRIP(LINE) /* REMOVE LEAD/TRAIL BLANKS */
IF LENGTH(SRC) > 0 THEN
DO
A = SUBSTR(SRC,LENGTH(SRC),1) /* LAST CHAR
...
...
...
END
RETURN
-------------
thanks.
manu
(Boston)