Edit macro PLIDCLS Edit macro PLIDCLS Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. PLIDCLS users. PLI users type. Edit Macro resides in SYS1.TSOCLIST -------------------------------------------------------------------------------- PLIDCLS List PLI declares in use in the order declared -------------------------------------------------------------------------------- related SORTG -------------------------------------------------------------------------------- The PLIDCLS macro edit macro can be used as an aid in eliminating DE- CLARE (DCL) statements which are not used within a program. This listing obtained will be in the order of declarations making it easy to work with. Suggested plan of use 1. Compile the program under PLI using the normal options. 2. Use IOF or other method to place the compilation listing into a dataset. SD DA(junk.list) 4 SNAP (get out of IOF summary list) 3. Print your source listing if you don't already have one. 4. Edit the dataset and run this edit macro TSO $EDIT userid.JUNK.LIST PLIDCLS RECOVERY OFF 5. Save and then Print the resulting listing SAVE @PRINT 6. Mark program listing where items are declared, if they are on the used listing. Some single use items point to the PROCEDURE (PROC) line. Do not mark items that appear due to INITIAL values being set, but be sure to include parameters passed to the procedure. 7. Delete unmarked DCL items that are not found elsewhere in the pro- gram. Suggest double checking. Do not delete structures that in- clude a used DCL item. -------------------------------------------------------------------------------- ISREDIT PLIDCLS -------------------------------------------------------------------------------- (there are no options) Internal aspects 1. Include lines found between "attribute and cross-reference " and "ag- gregate length table". 2. Page headings are removed from content. 3. Using the REFORMAT edit macro and a series of CHANGE commands the line identifiers are right justified with zeros added to the left. 4. The SORTG edit macro is used to resort on line identifiers changing the listing order from alphabetical to the order items were declared. Un- displayed lines (X) are included with the Displayed lines (NX) when the NX lines are sorted using SORTG. 5. Reformat is used again to remove a character added by previous REFOR- MAT. n PLIDCLS on