Edit macro GMLTP Edit macro GMLTP Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. GMLTP users. PDF EDIT users particularly SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST -------------------------------------------------------------------------------- GMLTP Create GML TAGS between TAB characters, on NX lines related REFORMAT INSERT -------------------------------------------------------------------------------- The GMLTP edit macro facilitates the placement of GML tags between identified tags on NX lines. TABS are best used with no spaces before/after tabs. When coding blanks are used so that columns line up, but once blanks are removed it is hard to find the 3rd and the 1st next tab. The first tag must be present, if the second TAB is missing the end tag will be placed after the last character on the line. source ª&bul.ª&BUL.ª&.bul.ª&.BUL.ªbullet invoke ===> GMLTP 3 1 :gt12. :egt12. make the 3rd "ª" to "ª:gt12. " make the next "ª" to ":egt12.ª " result ª&bul.ª&BUL.ª:gt12.&.bul.ª&.BUL.:egt12.ªbullet -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. ISREDIT GMLTP tab1first tab2next > > -------------------------------------------------------------------------------- REQUIREMENTS: Two numbers, the first to indicate the first tab number concerned, and the second number to indicate the count of tabs to the second tab to be concerned. If the second tab is not present, the ending tag will be placed at the end of the line. tab1first The count of tab character strings after which the begin-tag will be placed. tab2next The count of tab character strings after the first-tab before which the end-tag will be placed. TAB1C(c) First tab character (character string) searched for the de- fault is TAB1C(ª). TAB2C(c) Second tab character (character string) searched for the de- fault is TAB2C(ª). taga First tag. Default is tagb First tag. Default is MIN(col) Minimum column for end-tag if the second (ending) tab is miss- ing. The default is to be placed after the last character on the line when second tab is missing. lptr-range A pair of line pointers can be used to restrict the lines un- der consideration. The line pointers must be a labels. Spec- ifying one line pointer is invalid. The default, if not specified, is .ZFIRST and .ZLAST, indicating that all lines are to be processed. ENTIRE will be substituted by .ZFIRST .ZLAST Examples GMLTP .A .B 3 2 GMLTP 2 1 :gt12. :egt12. GMLTP 3 1 MIN(65) GMLTP 2 4 :gt12. :egt12. GMLTP 2 4 NOTELINE (TESTING) Internal Aspects Internal aspects describes how this REXX execute PDF EDIT MACRO functions. This information is particularly useful to someone who may need to design a similarly functional edit macro. It may also provide additional insight to the user. 1. Parameters which can be entered in any order are reassigned to meaning- ful symbols. Numeric pairs are reassigned to new symbols. 2. Labels are verified and other requirements checked for. 3. Verification of parameters specifically for edit macro are verified. 4. Code directly relating to description is invoked.