Edit macro PIR Edit macro PIR Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. PIR users. PDF EDIT users particularly SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST -------------------------------------------------------------------------------- PIR ".PI" Rotation of SCRIPT entries at the location of the cursor -------------------------------------------------------------------------------- related see Page Printing Considerations in the index. EDITCHEK, EDITOL, FIX, FIXPI, FIXQUOTE, PERIOD, PINX, PINXDOIT, PIR, PLICHK, S HIFTNX -------------------------------------------------------------------------------- The use of the PIR edit macro after use of the PINX edit macro is recommended. For this edit macro the location of the cursor is important. EXAMPLES -- WARNING sequence numbers in variable length text could foul you up. 001 :H2.HALON EXTINGUISHERS SET CURSOR PFK SET TO "PIR AT" 001 .PI |EXTINGUISHERS <-- Result ******************************************************** 002 .PI |HALON FIRE EXTINGUISHER PFK SET TO "PIR" 002 .PI |EXTINGUISHER|HALON FIRE <-- Result, may be manually 002 .PI |EXTINGUISHER, HALON FIRE <-- changed to use comma instead ******************************************************** OPTIONS: PIR AT Make a ".PI " from this point on the line, suggest TEMP PFK-13 PIR AT PIR <> Rotate the ".PI " AT THE CURSOR SUGGEST TEMP PFK-14 PIR PIR S SWAP FIRST TWO NODES OF ".PI " SUGGEST TEMP PFK-16 PIR S Suggested implementation after use of the edit macro PINX C ALL '.*--PI ' '.PI ' NX X ALL F '.PI /' C ALL NX '/' '&broken.' Suggested PFKeys (if you have 24) to efficiently do each of these options. 13 PIR AT Creates a ".pi " from pos. cursor is at 14 PIR Rotates ".pi " from pos. of cursor 15 **what's up Warning that pfkeys are changed, use PFK-3 16 PIR S Swap first two nodes of ".pi" 17 FIND 7 80 '/' NX;PIR S;F .PI;F .PI INTERNAL ASPECTS: To facilitate handling certain bytes will be modified. Creating INDEX (.PI) entries from scratch -- getting started If you wish to do an entire library or many members, you might want to create your own edit macro -- EDIT$ -- to effect your changes. You might wish to check out (use) the PINXDOIT edit macro described later. ==> @DIR MACRO(EDIT$) Modify EDIT$ edit macro in your own CLIST library. Use "IS03.LIBR.CLIST(EDIT$)" as a pattern. Identify possible lines to use for index (.PI). Exclude all lines -- x all Find heading -- f p'$h#' all Find high-lighted phrases -- f p':hp' all Find reference lines -- f 'id=' all Find three capital letters -- f p'>>>' all Exclude JCL -- x '//' all Label non-excluded entries -- labnx The following command would make a .PI entry for each displayed entry. Create .PI entries from nx lines -- PINX Once possible lines have been identified continue with creating index entries by placing the cursor as indicated with an underscore and using the PF key as indicated below each line. Each time the PIR edit macro is invoked it will create a new line below the existing line. The INDEX, as used in SCRIPT, is a three level index. When a fourth level ap- pears on the .PI line it will appear in the place of the page number in the INDEX. Since square brackets are not available, optional material is enclosed in European brackets <...>. :h2 id=D0303.Creation and Generation of CICS Tables and Startup JCL after use of PFK-13 (pir at) -- create .pi entry at cursor posi- tion .PI |Creation and Generation of CICS Tables and Startup JCL after use of PFK-14 (pir ) -- create new .pi by rotation .PI |CICS Tables and Startup JCL|Creation and Generation of after use of PFK-14 (pir ) -- create new .pi by rotation .PI |Tables and Startup JCL|Creation and Generation of|CICS after use of PFK-14 (pir ) -- create new .pi by rotation .PI |Startup JCL|Creation and Generation of|CICS|Tables and Change "CICS|Tables and" to to "CICS Tables and" as originally originally used. This will keep the levels from exceeding three in the next split. .PI |Startup JCL|Creation and Generation of|CICS Tables and after use of PFK-16 (pir s) swap first two nodes .PI |Creation and Generation of|Startup JCL|CICS Tables and after use of PFK-16 (pir s) swap first two nodes .PI |Startup JCL|Creation and Generation of|CICS Tables and Realistic INDEX entries The above was a sample of using PFKeys to save typing -- the entries you might actually use might look something more like the following: *****Generation of CICS Tables and Startup JCL************ .pi |Tables|CICS|Generation of, and Startup JCL .pi |CICS|Tables|Generation of, and Startup JCL Note the comma indicates something rearranged at that point. Similar to Dr. Allen Newhouse III, DDS Newhouse III, Allen, DDS, Dr. clists that modify text that modify text, clists modify text, clists that text, clists that modify clists that modify text .PI |CLISTS|that modify text .PI |modify|text, clists that modify EDITPI edit macro fix .PI Suppose you ended up with .PI entries with lots of capitals. They would look strange in an INDEX, especially since capitals require more room. .PI |TABLES|CICS|GENERATION OF, AND STARTUP JCL .PI |CICS|TABLES|GENERATION OF, AND STARTUP JCL The use of the edit macro FIXPI would solve your problem, but do not use it if there are pre-existing .PI in the SCRIPT member, because it will change the let- ter case of all .PI entries. .pi |Tables|CICS|Generation of, and Startup JCL .pi |CICS|Tables|Generation of, and Startup JCL PFK Illustration ------ PF KEY DEFINITIONS AND LABELS - PRIMARY KEYS ------- ----- PFK 13-24 are modified PFKEYS (recommend PFK-24 as shown) PF13 ===> pir at create .PI from matter at .ZCSR position PF14 ===> pir create new .PI from .ZCSR on .PI wrap to end PF15 ===> **not valid, please use PF3 to exit using correct row of PF keys to keep fingers PF16 ===> pir s swap first two nodes of .PI PF20 ===> %memname edit member in same dataset PF22 ===> !edchek checking JCL -- CA Associates PF24 ===> retrieve recall previous entries ----- PFK 1-12 are the normal PFKEYS (recommend 4 and 12 as shown) ----- PF04 ===> :ts text split edit line command PF12 ===> cursor move cursor back to command line (top) Refer to the FIXPI edit macro documentation for additional Information The FIXPI macro will change .PI entries so that each first letter is capital- ized. Should not be used on pre-existing .PI entries. Recommended for when all .PI entries were just created. Internal Aspects The following example invoked the DEBUG option -- PIR R debug EDIT ---- xxxx.xxxx.xxxxx(xxxx) - 01.25 ------------------------------------------------ COMMAND ===> PIR debug (was entered similar to PF14 to rotate a .PI entry) ****** ******************************************************* TOP OF DATA ************* =NOTE= DEBUG option in effect =NOTE= PIR 21:53:56 LABEL .PIRR LINE ROTATED AT .ZCSR -- NEXT LINE IS RESULT =NOTE= ln1=.pi ³body of knowledge exceeds all comprehension =NOTE= - =NOTE= a1=.pi ³<--- =NOTE= a2=comprehension<--- =NOTE= a3=body of knowledge exceeds all<--- =NOTE= a4=<--- =NOTE= ln2=.pi ³comprehension³body of knowledge exceeds all =NOTE= d1=<--- which is x'' =NOTE= ln2= . p i ³ c o m p r e h e n s i o n ³ b o d y o f k n o w l e d =NOTE= ln2=4B9789406A839694979985888595A28996956A829684A840968640929596A6938584 000001 The body of knowledge exceeds all comprehension .PIRR .pi ³body of knowledge exceeds all comprehension 000003 .pi ³comprehension³body of knowledge exceeds all 000004 -------------------------------------------------------------------