Edit macro EDITPR Edit macro EDITPR Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. EDITPR users. PDF EDIT users particularly SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST, and in IS03.SPF2.MACROS for use on SPF/PC -------------------------------------------------------------------------------- EDITPR Check GML tag set for correct begin and end pairing -------------------------------------------------------------------------------- related see Page Printing Considerations in the index. EDITCHEK, EDITOL, EDITPR, FIXPI, FIXQUOTE, NESTCHK, PERIOD, PINX, PINXDOIT, PIR, PLICHK, SHIFTNX -------------------------------------------------------------------------------- EDITPR is particularly designed to find mismatched SCRIPT gml tags. It can be used to check other required pairing requirements. Determining exactly which tags are not paired is one of the more frustrating as- pects of a SCRIPT document that doesn't work. The failure may be far removed from where the error is marked. Also in page documents you can't see your work until the document has been printed. This edit macro helps you to determine how a specified GML tag is unmatched within a specific member. Even though the final document may have paired gml tags, this edit macro will flag nestings of tags within themselves. You should check these out because they may not be what you intended. -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. ISREDIT EDITPR -------------------------------------------------------------------------------- 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. ENTIRE will be substituted by .ZFIRST .ZLAST -------------------------------------------------------------------------------- Page COLSUM-1 SYSTECH NOTICE -- CLISTS NX Affects only lines that are NOT EXCLUDED from the display Examples: EDITPR :hp1. :ehp1. EDITPR :hp2. :ehp2. EDITPR .A .B :gt12. :egt12. EDITPR '.kp on' '.kp off' EDITPR '.kp inline' '.kp off' The use of double quotes is not permitted, and is not checked for. This re- striction is due to the fact that the EDITPR edit macro is already using double quotes in creating NOTELINEs. The use of single quotes not as delimiters is undefined¬ Such use will defi- nitely fail if string begins with a quote and does not end with a quote. Also notations which could indicate hex(x), character(c), text(t), or picture(p) strings will fail. EDIT---- IS03.SHARE.TEXT(EDITXXXX) - 01.00 - COLUMNS 001 124 COMMAND ===> EDITPR :hp1. :ehp1. Results are as follows: _______________________ EDIT---- IS03.SHARE.TEXT(EDITXXXX) - 01.00 - COLUMNS 001 124 COMMAND ===> SCROLL ===> CSR ****** **************************** TOP OF DATA ***************************** 000004 The use of unpaired gml tags in SCRIPT can be very :hp1.difficult:ep1. to =COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7 =NOTE= 1-0 BEGIN :hp1. TAG ABOVE ON 4.52 IS MISSING AN ENDING :ehp2 TAG 000005 debug. The error in this coding is that the 000006 ending tag is misspelled and therefore missing. The next 000007 :hp1.beginning:ehp1. tag encountered shows up as a duplicate =NOTE= 2-0 BEGIN :hp1. TAG 7.1 REPEAT OF 4.52, CHECK FOR MISSING :ehp2 TAG 000008 begin tag. At the :q.duplicate:eq. tag the edit macro has reset 000009 itself, and :hp1.continues:ehp1. normally until another error has been =NOTE= 3-2 UNMATCHED, 3 :hp1. TAG'S vs. 2 :ehp2 TAG'S ****** ************************* BOTTOM OF DATA ***************************** Internal Aspects: 1. A count of begin tags and end tags will be kept. 2. The initial starting point is the first line within the range at position 0 (an null column -- before the first column). 3. From the starting point the first is found and then checked to make sure it precedes the first encountered from the starting point. 4. If the appears first, you have an unmatched ending tag, the becomes the new starting point. 5. If the appears first, there is check made to make sure that another does not intervene between and . a. If a correct match occurs the new starting point becomes the point at which the occurs. b. If there is an intervening , you have a repeated tag and a missing ending. The new starting point will be the . 6. At the conclusion of the CLIST if an unmatched condition still exits a noteline will appear under the last ending gml tag processed. Return codes. 0 No error exits 4 Unmatched somewhere within, even if matched at end 8 Severe error in material or edit macro.