Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to invoke this EXEC?

Status
Not open for further replies.

mnellutla

Vendor
Nov 26, 2003
15
US
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.


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)
 
It is an edit macro. You need to be in edit on the member that you want to indent. Then you just need type in "INDENT" on the command line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top