'IS03.SHARE.TEXT(NCADD)' -- ART007 April 1st, 1995 6:54 a.m. -- dev(1403W8) chars(MONO) +--------------------------------------------------------+ | | | | | The Toolbox | | | | Today's topic -- Reformatting data | | | | Items in this section: | | 1. REFORMAT -- reformats data | | 2. Other macros that reformat data include: @SEQ, | | @smalls, clistbox, FIXJCL, jclbox, LEFT@, | | PROPER, REMBLANK, REMDUPS, and rexxbox. | | 3. NXNX -- display lines above/below displayed | | (NX) lines. | +--------------------------------------------------------+ ---------------------------------------------------------+- By David McRitchie (E-Mail ID - DMcRitchie@hotmail.com Intended audience -- TSO users somewhat familiar with the use of EDIT under PDF (Program Development Facility). Today's Toolbox column concerns macros that reformat the data within edit. Many of the macros described here can restrict the number of lines involved by the use of labels, CC-range, displayed lines (NX), or non-displayed lines(X). Please refer to the documentation for more detailed information on each of the macros described in the Toolbox column. REFORMAT, allows the user under PDF EDIT to move columns around. Frequently material is available somewhere in our system, but the columns are not as desired. Reformat is used to change the columns around. Label Range, NX (displayed lines only), column pairs, and constants enclosed in either single or double quotes may be used to describe lines and columns to be reformatted. In a batch job, PGM=IZ2035, IEBGENER, or the SORT (outrec) can be used for reformatting 00000000011111111112222222222333333 12345678901234567890123456789012345 REFORMAT 'Ab-c ' 21 25 ' ' 1 10 REFORMAT 'Ab-c' 0 1 21 25 0 3 1 10 Either of the above would result in the data being changed as follows: Ab-c 22222 0000000001 Ab-c 12345 1234567890 In the first REFORMAT command each of the constants includes blanks. The second REFORMAT command uses a column pair where a 0 as the starting column indicates that blanks are to be used and the ending column indicates the number of blanks to be included. The 21 25 column pair indicates columns 21 through 25 are included. The string enclosed in quotes may include blanks or any character, except the same kind of quotes used to begin and end the constant. Note that the sample input shows the tens position on one line and the units positions on the second line. This technique is to help you see where the columns came from after reformatting. @ICOPY (Interleaved copy), will copy a group of lines, another member, or a blank card before or after each line in the affected range. A pair of pointers is required to describe the affected range, and a second pair of pointers, a membername or the word BLANK to insert a blank line is then required to describe the data being copied after each line. BEFORE will insert the lines before each line in the affected range (AFTER is the default). @SEQ, will put sequence numbers into the affected range. Sequence numbers will only replace blank columns unless FORCE is used. Each option described is optional (see Documentation for additional options). label-range, default is to process all lines (.ZF .ZL) NX | X, limit to displayed (NX), or non-displayed (X) lines. L(n), length of substituted number, the default is 8. COL(n), the column at which substitution is to commence. Default is COL(100). FORCE, force sequence numbers into non-blank areas. BEGIN(n), supply a beginning number. Default is to use the line number. INCR(n), increment if BEGIN(n) is used. Default is 1. AST | AST(x), prefix and suffix sequence number with asterisk, or other character. @SMALLS, make characters lowercase, and make an attempt to capitalize letters after end of sentence periods. CUT and PASTE, see Dec 1992 Newsletter and/or documentation. Our version of CUT and PASTE uses comment lines to indicate copied or removed material. APPEND is used instead of CUT to add additional material to the paste dataset. PASTE KEEP will paste but not delete the paste dataset, and PASTE EDIT will edit the paste dataset. CUT DOC and APPEND DOC will include a designation of where material was cut from. CC-range is used for CUT or APPEND. For PASTE the destination is indicated by A (after) or B (before) on the line number. CLISTBOX, place a clist style comment box around comments (CC-range used). FIXJCL, align JCL. JCLBOX, place a JCL style comment box around comments (CC-range used). LEFT@, will remove leading blanks from all lines in the affected range. LCFIX, attempts to fix up peoples names with additional capitals as required (NX lines only). Previous capitalizations of first letters is required. Will attempt to fix roman numbers used a part of a persons name. Modification of clist into your own library is recommended. NXNX, redisplay X lines BEFORE / AFTER currently displayed lines. Options exist to specify the number of lines to be displayed BEFORE(n) / AFTER(n). Additional options include the ability to redisplay labelled lines (LABEL), changed lines (CHG), error lines (ERR), and special lines (SPECIAL). If no options are specified AFTER(1) is the default. NXNX does not change data but is frequently used in combination with other macros that do. PROPER, used to capitalize additional words after @SMALLS is used. Will inspect for over 5000 words so expect some time to be involved. Processes all lines in member. REMBLANK, removes blank lines, label range optional. REMDUPS, removes duplicate lines, label range and NX optional. Other options also available. REPEATNX, repeats all NX (displayed) lines for modification purposes, then X-out (undisplay) the original lines. Default AFTER may be changed to BEFORE. A comment line will be created to indicate the location of the original line. REXXBOX, place a REXX style comment box around comments (CC-range used). Documentation Each of the macros in this article can be Scripted from corresponding members in IS03.SHARE.TEXT. An online version has been formatted and is available as follows. ====> TSO CLIST member HELP ---------------------------------------------------------- Comments addressed to printer. The bold titles are +2 points and are bold. If the normal text is 9 point then these are 11 point bold. Please note indentations, and use of italics. Some extra spaces have been included to make reading more legible 1. topics, have extra space after the comma. 2. Reformat command has extra spaces for legibility 3. Results of reformat has extra spaces for legibility n ART007 on