Edit macro TAGX Edit macro TAGX Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. TAGX users. PDF EDIT users particularly SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST -------------------------------------------------------------------------------- TAGX Place tags before and after identified X or NX line groupings -------------------------------------------------------------------------------- related GML, NXNX, PINX, UNGML -------------------------------------------------------------------------------- The TAGX edit macro can be used to quickly add beginning and ending GML tags of your choice before and after selected lines. Groups of lines are created beforehand by being either DISPLAYED (NX) or EX- CLUDED (X) lines. -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. ISREDIT TAGX <> <> -------------------------------------------------------------------------------- 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 NX Lines that are NOT EXCLUDED from the display will as a group be preceded by the chosen beginning tag (%B% is the de- fault), and followed by a chosen ending tag (%A% is the de- fault) after the last line in each group of NX lines. X Lines that are EXCLUDED from the display will as a group be preceded by the chosen beginning tag (%B% is the default), and followed by a chosen ending tag (%A% is the default) after the last line in each group of (excluded) X lines. Examples TAGX TAGX :gt15. :egt15. TAGX .A .B TAGX .A .B :italic. :eitalic. EDIT---- xxxx.xxx.TEXT(EXAMPLE1) - 01.00 -COLUMNS 001 080 COMMAND ===> TAGX X SCROLL ===> CSR ****** *************************** TOP OF DATA ***************************** 000001 The line which have been excluded from the display might be 000002 JCL, for which we want these lines to appear within :gt15. 000003 and :egt15. tags. - - - - - - - - - - - - - - - - - - - - - - - - - 08 LINES(S) NOT DISPLAYED 000011 Later on in the document there may be some more material 000012 that must also appear between :gt15. and :egt15. tags. ****** ************************ BOTTOM OF DATA ***************************** EDIT---- xxxx.xxxxx.TEXT(EXAMPLE1) - 01.00 - COLUMNS 001 080 COMMAND ===> SCROLL ===> CSR ****** *************************** TOP OF DATA ***************************** =NOTE= 19:07:26 TAGX x :gt15. :egt15. =NOTE= :GT15. WILL BE INSERTED BEFORE X LINE GROUPS WITHIN RANGE =NOTE= :EGT15. WILL BE INSERTED AFTER X LINE GROUPS WITHIN RANGE 000001 The line which have been excluded from the display might be 000002 JCL, for which we want these lines to appear within :gt15. 000003 and :egt15. tags. 000004 :gt15. - - - - - - - - - - - - - - - - - - - - - - - - - 08 LINES(S) NOT DISPLAYED 000012 :egt15. 000013 Later on in the document there may be some more material 000014 that must also appear between :gt15. and :egt15. tags. 000015 :gt15. - - - - - - - - - - - - - - - - - - - - - - - - - 10 LINES(S) NOT DISPLAYED 000025 :egt15. ****** ************************ BOTTOM OF DATA ***************************** Example of use The following example shows the major portion of the conversion of the content of SYS1.HELP(SYSHELP) into a SCRIPT text member. COPY shiftnx left 3 validnx /* copy SYS1.HELP(SYSHELP) c all (( 1 :h4 /* into an empty member c all ( 1 :h3 /* for ungml please ... x 1 p'ª' all /* label .zfirst as .a tagx :gt15. :egt15. /* label .zlast as .b fixquote ungml period Internal Aspects Internal aspects describes how the CLIST functions. This information is particularly useful to someone who may need to design a similarly functiona edit macro. It may also provide additional insight to the user. 1. Verification is made that both X and NX lines occur within range. 2. A loop will add a line before the first NX line and after the the last NX line in each group. 3. If X is in use the previous item will apply to X line groupings instead of NX line groupings. 4. When the loop fails to identify any more items, done processing will check the display status of the last line within the range and may accordingly add an ending tag after it if it is of the same status as the request. The ending line pointer will be adjusted downward if a new line was added. No adjustment will be made if .ZLAST is the last line identifier for the range. n TAGX on