EDIT macro @SEQ EDIT macro @SEQ Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. @SEQ users. PDF EDIT users particularly SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST, and in IS03.SPF2.MACROS for use on SPF/PC -------------------------------------------------------------------------------- @SEQ Place SEQUENCE NUMBERS into DATA for use of SORT etc. -------------------------------------------------------------------------------- related REFORMAT -------------------------------------------------------------------------------- @SEQ allows for the placement of line sequence numbers within the data. Useful for sorting etc. -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. ISREDIT @SEQ -------------------------------------------------------------------------------- OPTIONS: lptr-range A pair of line pointers can be used to restrict the lines under consideration. The line pointers must be a labels. Specifying one line pointer is invalid. X Affects only lines that are EXCLUDED from the display. DO NOT EXCLUDE .ZFIRST line since this edit macro uti- lizes "LOC 0" which will make it no longer excluded and will alter processing. NX Affects only lines that are NOT EXCLUDED from the display COL(nn) (optional) Default is 100, column that 8-digit sequence number will go into L(n) (optional) Default is 8, length of sequence number field including AST(x) prefix and suffix if supplied BEGIN(n) (optional) supply a beginning number for sequencing; oth- erwise, the edit sequence number of the card will be used. If NX | X is used only those lines will be changed and cause an increment. INCR(n) (optional) effective only if BEGIN(n) is coded. The de- fault is 1 when BEGIN(n) is coded. FORCE Force sequence numbers into specified columns even if specified columns are non-blank cannot be use with the exclude option "x" AST (optional) Set AST value from null to "*" AST(cc) (optional) Set AST value to "cc" value specified may be any number of characters and will surround the column length defined numbers as a set off. (Also see L re- lationship). ADD(nn) (optional) ADD nn to value found in text COL(nn) l(n) BEGIN(n), FORCE and AST have no meaning for ADD(nn). REPEATX (optional) X cards will receive value placed for NX cards Turns on NX switch. Remember FORCE will not change X cards in itself. No changes will take place if blanks not found or FORCE not used. Examples: @SEQ @SEQ .ZFIRST .ZLAST COL(100) L(8) --equivalent-- @SEQ .A .B @SEQ FORCE AST(**) COL(100) L(12) NX @SEQ .a .b ADD(13) COL(96) l(4) nx Compounded examples: (e.g. redo manuals library numbering) c all .a .b 1 p'##$##' ' ' x all remdups .a .b sep 1 20 @seq .a .b repeatx col(1) begin(7701) incr(11) l(4) reformat .a .b 1 2 '.' 3 4 '-' 7 250 Internal Aspects: 1. Parameters which can be entered in any order are reassigned to meaningful symbols. Numeric pairs are reassigned to new symbols. 2. Labels are verified and other requirements checked for. 3. Boundaries and width of data are stored in symbolic form. 4. Verification of parameters specifically for edit macro are verified. 5. Code directly relating to description is invoked. 6. Lines changed by @SEQ which were excluded before change are specifically ex- cluded after change. n @SEQ on