Edit macro PINX Edit macro PINX Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. PINX users. PDF EDIT users particularly SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST -------------------------------------------------------------------------------- PINX Create .PI entries from NX lines -------------------------------------------------------------------------------- related see Page Printing Considerations in the index. EDITCHEK, EDITOL, FIX, FIXPI, FIXQUOTE, PERIOD, PINX, PINXDOIT, PIR, PLICHK, S HIFTNX -------------------------------------------------------------------------------- This edit macro attempts to create essential ".PI" commands for SCRIPT documents where they are either missing or are entirely inadequate. In order to accomplish this the user must be able to determine what lines should be indexed. For example all lines with ":H" (:h1, :h2, :h3, :hp0, :hp1, :hp2, :hp3). The ".PI" command places index entries at the end of the document provided that ".IX" or ":INDEX" is also used one time and that INDEX was requested when the SCRIPT document is processed. -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. PINX additional optional operands -- RERUN DONE HOLD DONE skip conversions continues at restore point of x47 x48 x49 etc. HOLD after DONE, skips the normal letter case conversions. used with DONE it will only undo conversions e.g. PINX DONE HOLD Examples: PINX .A .B PINX .A .B DONE PINX .A .B HOLD Internal Aspects: 1) User must identify all lines to be copied to create a ".PI " entry. exclude all f ":h" all 2) The PINX edit macro makes internal use of X'xx' values x'45' internal use (reserved future use) x'46' internal use to remove blanks x'47' internal use to preserve/process double-quote x'48' internal use to preserve/process single-quote x'49' internal use to preserve/process ampersand Arithmetic operators (+ - / *) may interfere. The use of RERUN will allow rerunning without stumbling over these changes; otherwise, if these are found in data the edit macro will terminate. 3) ALL NX lines or NX lines between labels are processed by copying an existing line, and changing the copy to a ".PI" entry, the original line is excluded. 4) Internal use codes are restored -- entry point of DONE 5) Exit point if HOLD 6) Changes made to newly formed ".PI" entries. The following codes are removed from NX ".PI". ":HP3.", ":HP2.", ":HP1.", ":HP0.". The following codes are changed to "<|split|>" on NX ".PI" ":EHP3.", ":EHP2.", ":EHP1.", ":EHP0.", "ª". " - ", ":HDREFID REFID='", "'", " '". """, and " "". The following codes are removed from NX ".PI". ":H3.", ":H2.", ":H1.", and ":H0.", The following codes are changed to "<|split|>" on NX ".PI". ":H3 ID='". ":H2 ID='". ":H1 ID='". ":H0 ID='". and "<|split|><|split|>" Blanks are removed from NX ".PI" to single blanks or none if next to "<|split|>". (The split key is shift "\" on most keyboards).