Introduction to the PDF editor Introduction to the PDF editor Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- PDF EDIT Features Some features of the PDF editor are described in this section. Profi- ciency in typing, in the use of the PDF editor, and in the use of com- pany developed CLISTS together provide a solid background for your needs under ISPF and PDF whether for programming, the use of SCRIPT, writing your own CLISTS, or other text editing. -------------------------------------------------------------------------------- Related material. See Appendix B -- Sample of CLIST variables available. This appendix is available in the complete copy of "AN INTRODUCTION TO THE OBC-Mytown CLISTS" and if missing can be found in and scripted from IS03.SHARE.TEXT(NCAPXB) or by scripting IS03.SHARE.TEXT(NCLIST). -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- LABELS Edit Help topic 2.1.1 thru 2.1.3 -------------------------------------------------------------------------------- for more information on labels 1) Edit a member 2) ===> HELP 3) ===> 13 for 13 -- LABELS and RANGES .a 017 A LABEL consists of a period (".") followed by 1-5 alphabetic 000018 characters placed over the beginning of a line number. Once as- signed .b 019 labels stay with the line, even if the line is moved. In this ex- ample .c 020 a LOCATE 19 is equivalent to LOCATE .B 000021 A LABEL can be located similar to locating a LINE number. ===> LOC LABEL next ===> LOC LABEL prev ===> LOC LABEL prev ===> LOC .LABAA There are several special labels that are automatically assigned and main- tained by the editor. They all begin with the letter "Z". Labels begin- ning the letter "Z" are reserved for editor use and may not be assigned by the user. Refer to SC34-4018 ISPF/PDF EDIT MACROS for more information. Unlike other labels, these system labels do not necessarily stay with the same line, but instead represent logical positions on the display. The editor-assigned labels available to the end user are: .ZCSR - the data line on which the cursor is currently positioned. .ZFIRST - the first data line (same as relative line number 1). This label may be abbreviated to .ZF . .ZLAST - the last data line. This label may be abbreviated to .ZL . 1 -------------------------------------------------------------------------------- LABEL RANGE -------------------------------------------------------------------------------- The "range" operand consists of two labels that must be separated by a blank or comma. A single label is invalid. The labels may be any combi- nation of "system labels" (.ZFIRST, .ZCSR, .ZLAST) or user labels. The range operand is applicable to the following primary commands. CHANGE CREATE DELETE EXCLUDE FIND LOCATE REPLACE RESET SORT SUBMIT Wording similar to the following is used to describe a label range in se- veral clists. Pertains to the use of two labels. lptr-range indicates that two line pointers are required to indicate a range of lines to be processed. The line pointers must be labels. The labels indicate the first and last line to be processed. -------------------------------------------------------------------------------- Line EDIT commands -- Some examples -------------------------------------------------------------------------------- The Topic 11 Help panel shows line edit commands summarized as follows oMost line commands within 1-4 can be used in block formo 0 - Line commands - general information 1 - Basic commands I (insert), D (delete), R (repeat) 2 - Move/Copy commands C (copy), M (move), A (after),B (before), O (over- lay) 3 - Shifting commands ) (cols right), ( (cols left),> (data right), < (data left) 4 - Exclude/Show commands X (exclude), F (first), L (last), S (show) 5 - Text handling commands TS (text split), TF (text flow), (text enter), TE LC (lowercase), UC (uppercase) 6 - Miscellaneous commands BNDS (bounds), COLS (columns), MASK (mask), TABS (tabs) Single line insert(I). Insert a single line I00001 When you hit the ENTER 000001 When you hit the ENTER 000002 key you may insert 1 line. ...... _ 000002 key you may insert 1 line. Triple line insert(I3). Insert a 3 lines. 0I3001 When you hit the ENTER 000001 When you hit the ENTER 000002 key you may insert 3 lines. ...... _ ...... ...... 000002 key you may insert 3 lines. Repeat(R), Repeat(RR) R00001 555-8818 McRitchie 000001 555-8818 McRitchie 000002 555-8812 Miller 000002 555-8818 McRitchie 000003 555-8812 Miller Block line commands. Move(MM), or Copy(CC) MM0001 These lines will be moved(MM) 000001 This is/was the last line. MM0002 AFTER(A) the LAST line. 000002 These lines will be moved(MM) A00003 This is/was the last line. 000003 AFTER(A) the LAST line. Move(M) or copy(C) with overlay(O) =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2----| M 0001 555- 000001 555-8818 McRitchie OO 002 8818 McRitchie 000002 555-8812 Miller OO 003 7812 Miller Shifting lines Left ( or Right ) =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2----| ))9 01 McRitchie 000001 McRitchie ))0002 Miller 000002 Miller =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2----| Shifting text Left < or Right > =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2----| >>2 01 Text on line, after on 000001 Text on line, after on >> 002 text on line after line 000002 text on line after line ))2 03 Text on line, after on 000003 Text on line, after on )) 004 text on line after line 000004 text on line after line =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2----| Text Split(TS), suggest PFK-4 ==> :TS 000001 Sometimes you may want 000001 Sometimes _ 000002 more room to insert ...... 000003 text into a line. 000002 you may want 000003 more room to insert 000004 text into a line. Text Flow(TF), or TFnn for nn cols =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2 TF20 1 Flow 000001 Flow columns :limit 000002 columns together 000002 together within :of 000003 within same paragraph. 000003 same paragraph. :TF20 000004 Next 000004 Next :is 20 000005 paragraph 000005 paragraph :columns 000006 is not 000006 is not : 000007 affected. 000007 affected. : =COLS> ----|----1----|----2----| =COLS> ----|----1----|----2 Text Join(TJ), or TJnn for nn cols The joining of two text lines is supported under SPF/PC but is not supported under SAS or TSO. Under TSO use TF and something to stop the flow such as a period in column one. Upper Case(UCC), or UCnn for nn lines ucc 01 Sometimes text is in 000001 SOMETIMES TEXT IS IN 000002 Mixed Case and you 000002 MIXED CASE AND YOU ucc 03 want it to be all caps. 000003 WANT IT TO BE ALL CAPS. 000004 or 000004 or lc 005 SOMETIMES TEXT is 000005 sometimes text is 000006 mixed case and you 000006 mixed case and you 000007 want it as lowercase. 000007 want it as lowercase. Converting All First Letters To Capitals in a three step process. 1 ===> c all .a .b p'<' p'>' 3 ===> c all .a .b p'<>' p'<<' .a 001 convert these lines so that .A 001 CoNvErT ThEsE LiNeS So ThAt 000002 THE FIRST LETTER OF EACH 000002 ThE FiRsT LeTtEr Of EaCh 000003 becomes a capital letter. 000003 BeCoMeS A CaPiTaL LeTtEr. .b 004 .pi |text|first letter to caps .B 004 .Pi |TeXt|FiRsT LeTtEr To CaPs 000005 Do not affect this line. 000005 Do not affect this line. 2 ===> c all .a .b p'>>' p'><' .A 001 CONVERT THESE LINES SO THAT 4 ===> _ 000002 THE FIRST LETTER OF EACH .A 001 Convert These Lines So That 000003 BECOMES A CAPITAL LETTER. 000002 The First Letter Of Each .B 004 .PI |TEXT|FIRST LETTER TO CAPS 000003 Becomes A Capital Letter. 000005 Do not affect this line. .B 004 .Pi |Text|Capitalize First ... 000005 Do not affect this line. Converting All First Letters To Capitals in a two step process. 1 ===> c all .a .b p'@' p'<' 2 ===> c all .a .b p'@' pref p'>' 3 ===> _ .a 001 convert these lines so that .a 001 Convert These Lines So That 000002 the first letter of each 000002 The First Letter Of Each 000003 becomes a capital letter. 000003 Becomes a Capital Letter. .b 004 .pi |text|first letter to caps .b 004 .Pi |Text|First Letter To Caps 000005 do not affect this line. 000005 Do not affect this line. Convert UPPERCASE to more conventional text. COMMAND ===> @SMALLS .a .b COMMAND ===> _ .a 01 WE HAVE AN EDIT MACRO .a 01 We have an edit macro 00002 NAMED @SMALLS 00002 named @smalls 00003 WHICH ATTEMPTS TO CONVERT ALL 00003 which attempts to convert all 00004 TEXT TO LOWERCASE AND THEN TO 00004 text to lowercase and then to 00005 CAPITALIZE THE FIRST WORD IN 00005 capitalize the first word in 00006 EACH SENTENCE. A FEW WORDS 00006 each sentence. A few words 00007 SUCH AS "OBC", "Company", 00007 such as "OBC", "Company", 00008 "CELANESE", "CORPORATION", 00008 "Celanese", "Corporation", 00009 "NEW JERSEY", AND "NJ" 00009 "New Jersey", and "NJ" 00010 ARE SPECIFICALLY HANDLED. 00010 are specifically handled. 00011 THE RESULTS ARE SHOWN IN THE 00011 The results are shown in the 00012 RIGHT-HAND COLUMN. WHILE NOT 00012 right-hand column. While not 00013 PERFECT IT SURE MAKES CHANGES 00013 perfect it sure makes changes 00014 TO NORMAL TEXT WITH UPPER AND 00014 to normal text with upper and .b 15 LOWERCASE SIMPLER. .b 15 lowercase simpler. REFORMAT clist example, reformat requires pairs of columnsœ REFORMAT turns Autosave off COMMAND ===> REFORMAT .a .b 'ªdescrª' 1 5 'ª' 9 22 COMMAND ===> AUTOSAVE ON =COLS> ----|----1----|----2----|- =COLS> ----|----1----|----2----|- .a 001 00000000011111111112222222 000001 ªDESCRª00000ª00111111111222 000002 12345678901234567890123456 000002 ªDESCRª12345ª90123456789012 000003 000003 ªDESCRª ª .b 004 ABCDEFGHIJKLMNOPQRSTUVWXYZ 000004 ªDESCRªABCDEªIJKLMNOPQRSDTU =COLS> ----|----1----|----2----|- =COLS> ----|----1----|----2----|- On the above example note the two lines of numbers. The first row shows the tens position of the column, and the second row shows the units position of the column. Reformatting of input whether by program or clist will show which po- sition that the input originally held when you examine the output. ----- For display purposes several of the examples above were shown with a single space following the line command. This is not a requirement in PDF edit; you do not need to follow with a space. You do not even need to start on the first column of the line number. You may specify the count at either the be- ginning to the block or the end of the block -- although specifying at the be- ginning is customarily the practice. -------------------------------------------------------------------------------- Reiterative EDIT command -- use of &command -------------------------------------------------------------------------------- Within EDIT the regular commands will remain on the command line if they are preceded by an ampersand (&). COMMAND ===> &find all 'x y z' When entered as above the command will remain up for reuse This facility has been expanded at OBC by means of a simple CLIST so that TSO commands entered from within EDIT will also remain on the command line when preceded with an ampersand (&). COMMAND ===> &@tso listcat level(xxxx.xxxxx.xxxx) all When entered as above the command will remain up for reuse -------------------------------------------------------------------------------- RESET -- RESET -------------------------------------------------------------------------------- The RESET command (can be abbreviated RES ) "cleans-up" the edit display. This clean-up can include redisplaying excluded lines, clearing pending line commands, deleting special lines (=COLS>, =BNDS>, =MASK>, ==MSG>, =NOTE=, =PROF>, =TABS>, and ======), and removing line flags (==CHG>, ==ERR>). Also, labels can be removed from the display by using the RESET command. An optional "range" operand is supported, which you can use to specify the lines of the data to be reset. COMMAND ===> reset resets the data being edited (all of the above except labels). The RESET command can be used along with END to clear any pending line commands or error messages, since END does not function while such conditions exist. RESET Examples: COMMAND ===> reset label Deletes all labels from labeled lines. COMMAND ===> reset command Deletes all pending line commands. (MM, CC, A, etc. see page ART009-1) COMMAND ===> reset error Removes all line error flags (==ERR>). COMMAND ===> reset change Removes all line change flags (==CHG>). COMMAND ===> reset excluded Redisplays all excluded lines. COMMAND ===> reset special Deletes all special lines (=PROF>, =BNDS>, =TABS>, ==MSG>, =NOTE=, =MASK>, =COLS>, and ======). COMMAND ===> res Reset all of the above except labels . COMMAND ===> res cmd .a .b Deletes pending line commands in range. (from .a to .b inclusive). COMMAND ===> res x .a .b Redisplays excluded lines in the range. COMMAND ===> res lab cmd x Reset labels, line commands, and excluded lines (special lines and line flags are not reset). COMMAND ===> res err chg Reset just error and change flags. -------------------------------------------------------------------------------- RETRIEVE -- TSO command to retrieve last entry issued on command line -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. RETRIEVE is a TSO command and can be used on any ISPF screen to bring back (retrieve) the last command to the command line. You can reinvoke the com- mand by hitting or you can make modifications to the line before hitting . Suggest use of RETRIEVE on PFkey 24, and CURSOR on PFkey 12. In the past CURSOR was the default for both, now RETRIEVE is the default for both. Suggest PFkey 12 be CURSOR. If PFkey 12 is your most accessible PFkey then reverse their as- signments. PFkeys are reset by typing in PFKEY on the command line. The &q.;' shown in the examples below is your command line delimiter as set in PDF option 0.0, the default is a semi-colon (";"). COMMAND ===> RETRIEVE (normally you use a pfkey) When entered as above your previous entry on the command line will be re- turned to the command line. You may add additional power by using RETRIEVE on the command line in addition to other commands. In the first example a LISTCAT will occur and you will re- main in the LISTCAT until you hit enter for the triple asterisks (***). When you return to screen of invocation you can modify your LISTCAT for reentry with- out having to hit PFkey 24. COMMAND ===> LISTCAT ENT(LIBR.CNTL); RETRIEVE Suppose you have issued EDIT many times from within members in EDIT only to dis- cover it to be laborious process coming out because AUTOSAVE OFF was in effect for the entire process. The effect is similar to the reiterative EDIT com- mand with two important differences. 1) it applies to the entire line not just the first command. 2) it applies on any screen not just within EDIT. COMMAND ===> AUTOSAVE ON; END; RETRIEVE -------------------------------------------------------------------------------- TEXT editing commands: TS TE TF -------------------------------------------------------------------------------- There are some powerful text editing facilities built into PDF-EDIT. For more complete information refer to the EDIT HELP screen items 11 Edit line commands, 5 Text handling commands, look at details. A brief description follows to entice you into examining the HELP frames. TS, and TS nn, line command to split lines of text. TS is used to split a line at the cursor position. I highly recommend that _ .... pfk-4 (and/or pfk-16) within EDIT (only within EDIT) to ":ts" using the keys command. Using the pfkey simpli- fies the process to positioning the cursor once, if at all, and then invoking the pfkey; otherwise, the cursor must be repositioned twice and "TS" would have to be typed over the line number. TE, line command for entry of several lines of text, text entry is used for power typing. _ TF, and TF nn, line command for text flow. Lines are realigned to best fill out the lines within bounds, and is stopped by a beginning period, a beginning semi-colon (both as in SCRIPT commands), by an indentation different from the next line, or by a blank line. For example these lines were lined up using TF51, and since ".fo off" is invoked in SCRIPT the lines will appear the same when SCRIPTED as they appear in the SCRIPT input file. 1...5...10...15...20...25...30...35...40...45...50...55...60. -------------------------------------------------------------------------------- PICTURE strings -------------------------------------------------------------------------------- The special characters that can be used in a picture string are: = any character . invalid characters @ alphabetic characters - non-numeric characters # numeric characters < lower case alphabetics $ special characters > upper case alphabetics ª non-blank characters The special characters that can be used in a "to" picture string are: = any character, including blank (unchanged in this position) < lower case alphabetics > upper case alphabetics Examples of picture strings used with the FIND command are: find p'.' 73 80 find invalid character in columns 73 to 80 find p'###' find 3 digit number (i.e. 101 1041 but not 99) find '@1'p 1 find label a1,b1,c1, etc. in column 1 find '$h#$' all find all ":h0.", ":h1." etc. lines find '$h# ' all find all ":h0 ", ":h1 " etc. lines find p'<' find the next lower case alphabetic character find p'ª' 72 find the next non-blank in column 72 For additional information on PICTURE strings used in FIND commands refer to the help panels ===> f p'*' results in an invalid character condition ===> help direct entry into HELP for invalid condition For additional information on PICTURE strings used in CHANGE commands refer to the help panels ===> c p'*' p'*' results in an invalid character condition ===> help direct entry into HELP for invalid condition The use of Picture strings can convert all letters to UPPERCASE. /* Abc defghij k/l 2pass III */ ===> c all p'<' p'>' /* ABC DEFGHIJ K/L 2PASS III */ The use of Picture strings can convert all letters to lowercase. /* ABC DEFGHIJ K/L 2PASS III */ ===> c all p'>' p'<' /* abc defghij k/l 2pass iii */ The use of Picture strings can convert text to all lowercase but for the first letter in each word. /* ABC DEFGHIJ K/L 2PASS III */ ===> c all p'>>' p'<>' /* AbC DeFgHiJ K/L 2PaSs IiI */ ===> c all p'<>' p'<<' /* Abc Defghij K/L 2Pass Iii */ The following will make only the first letters capitalized similar to the The difference is that to be capitalized the letter must appear after a bl /* ABC DEFGHIJ K/L 2PASS III */ ===> c all p'>' p'<' /* abc defghij k/l 2pass iii */ ===> c all p' <' p' >' /* Abc Defghij K/l 2pass Iii */ /*note slightly different results */ /* from previous example. */ For a more involved conversion of character case refer to the clist @SMALLS which is designed to change text to lower case and make the first word of each sentence uppercase. Some words will be converted back to uppercase e.g. OBC COBOL PLI. For an example of the use of the @SMALLS clist please refer to the index. -------------------------------------------------------------------------------- QUICK deletion of unwanted lines -------------------------------------------------------------------------------- One method to quickly delete a large number of unwanted lines is as fol- lows RES reset all lines X ALL string1 exclude all lines containing string1 DEL X ALL delete ALL excluded lines (X) Likewise all lines can be quickly deleted to obtain an empty member RES reset all lines DEL NX ALL delete ALL lines NOT excluded (NX) -------------------------------------------------------------------------------- BOUNDS -------------------------------------------------------------------------------- Use the BOUNDS primary command to SET the left and right bounds and save them in the EDIT PROFILE. It provides an alternative to changing the bounds by setting them in the bounds line (=BNDS>), and is especially useful in setting the bounds to their DEFAULT columns. It can be abbreviated as BNDS or BND . COMMAND ===> bnds Reset bounds to their DEFAULT columns. COMMAND ===> bnds 20 60 SET the left and right bounds to 20 and 60 respectively. COMMAND ===> bnds 10 * SET the left bound to 10 and leave the right as is. COMMAND ===> bnds * 65 SET the right bound to 65 and leave the left as is. Either both bounds must be specified, or neither. The first one specified (left-column number) must be smaller than the second (right). Bounds are used with scrolling, shift line commands ( >, <, ), ( ), text line commands ( TS, TF, TE ) and FIND, CHANGE, EXCLUDE , and SORT commands. Warning _______ Once you have set bounds to limit the scope of a FIND or TF, you are likely to forget to reset bounds (BOUNDS no operands) when you are finished. If do forget to remove bounds that you set, you are likely to run across the situ- ation where you can see text on your display but a FIND appears unable to function. This is always a shock to the uninitiated. -------------------------------------------------------------------------------- HELP panels -------------------------------------------------------------------------------- Following are some screens seen on the PDF EDIT help panels. I suggest that you go through them at your terminal. Some of the menu panels are listed be- low to help you keep track of where you are when you go through them. From within PDF EDIT enter ===> hit enter -- to make sure columns/messages area is clear ===> HELP if you receive only the short message -- reen- ter +---------------------------------------------------------------------------+ | HELP panel PDF EDIT help edit PANEL NAME = ISR20000 | +---------------------------------------------------------------------------+ | TUTORIAL ----------------------- EDIT -------------------------- TUTORIA | | L | | OPTION ===> _ | | | | ----------------------------------- | | | EDIT | | | ----------------------------------- | | | | Edit allows you to create or change source data. | | | | The following topics are presented in sequence, | | or may be selected by number: | | 0 - General introduction 8 - Tabbing (hardware/software/ | | logical) | | 1 - Types of data sets 9 - Automatic Recovery | | 2 - Edit entry panel 10 - Edit Profiles | | 3 - Member selection list 11 - Edit line commands | | 4 - Display screen format 12 - Edit primary commands | | 5 - Scrolling data 13 - Labels and Ranges | | 6 - Sequence numbering 14 - Terminating edit | | 7 - Display Modes (CAPS/HEX/NULLS) | | | | The following topic will be presented only if selected by number: | | 15 - Miscellaneous notes about edit | +---------------------------------------------------------------------------+ +---------------------------------------------------------------------------+ | HELP panel PDF EDIT Topic 12 PANEL NAME = ISR2M000 | +---------------------------------------------------------------------------+ | TUTORIAL --------------- EDIT PRIMARY COMMANDS ---------------- TUTORIAL | | OPTION ===> _ | | | | ----------------------------------- | | | EDIT PRIMARY COMMANDS | | | ----------------------------------- | | | | The following topics are presented in sequence, or may be selected by | | number. Individual commands may be selected by entering the command | | name. | | | | 0 - Primary commands (general information) | | 1 - Miscellaneous commands LOCATE RESET CANCEL SA | | VE | | PROFILE RECOVERY SUBMIT | | 2 - FIND/CHANGE commands FIND CHANGE EXCLUDE | | 3 - Number control commands NUMBER RENUM UNNUM | | 4 - Display mode control CAPS HEX NULLS TA | | BS | | commands NOTE BOUNDS | | 5 - Termination control AUTONUM AUTOLIST STATS PA | | CK | | commands AUTOSAVE VERSION LEVEL | | 6 - External data commands CREATE REPLACE COPY MO | | VE | | MODEL | | 7 - Macro control commands DEFINE IMACRO RMACRO BU | | ILTIN | | 8 - Data editing commands DELETE SORT EDIT | +---------------------------------------------------------------------------+ +---------------------------------------------------------------------------+ | HELP panel PDF EDIT Topic 12.2 PANEL NAME = ISR2M200 | +---------------------------------------------------------------------------+ | TUTORIAL ----- EDIT FIND/CHANGE/EXCLUDE PRIMARY COMMANDS ------ TUTORIAL | | OPTION ===> _ | | | | The FIND, CHANGE, and EXCLUDE primary commands are used to find specif | | ied | | character strings in the data, to change them to other character strin | | gs, | | or to exclude the lines containing those strings. The FIND command in | | edit is similar to the FIND command in browse. | | | | The following commands are presented in sequence, or may be selected by | | name: | | | | FIND - to find a specified character string. | | CHANGE - to find and then change a specified character string. | | EXCLUDE - to exclude lines containing a specified character string. | +---------------------------------------------------------------------------+ +---------------------------------------------------------------------------+ +---------------------------------------------------------------------------+ | TUTORIAL --------------- EDIT - 'FIND' COMMAND --------------- TUTORIAL | | OPTION ===> _ | | | | The FIND command is used to find and display the next occurrence of a | | character string in the data being edited. It can be abbreviated F . | | COMMAND ===> find xxx finds the next "xxx". | | | | The cursor is placed at the beginning of the string. Automatic scro | | lling | | will be performed, if necessary, to bring the string into view. | | | | Topics are presented in the following sequence, or may be selected by | | number: | | 1 - Specifying the character string | | 2 - Limiting the search to a specified range of lines. | | 3 - Limiting the search to specified columns | | 4 - Optional parameters that can be used to indicate the direction | | and starting point of the search ( next, prev, first, last, all ) | | 5 - Optional parameters that can be used to limit the strings to be | | found ( chars, prefix, suffix, word ) | | 6 - Optional parameters that can be used to limit the lines to be | | searched ( x, nx or ex ) | | 7 - Using the RFIND (repeat find) command | | 8 - Error and information messages | | 9 - Syntax rules when using optional parameters | | | +---------------------------------------------------------------------------+ +---------------------------------------------------------------------------+ | HELP panel PDF EDIT Topic 11 PANEL NAME = ISR2L000 | +---------------------------------------------------------------------------+ | TUTORIAL -------------- EDIT - LINE COMMANDS ----------------- TUTORIAL | | OPTION ===> _ | | | | ----------------------------------- | | | EDIT LINE COMMANDS | | | ----------------------------------- | | | | The following topics are presented in sequence, or may be selected by | | number. Individual commands may be selected by entering the command | | name. | | 0 - Line commands - general information | | 1 - Basic commands | | I (insert), D (delete), R (repeat) | | 2 - Move/Copy commands | | C (copy), M (move), A (after), B (before), O (overl | | ay) | | 3 - Shifting commands | | ) (cols right), ( (cols left), > (data right), < (data left) | | 4 - Exclude/Show commands | | X (exclude), F (first), L (last), S (show) | | 5 - Text handling commands | | TS (text split), TF (text flow), TE (text enter), | | LC (lowercase), UC (uppercase) | | 6 - Miscellaneous commands | | BNDS (bounds), COLS (columns), MASK (mask), TABS (tabs) | +---------------------------------------------------------------------------+ Brief Exercises using the PDF editor The several examples which follow in a self-discovery process will provide an insight into the following usage: Use of UNDO edit command Use of Find (F), Change (C), and edit picture strings Use of Delete (DEL) Use of FLIP edit command Use of LOCATE (LOC) edit command Use of HELP (PFK-1) Use of edit macros -- NXNX, @DATE Use of Exclude (X), and Reset (RES) Use of Profile (PROF) in edit Before starting the self-discovery process you may create a sample such as the found on page EDITOR-1 to work with by creating your own text member by copying in the content of IS03.SHARE.TEXT(EDITORS). save member containing copied material save save member containing copied material Use of UNDO and RECOVERY prof 7 show your profile, and note the value of SETUNDO in your profile. Also note value of RECOVERY in your profile setundo stg ensure that SETUNDO STG appears in your pro- file. Also acceptable is SETUNDO REC. x all exclude all lines from display c all 'a' 'XX' make a gross change that messes up member c all 'I' 'ZZ' make another gross change that messes up member SPELL checks spelling using SCRIPT/VS @SPELLS checks spelling using SAS undo undo the previous change undo undo the previous change undo attempt to undo anything more should fail reset reset undisplayed (X) lines cancel (all example end in cancel to insure no changes) Start over with original content for each ex- ample. x all exclude all lines from display f string1 first find the first occurrence of "string1" f string2 all <--- something else that exists e.g. "couple" flip lines that were excluded become only non- excluded lines flip flip back, to reverse previous flip labnx label the NX lines (labnx is one of our edit macros) x string1 all exclude all string1 occurences loc label The next labelled line will be displayed on the first data line of the display. loc label locate to the next label loc 0 the display area will start at the top loc label locate to the next label (in this case the first) loc ??? Force examination of HELP for LOCATE command help Use PFK-1 (PF1) HELP help When you have examined HELP screens, return ... (PFK3) using PFK-3 (PF3) END to return to edit f p'???' Force examination of HELP for Picture strings help Use PFK-1 (PF1) HELP help When you have examined HELP screens, return ... (PFK3) using PFK-3 (PF3) END to return to edit x all nxnx label NX the all labeled lines. Display the excluded labeled lines. (NXNX is one of our edit macros). res label Reset Label. Remove labels from lines. res reset x all string1 res reset f c'B' char, the case must match as entered f c'b' char, the case must match as entered &f t'T' text, in uppercase, lowercase, or mixed will match continue to hit enter key until *BOTTOM OF DATA REACHED* is displayed in upper right hand cor- ner. The use of reiteration is similar to the repeated use of RFIND (PFK-5). @DATE Look in upper right corner (@DATE is one of our edit macros) @DATE 97360 Look in upper right corner, then hit pf-1 (help) for additional information help See additional information and formats PROF show your profile loc .zl Locate to the Last line (.ZL) loc .zf Locate to the First line (.ZF) loc 0 Locate to above the first line res reset prof 7 Display 7 profile lines (columns is the eighth). Please note the value of RECOVERY be- fore proceeding. recovery off turn recovery off. You loss recoverability of this edit session if your session terminates, but may greatly improve performance when work- ing with a large file. Do not confuse with SETUNDO STG which in itself applies only the the current session and not terminated ses- sions. =PROF> ....TEXT (VARIABLE - 251)....RECOVERY OFF....NUMBER OFF..... =PROF> ....CAPS OFF....HEX OFF....NULLS ON ALL....TABS OFF......... =PROF> ....AUTOSAVE ON....AUTONUM OFF....AUTOLIST OFF....STATS ON.. =PROF> ....PROFILE UNLOCK....IMACRO NONE....PACK OFF....NOTE ON.... =TABS> * * * * * * =MASK> =BNDS> < recovery on if your session terminates you can continue later, when you get back on the system =PROF> ....TEXT (VARIABLE - 251)....RECOVERY ON.....NUMBER OFF..... =PROF> ....CAPS OFF....HEX OFF....NULLS ON ALL....TABS OFF......... =PROF> ....AUTOSAVE ON....AUTONUM OFF....AUTOLIST OFF....STATS ON.. =PROF> ....PROFILE UNLOCK....IMACRO NONE....PACK OFF....NOTE ON.... =TABS> * * * * * * =MASK> =BNDS> < reset Examples that delete many lines For each example start over with fresh text Delete all lines in the member. x all exclude all lines from display del x all delete the line(s) which are displayed cancel cancel -- no update, preserve original content Delete all lines containing string1 x all exclude all lines from displayed f string1 all find all occurrences of "string1" del nx all delete the line(s) which are displayed (view- able) (delete the non-excluded lines -- i.e. viewable lines) reset reset -- all lines are now redisplayed cancel cancel -- no update, preserve original content Delete all lines which are displayed del nx all delete the line(s) which are displayed (view- able) cancel cancel -- no update, preserve original content Delete all blank lines in the member reset reset -- all lines are now displayed x p'ª' exclude all non-blank lines from display del nx all delete the line(s) which are displayed cancel cancel -- no update, preserve original content Example to create a subset of a member and then merge it in front of the original text select member1 select member1 (any member) from edit panel x all exclude all lines from display f string1 all find all occurrences of "string1" del x all delete all excluded lines copy member1 after .zf copy original member after current content Examples of compound commands (using semi-colon as the command delimiter) tso %$MIDITL cursor;down;find $ 2 --- find p'<#' next; f p'#' --- help print;right;print;right (left is tutorial prev, right is tutorial next page) --- * from within edit of JCL !EDCHEK; LOC 0 --- find p'<#' next; f p'#' --- Example of getting into EDIT with an initial search invoked on your behalf tso %NETWORK smith find lastname Smith (in column 14 of file). The following explanation is included as a possible item of interest. The NET- WORK execute will edit a dataset containing the Network Phone Directory using a slightly modified panel that allows an initial command to be entered, in this case "FIND 14 smith". This is also available as a command issued by panel 5, choosing option 15 but not hitting enter until the option 15 line is filled in with "SMITH". The panel below indicates one method of copying a member from another PDS li- brary into your own. After you have copied "IS03.SHARE.TEXT(EDITORS)" into your OWN library you may use your OWN copy for the examples in the previous topic. Copy the example from 'IS03.SHARE.TEXT(EDITORS)' using into an empty member of your own library as follows: EDIT---- xxxx.xxxxx.xxxxxx(xxxxx) - 01.00 - COLUMNS 001 124 COMMAND ===> COPY SCROLL ===> CSR A***** **************************** TOP OF DATA ***************************** ****** ************************* BOTTOM OF DATA ***************************** +------------------------------------------------------------------------------+ | From within PDF 2.2 (EDIT), then ===> COPY | +------------------------------------------------------------------------------+ | PANEL NAME = ISRECPY1 | | ISRECPY1 -------------------- EDIT - COPY --------------------------------- | | COMMAND ===> _ | | "CURRENT" DATA SET: xxxxxxxx.xxxxxxxx.xxxxxxxx(xxxxxxxx) | | | | FROM ISPF LIBRARY: | | PROJECT ===> IS03 | | GROUP ===> S9999 ===> ===> ===> | | TYPE ===> LIST | | MEMBER ===> (Blank or pattern for member selection list)| | | | FROM OTHER PARTITIONED OR SEQUENTIAL DATA SET: | | DATA SET NAME ===> 'IS03.SHARE.TEXT(EDITORS)' | | VOLUME SERIAL ===> (If not cataloged) | | | | DATA SET PASSWORD ===> (If password protected) | | | | LINE NUMBERS (Blank for entire member or seq. data set) | | FIRST LINE ===> | | LAST LINE ===> | | NUMBER TYPE ===> (STANDARD, COBOL, or RELATIVE) | | | | Press ENTER key to copy. | +------------------------------------------------------------------------------+ EDIT---- xxxx.xxxxx.xxxxxx(xxxxx) - 01.00 - COLUMNS 001 124 COMMAND ===> x all SCROLL ===> CSR ****** **************************** TOP OF DATA ***************************** 000001 ******* used in exercise -- described in Intro to PDF editor 000002 In this sample 000003 the character string "string1" occurs 000004 on a couple of lines. 000005 This is the second occurence of "string1". 000006 000007 String2 occurs only once. 000008 Big bigger biggest -- sample for f c'b' ****** ************************* BOTTOM OF DATA ***************************** These instructions have been for ISPF/PDF on TSO, but you can transfer your skills to the PC world by purchasing SPF/PC for your PC with OS/2 1.2 or higher, or with DOS 3.0 or higher. SPF/PC runs on 80386 processors. If you use OS/2 you have REXX available to you with OS/2. If you do not have OS/2 you would have to install CTC's REXX that comes with SPF/PC. The phone number for Command Technology Corporation is (510)-521-5900. I believe a UNIX version can also be obtained from CTC.