ISPF EDIT Line Commands

26
ISPF EDIT line commands The following topics are presented in sequence, or can be selected by number. Individual commands can be selected by entering the command name. 0 - Line commands: General information 1 - Basic commands: I D R 2 - Move/Copy commands: C M A B O 3 - Shifting commands: ) ( > < 4 - Exclude/Show commands: X F L S 5 - Text handling commands: TE TF TS LC UC 6 - Miscellaneous commands: BNDS COLS MASK TABS 7 - Data commands: MD NOTE : To find undisplayable/invalid characters issue the following command on the command prompt. F P'.' A line command is an edit command that is entered directly on the line to be processed. It is entered by overtyping the sequence number at the beginning of the line. In the example at the right, two ################################ line commands have been entered. | EDIT - DEMO.MYLIB.PLI(MEMBER) | 000300 IF DATA = 1 THEN A D (delete) command has been | 000400 DO; entered on line 500. ==> | d 0500 DO; | 000600 XDATA( 1) = 0; An R (repeat) command has been ==> | r 0700 END; entered on line 700. | Command ===> Three of the most commonly used line commands are I (insert), D (delete), and R (repeat). Together they provide the most basic line editing functions. I - insert line (to insert one or more lines of new data) D - delete line (to delete one line, several lines, or a block of lines) R - repeat line (to repeat a single line one or more times, or to repeat a block of lines one or more times).

Transcript of ISPF EDIT Line Commands

Page 1: ISPF EDIT Line Commands

ISPF EDIT line commands The following topics are presented in sequence, or can be selected by number. Individual commands can be selected by entering the command name. 0 - Line commands: General information 1 - Basic commands: I D R 2 - Move/Copy commands: C M A B O 3 - Shifting commands: ) ( > < 4 - Exclude/Show commands: X F L S 5 - Text handling commands: TE TF TS LC UC 6 - Miscellaneous commands: BNDS COLS MASK TABS 7 - Data commands: MD NOTE : To find undisplayable/invalid characters issue the following command on the command prompt. F P'.'

A line command is an edit command that is entered directly on the line to be processed. It is entered by overtyping the sequence number at the beginning of the line. In the example at the right, two ################################ line commands have been entered. | EDIT - DEMO.MYLIB.PLI(MEMBER) | 000300 IF DATA = 1 THEN A D (delete) command has been | 000400 DO; entered on line 500. ==> | d 0500 DO; | 000600 XDATA( 1) = 0; An R (repeat) command has been ==> | r 0700 END; entered on line 700. | Command ===> Three of the most commonly used line commands are I (insert), D (delete), and R (repeat). Together they provide the most basic line editing functions. I - insert line (to insert one or more lines of new data) D - delete line (to delete one line, several lines, or a block of lines) R - repeat line (to repeat a single line one or more times, or to repeat a block of lines one or more times). Use I to insert one or more lines into the data. I - causes one line to be inserted. I3 - causes 3 lines (or any number of lines) to be inserted. 000300

Page 2: ISPF EDIT Line Commands

i 0400 a line is to be inserted after this line. 000500 causes 000300 000400 a line is to be inserted after this line. '''''' _ 000500 An "insert" line is identified by ('''''') in the sequence field. (continued on next page) Each "insert" line is initialized with a mask. The mask can be displayed and modified by using the MASK line command. Initially the mask is a blank line. The cursor is always placed on the first "insert" line on the screen. If the ENTER key is pressed without entering any data on an "insert" line, the line is deleted from the screen. Once data has been entered on an "insert" line, the line is assigned a sequence number. If the ENTER key is pressed after entering data and if the cursor is left on the line, another line will be inserted automatically. This can be done repeatedly to enter any number of lines. Use D or DD to delete one or more lines. D - identifies a single line that is to be deleted. D5 - identifies the first of 5 (or any number) of lines to be deleted DD - identifies the first and last lines of a block of lines to be deleted. 000300 d 0400 This single line will be deleted. 000500 or dd 700 This block 000800 of three lines dd 900 will be deleted. 001000 Use R or RR to repeat one or more lines. R - identifies a single line that is to be repeated. R5 - identifies a line that is to be repeated 5 times. RR - identifies the first and last lines of a block of lines to be repeated. RR2 - identifies the first and last lines of a block to be repeated 2 times. 000300 r3 400 This single line will be repeated 3 times. 000500 or rr 700 This block 000800 of three lines

Page 3: ISPF EDIT Line Commands

rr 900 will be repeated. 001000 The five line commands listed below are used to specify either the source or destination of a move or copy operation. To move or copy lines within the data that is being edited: - Use M or C line commands to specify the source. - Use A, B, or O line commands to specify the destination. To move or copy data in from a data set or member: - Use COPY or MOVE primary command to specify the source. - Use A or B line commands to specify the destination. To move or copy data out to a data set or member. - Use M or C line commands to specify the source. - Use CREATE or REPLACE primary commands to specify the destination. The following commands are presented in sequence, or may be selected by name: C - to identify the source of a copy operation. M - to identify the source of a move operation. A - to identify the destination of a move/copy operation. B - to identify the destination of a move/copy operation. O - to identify the destination of an move/copy overlay operation. Use C or CC to copy one or more lines. After a line has been copied it will exist in both its original and new location. C - identifies a single line that is to be copied. C3 - identifies the first of 3 (or any number) of lines to be copied. CC - identifies the first and last lines of a block of lines to be copied. 000300 c 0400 This single line will be copied. or cc 600 This block 000700 of three lines cc 800 will be copied. The destination of the line(s) to be copied can be specified using: - A, B, or O line commands if the line(s) are to be copied to another place in the data being edited. - CREATE or REPLACE primary commands if the lines are to be copied to a sequential data set (REPLACE) or to a member of a partitioned data set (CREATE or REPLACE). Use M or MM to move one or more lines. After a line has been moved it will exist only in its new location. M - identifies a single line that is to be moved. M3 - identifies the first of 3 (or any number) of lines to be moved. MM - identifies the first and last lines of a block of lines to be moved. 000300 m 0400 This single line will be moved. or mm 600 This block 000700 of three lines mm 800 will be moved.

Page 4: ISPF EDIT Line Commands

The destination of the line(s) to be moved can be specified using: - A, B, or O line commands if the line(s) are to be moved to another place in the data being edited. - CREATE or REPLACE primary commands if the lines are to be moved to a sequential data set (REPLACE) or to a member of a partitioned data set (CREATE or REPLACE). The A (after) line command identifies the destination when data is to be moved or copied after a line in the data. 000300 a 0400 Data will be moved or copied after this line. 000500 The source of the data for a move or copy operation can be specified using: - C or M line commands if a single line is to be copied or moved from another part of the data being edited. - CC or MM line commands if a block of lines is to be copied or moved from another part of the data being edited. - COPY or MOVE primary commands if a member of a partitioned data set or a sequential data set is to be moved or copied into the data being edited. If a line or lines are to be moved or copied from another part of the data, you can specify a number on the A command and the line or lines will be repeated 'n' times. For example: A4 results in four copies of the line at the destination. The B (before) line command identifies the destination when data is to be moved or copied before a line in the data. 000300 b 0400 Data will be moved or copied before this line 000500 The source of the data for a move or copy operation can be specified using: - C or M line commands if a single line is to be copied or moved from another part of the data being edited. - CC or MM line commands if a block of lines is to be copied or moved from another part of the data being edited. - COPY or MOVE primary commands if a member of a partitioned data set or a sequential data set is to be moved or copied into the data being edited. If a line or lines are to be moved or copied from another part of the data, you can specify a number on the B command and the line or lines will be repeated 'n' times. For example: B4 results in four copies of the line at the destination. Use the O (overlay) command to indicate the target when you want to merge lines. Overlay is used in conjunction with M or C line commands. O - identifies a single line that is to be overlaid. O3 - identifies the 1st of 3 (or any number of) lines to be overlaid. OO - identifies the first and last lines of a block of lines to be overlaid. o 0400 This single line will be overlaid. or oo 600 This block 000700 of three lines

Page 5: ISPF EDIT Line Commands

oo 800 will be overlaid. The source of the data for an overlay operation can be specified using: - C or M line commands when data from one or more lines is to overlay data on the line(s) specified with the overlay command. - CC or MM line commands when data from a block of lines is to overlay data on the lines specified with the overlay command. (continued on next page) Move or copy with overlay can be used to merge data from one or more source lines onto one or more destination lines. The following rules apply: - Data is processed character by character. - Only blank characters are overlaid. - Source lines will be used repeatedly until all destination lines are processed. - Only standard data lines can be used in the overlay operation. Special lines such as MASK or COLS lines are ignored as both source and destination lines. - If move is specified, the source lines will be deleted after the move operation is complete, but only if all of the source lines were processed, and only if all data from the source lines could be moved to the destination. Example: c 0300 /* */ 000400 o3 500 A1 = B1; 000600 A2 = B2; 000700 A3 = B3; 000800 H1 = A1 * B2; Result: 000300 /* */ 000400 000500 A1 = B1; /* */ 000600 A2 = B2; /* */ 000700 A3 = B3; /* */ 000800 H1 = A1 * B2; Two kinds of shifting are provided. Column shifting shifts either to the left or right without regard to the data contained in a line. Data shifting shifts data within the line, and is designed primarily for use with indented program code. The following topics are presented in sequence, or may be selected by name: ) - Shift right one or more columns. ( - Shift left one or more columns. > - Shift data right one or more characters. < - Shift data left one or more characters. Use ) or )) to shift columns right on one or more lines. ) - Identifies a line on which columns are to be shifted right by 2.

Page 6: ISPF EDIT Line Commands

)5 - Identifies a line on which columns are to be shifted right by 5. )) - Identifies the first and last lines of a block of lines on which columns are to be shifted right by 2. ))3 - Identifies the first and last lines of a block of lines on which columns are to be shifted right by 3. 000300 ) 0400 This line will be shifted right 2 columns. 000500 or )) 700 These four lines will 000800 be shifted right 000900 by 99 columns, ))99 0 causing all data on all four lines to be lost. The following topic will be presented only if selected by number: 1 - Rules followed when shifting columns right Use ( or (( to shift columns left on one or more lines. ( - Identifies a line on which columns are to be shifted left by 2. (5 - Identifies a line on which columns are to be shifted left by 5. (( - Identifies the first and last lines of a block of lines on which columns are to be shifted left by 2. ((6 - Identifies the first and last lines of a block of lines on which columns are to be shifted left by 6. 000300 ( 0400 This line will be shifted left 2 columns. 000500 or (( 700 These four lines 000800 will be shifted left 000900 by eleven columns ((11 0 causing loss of data on the 1st and 4th lines. The following topic will be presented only if selected by number: 1 - Rules followed when shifting columns left Use > or >> to shift data right on one or more lines. > - Identifies a line on which data is to be shifted right 2 columns. >5 - Identifies a line on which data is to be shifted right 5 columns. >> - Identifies the first and last lines of a block of lines on which data is to be shifted right 2 columns. >>3 - Identifies the first and last lines of a block of lines on which data is to be shifted right 3 columns. 000300 > 0400 Data on this line will be shifted right 2 columns. 000500 or >> 700 Data on these 000800 three lines will be >>4 00 shifted right 4 columns. 001000 The following topic will be presented only if selected by number: 1 - Rules followed when shifting data right

Page 7: ISPF EDIT Line Commands

Use < or << to shift data left on one or more lines of data. < - Identifies a line on which data is to be shifted left 2 columns. <5 - Identifies a line on which data is to be shifted left 5 columns. << - Identifies the first and last lines of a block of lines on which data is to be shifted left 2 columns. <<6 - Identifies the first and last lines of a block of lines on which data is to be shifted left 6 columns. 000300 < 0400 Data on this line will be shifted left 2 columns. 000500 or << 700 Data on these 000800 three lines will be <<4 00 shifted left 4 columns. 001000 The following topic will be presented only if selected by number: 1 - Rules followed when shifting data left A feature of edit is the ability to exclude lines from display. The lines are not deleted; they are in virtual storage, but are not displayed on the screen. The following topics are presented in sequence, or may be selected by name: X - Exclude one line, several lines, or a block of lines. F - Show the first line(s) from a block of excluded lines. L - Show the last line(s) from a block of excluded lines. S - Show the most significant line(s) from a block of excluded lines. Use X or XX to exclude one or more lines of data from being displayed on the screen. X - identifies a line to be excluded. X5 - identifies the first of 5 (or any number of) lines to be excluded. XX - identifies the first and last lines of a block of lines to be excluded. 000300 x 0400 This single line will be excluded. 000500 OR xx 700 This block 000800 of three lines xx 900 will be excluded. 001000 Use the F line command to display the first line(s) of a block of excluded lines. F - indicates that the first line of the block is to be displayed. F3 - indicates that the first 3 (or any number of) lines are to be displayed. 000300 f - - - - - - - - - - - - - 10 LINE(S) NOT DISPLAYED 001400 (will display the first of the above 10 lines). f10 - - - - - - - - - - - - 33 LINE(S) NOT DISPLAYED

Page 8: ISPF EDIT Line Commands

005800 (will display the first 10 of the above 33 lines). An F on lines other than excluded lines is ignored. If the number used with an F is greater than the number of excluded lines, all of the excluded lines will be displayed. Lines are excluded using the X line command. Use the L line command to display the last line(s) of a block of excluded lines. L - indicates that the last line of the block is to be displayed. L3 - indicates that the last 3 (or any number of) lines are to be displayed. 000300 l - - - - - - - - - - - - - 10 LINE(S) NOT DISPLAYED 001400 (will display the last of the above 10 lines). l10 - - - - - - - - - - - - 33 LINE(S) NOT DISPLAYED 005800 (will display the last 10 of the above 33 lines). An L on lines other than excluded lines is ignored. If the number used with an L is greater than the number of excluded lines, all of the excluded lines will be displayed. Lines are excluded using the X line command. Use the S line command to show the structure of one or more lines of a block of excluded lines. S - indicates that one line is to be shown. S3 - indicates that 3 lines are to be shown. 000300 s - - - - - - - - - - - - - 10 LINE(S) NOT DISPLAYED 001400 (will display one of the above 10 lines). s10 - - - - - - - - - - - - 33 LINE(S) NOT DISPLAYED 005800 (will display 10 of the above 33 lines). When a group of lines is excluded, an S can be used to show some, but not all of them. Data indentation is used to determine which lines will be shown. The lines with the left-most indentation are displayed. If several lines are indented equally, the first lines are shown. An S on lines other than excluded lines is ignored. If the number used with an S is greater than the number of excluded lines, all of the excluded lines will be displayed. Lines are excluded using the X line command. The text handling commands are designed to be used when you are entering or modifying textual data. They are especially useful when used together. For example, use text split, enter a word or phrase, and then use text flow to reformat the paragraph. The following topics are presented in sequence, or may be selected by name: TS - text split, to split a text line at the cursor to allow insertion TF - text flow, to flow text to the end of a paragraph TE - text enter, to format the screen for power typing one or more text paragraphs

Page 9: ISPF EDIT Line Commands

LC - lowercase, to change text from uppercase to lowercase UC - uppercase, to change text from lowercase to uppercase Use TS to split text in two at the point of the cursor to allow a word, phrase, or sentence to be inserted. The example below shows how the text is split. The text that follows the cursor is shifted to line up with the left margin of the paragraph, and an extra line is inserted. 000300 ts 400 This line will be split in two to allow insertions 000500 into the text. - 000300 000400 This line will be split in two '''''' - 000410 to allow insertions 000500 into the text. The following topics are presented in sequence, or may be selected by number: 1 - Details of text split processing 2 - Using bounds with the TS command A number following a TS command indicates the number of lines to be inserted between the two parts of the text. For example, TS3 causes 3 lines to be inserted between the two sections of text. Inserted lines are the same as lines created by the I (insert) line command. They are automatically deleted if no text is entered on them. 000300 ts3 00 This line will be split in two to allow insertion 000500 of textual data. - 000300 000400 This line will be split in two '''''' - '''''' '''''' 000410 to allow insertion 000500 of textual data. Replacing a word or phrase is easy with the TS command since you can enter the command and blank out the phrase to be deleted in the same interaction. In the example below, the command was entered and the words "in two" were blanked out. Note that the cursor has been moved to be ready for text to be entered at the point of the split. 000300 ts 400 This line will be split to allow insertion 000500 of textual data. - 000300 000400 This line will be split '''''' - 000410 to allow insertion 000500 of textual data. By setting the bounds, you can edit text on one part of a line without affecting the remaining text. Only the text that falls between the specified bounds will be affected by the TS command.

Page 10: ISPF EDIT Line Commands

=BNDS> < > ts 400 This is text data on the This is text data on the 000500 left side. - right side. 000400 This is text data This is text data on the '''''' - 000410 on the 000500 left side. right side. Use TF to flow fragments of sentences into a paragraph. tf 400 This text 000500 which is on several lines will be reflowed so that 000600 it will form 000700 a more reasonable looking paragraph. 000400 This text which is on several lines will be 000500 reflowed so that it will form a more reasonable 000600 looking paragraph. The following topics are presented in sequence, or may be selected by number: 1 - Details of text flow processing. 2 - Specifying a right margin. 3 - Rules for end of sentence handling. The TF command starts at the current line, and flows text up to the end of a paragraph. Either a blank line or a change in indentation indicates the end of the paragraph. Any temporary lines (such as COLS or BNDS) are deleted before text is flowed. A short line is first filled in with text moved up from the following line, then text on the second line is shifted into the left column, and the process is repeated to the end of the paragraph. A single blank character is normally used to separate existing text from the words that are moved in from the following line. If an end of sentence is detected, two blanks are inserted. Multiple blanks in the middle of a line are left unchanged. They are not compressed out by the TF command. Using TF with a column number changes the width of a paragraph. This is useful in reformatting text so that it is entirely on the screen. It can then be reviewed or changed, after which it can be reflowed back to its original width. Enter TF36 (or any column number) to indicate that text is to be flowed to column 36. If the number is too small (less than the left margin of the paragraph) or is too large (greater than the right bound) it will be ignored,and text will be flowed out to the right bound. If no numeric suffix is specified, and the bounds are set to their default values, and that right bound is "off the screen", the text is flowed to fit the display width. tf36 0 This text which extends out to column 56 will be 000500 reflowed to column 36 so that changes are easier to 000600 insert.

Page 11: ISPF EDIT Line Commands

000400 This text which extends out 000500 to column 56 will be reflowed 000600 to column 36 so that changes 000700 are easier to insert. When flowing data, if the end of a sentence is recognized two blanks are inserted instead of one. The following are recognized as the end of a sentence. . . . end of sentence: . . . end of sentence. . . . end of sentence? . . . end of sentence! . . . end of sentence." . . . end of sentence?" . . . end of sentence!" . . . end of sentence.) . . . end of sentence?) . . . end of sentence!) Use TE to cause the display to be formatted in text entry mode. This mode is used for bulk entry of text and allows power typing techniques to be used at the terminal. The cursor is placed at the start of the first line, and the rest of the screen appears blank. You type in data without regard to end of line considerations. When you press ENTER, the data will be reflowed into one or more paragraphs. 000300 One or more paragraphs of text are to be te 400 entered following this paragraph. 000500 This paragraph will then be preceded ... 000300 One or more paragraphs of text are to be 000400 entered following this paragraph. - You can use power typing without worrying about reaching the end of a line, or overtyping line numbers, because the line number fields are blanked out and protected so that you skip right over them. After you have entered text, you can scroll down and continue entering in bulk mode, or you can press ENTER to cause the text to be flowed into a paragraph. 000300 One or more paragraphs of text are to be entered 004400 following this line. The text entry command formats the display so that entr y of text can be made without regard to end of line consider ations. 000300 One or more paragraphs of text are to be entered 000400 following this line. 000410 The text entry command formats the display so that 000420 entry of text can be made without regard to end of line 000430 considerations. Use the lowercase command LC to change one or more lines of text from uppercase into lowercase. Following the lowercase command with a number will cause multiple text lines to be changed to lowercase, starting with

Page 12: ISPF EDIT Line Commands

the line on which the command is entered. Enter LCC in the line command areas of the first and last lines of a block of lines to be translated. The lowercase command affects only alphabetic characters. Use of the command does not affect the caps mode of the data you are editing. 000006 THIS IS A LINE OF TEXT IN UPPERCASE CHARACTERS lc3 07 THIS LINE OF TEXT AND THE TWO AFTER IT ARE 000008 TO BE TRANSLATED BY THE LOWERCASE COMMAND. 000009 1, 2, 3, &, @ AND SO ON ARE NOT AFFECTED. 000010 THIS IS A LINE OF TEXT IN UPPERCASE CHARACTERS 000006 THIS IS A LINE OF TEXT IN UPPERCASE CHARACTERS 000007 this line of text and the two after it are 000008 to be translated by the lowercase command. 000009 1, 2, 3, &, @ and so on are not affected. 000010 THIS IS A LINE OF TEXT IN UPPERCASE CHARACTERS Use the uppercase command UC to change one or more lines of text from lowercase into uppercase. Following the uppercase command with a number will cause multiple text lines to be changed to uppercase, starting with the line on which the command is entered. Enter UCC in the line command areas of the first and last lines of a block of text to be translated. The uppercase command affects only alphabetic characters. Use of the command does not affect the caps mode of the data you are editing. 000006 this is a line of text in lowercase characters ucc 07 this line of text and the two after it are 000008 to be translated by the uppercase command. ucc 09 1, 2, 3, &, @ and so on are not affected. 000010 this is a line of text in lowercase characters 000006 this is a line of text in lowercase characters 000007 THIS LINE OF TEXT AND THE TWO AFTER IT ARE 000008 TO BE TRANSLATED BY THE UPPERCASE COMMAND. 000009 1, 2, 3, &, @ AND SO ON ARE NOT AFFECTED. 000010 this is a line of text in lowercase characters Each of the following line commands causes a special line to be inserted on the screen where the command was entered. These special lines are not part of the data and are never saved with the data. They need not be removed but, if you wish, you can either delete them individually using the D line command or all at once using the RESET primary command. (Since all of the records are processed when a RESET command is executed, deleting an individual line is more efficient than using RESET).

The FIND, CHANGE and EXCLUDE primary commands are used to find specified character strings in the data, to change them to other character strings or to exclude the lines that contain those strings. The FIND command in edit is similar to the FIND command in browse. The following commands are presented in sequence, or can 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 that contain a specified character string.

Page 13: ISPF EDIT Line Commands

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 scrolling 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 On every FIND command, you must specify the string of characters to be located. In most cases you simply enter FIND or its abbreviation F followed by the character string. Example - ===> find demo If you want to use the same string that was used in the previous FIND command, use an * (asterisk). Example - ===> find * 40 60 (find demo in columns 40 to 60) In some cases, you want to find a string of characters that cannot be entered in the simple format shown above. For these cases, special strings can be entered. For example, if you want to find the expression "A = B" which contains blank characters you use a delimited string. Example - ===> find 'a = b' The following topics are presented in sequence, or may be selected by number: 1 - Delimited strings 4 - Text strings 2 - Hex strings 5 - Character strings 3 - Picture strings A delimited string begins and ends with either apostrophes (') or quotes("). There are special cases where the string to be found must be entered as a delimited string. If you are not sure whether or not a delimited string is required, use the delimiters, as they are always valid. The special cases where delimited strings are required are: - if the string contains blanks, commas, apostrophes, or quotes, or - if the string could be interpreted as a find keyword parameter, a column indicator, or is an asterisk. Examples: ===> find "do it" find a string which contains a blank. ===> find '*' find an asterisk. ===> find 'all' first find the first occurrence of string "all". ===> find all 'first' find all occurrences of the string "first". ===> find "Tom's" find a string which contains an apostrophe.

Page 14: ISPF EDIT Line Commands

===> find 'part "A"' find a string which contains quotation marks. To find a string of hexadecimal digits you use a hex string. A hex string is a quoted string that is preceded or followed by the letter "X". A hex string must contain only hexadecimal digits (0-9, A-F) and there must be an even number of digits. Examples - ===> find x'00' or ===> f 'ffff'x or ===> f x"f1f2" or ===> find "a1a4"x If you enter an invalid hex string, an error message will be displayed. Examples of invalid hex strings are: ===> find x'000' - odd number of hex digits ===> find x'fm2b' - not all hexadecimal digits A picture string is used to describe the type of string to be found instead of the exact characters to be found. Example - ===> find p'¬' 1 find non-blank in column 1 A picture string is a quoted string that is preceded or followed by the letter "P". It can contain blanks, alphabetic and numeric characters which represent themselves, or any of the special characters listed below, each of which represents a class of characters. = any character . invalid characters @ alphabetic characters - non-numeric characters # numeric characters < lower case alphabetics $ special characters > upper case alphabetics ¬ non-blank characters Where possible, the special characters were selected to make them easy to remember. For example, $ for special characters, # for numbers, ¬ (not sign) for non-blank, < (less than) for lower case. 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 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 but not 99) find '@1'p 1 find label a1,b1,c1, etc. in column 1 find p'<' find the next lower case alphabetic character find p'¬' 72 find the next non-blank in column 72 A text string is used to find a character string regardless of whether alphabetic characters are upper or lower case. Example - ===> find t'this' find the text "this" A text string is a quoted string that is preceded or followed by the letter "T".

Page 15: ISPF EDIT Line Commands

All alphabetic characters within a text string are treated as if they were upper case and all alphabetic characters in the data that is being searched are treated as if they were upper case. In the example above, the word "this" could be entered in either upper or lower case, and the FIND command would locate an upper case "THIS", a lower case "this", or "This" at the beginning of a sentence (where only the first character is in upper case). A character string is used to find a character string exactly as entered. Example - ===> find c'This' find the characters "This" A character string is a quoted string that is preceded or followed by the letter "C". All characters within a character string are treated exactly as entered. The data is searched for an exact match. In the example above, the word "This" will be found , but 'this', 'THIS' , and other variations will not be found. You can limit the range of lines within the data that is searched by the FIND command by entering a pair of "labels" indicating the first and last lines to be searched. The string will be found if it is contained within the designated range. Command ===> find xxx .zcsr .zlast finds the first "xxx" in the range of lines from the current cursor position to the end of data. 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 combination of "system labels" (.ZFIRST, .ZCSR, .ZLAST) or user labels. The label representing the smaller relative line number will be used as the start of the range and the label representing the larger relative line number will be used as the end of the range regardless of the order in which they are specified. The following topic will be presented only if selected by number: 1 - Labels and Ranges You can limit the columns that are searched by the FIND command by entering a pair of column numbers indicating the first and last columns to be searched. The string will be found if it is completely contained within the designated columns. Command ===> find xxx 1 20 find "xxx" within cols 1-20 If columns are not specified, the columns to be searched will default to the columns defined by the BOUNDS line. If a single column is specified, the character string must start in the specified column. If the second column specified is larger than the record size, the record size is used.

Page 16: ISPF EDIT Line Commands

Normally the FIND command searches for the next occurrence of the specified character string, starting at the top of the displayed page (if the cursor is on line 2), or starting at the cursor position (if the cursor is within the data portion of the display). You can control the direction and scope of the search by entering one of the following optional parameters: NEXT PREV FIRST LAST ALL Command ===> find xxx prev scans for the previous "xxx" The following topics will be presented only if selected by number: 1 - Using the "next" parameter 2 - Using the "prev" parameter 3 - Using the "first" parameter 4 - Using the "last" parameter 5 - Using the "all" parameter Normally the FIND command will find any occurrence of the entire character string. You can control the portion of the string to be matched by entering one of the following optional parameters, thus limiting the strings that are found. CHARS PREFIX SUFFIX WORD Command ===> find xxx prefix scans for the prefix "xxx" The following topics will be presented only if selected by number: 1 - Using the "chars" parameter 2 - Using the "prefix" parameter 3 - Using the "suffix" parameter 4 - Using the "word" parameter Normally the FIND command will find any occurrence of the specified character string within the data being edited. You can limit the lines to be searched by entering one of the following optional parameters: X or EX - to search only excluded lines NX - to search only non-excluded lines Command ===> find xxx prefix x scan for the prefix "xxx" on x'ed (excluded) lines. Note: These parameters can be used only under edit; they do not apply to the FIND command under browse. The following topics will be presented only if selected by number: 1 - Using the "x" or "ex" parameter 2 - Using the "nx" parameter The RFIND (repeat find) command can be used to repeat the last FIND command that was entered. Since this command is sensitive to the current position of the cursor, it is normally entered via a PF key. (The default RFIND key is PF5 or PF17). By pressing the RFIND PF key repeatedly, you can find successive occurrences of a specified character string. After the "first"

Page 17: ISPF EDIT Line Commands

occurrence of a character string has been found, the RFIND key will find the "next" occurrence. After the "last" occurrence of a character string has been found, the RFIND key can be used to continue the search, wrapping around from the bottom line to the top line (or if the original direction of the FIND was toward the top of data, wrapping from the top line to the bottom line). The RFIND PF key will find or exclude each successive occurrence of the string specified in the last FIND, CHANGE, or EXCLUDE command. Whenever a FIND or RFIND command is entered, a message is displayed. The message will indicate that one of four results has taken place. - The command is invalid, incomplete or ambiguous. Examples - PUT STRING IN QUOTES or ENTER CHARACTER STRING - The requested character string was found. Examples - CHARS 'XXX' FOUND or 4 CHARS 'XXX' - All data was scanned without the character string being found. Examples - NO CHARS 'XXX' FOUND or NO SUFFIX 'ING' FOUND - Part of the data was scanned without finding the character string. Examples - *BOTTOM OF DATA REACHED* or *TOP OF DATA REACHED* (In this case, RFIND can be used to wrap around and continue scanning.) When optional keyword parameters or search boundaries are entered as part of the FIND command, they can be specified in any order and can be separated by either blanks or commas. Although normally not required, quotes or apostrophes can always be used to enclose the character string that is to be found, thereby avoiding any confusion with the keywords or boundaries. The following examples illustrate that the find string, keyword parameters, and boundaries can be entered in any order. The previous occurrence of the suffix "tion", within columns 20 to 40 is desired. Command ===> f tion prev suffix 20 40 Command ===> find prev suf "tion" 20 40 Command ===> f 'tion' 20,40 suffix prev Command ===> find,20,40,prev,suffix,tion Command ===> f prev 20 40 'tion' suffix If the FIND command cannot be interpreted, a prompting message will be displayed requesting you to correct it or complete it. The CHANGE command is used to find and change the next occurrence of a character string in the data being edited. Command ===> change xxx yyy changes the next "xxx" to "yyy". The cursor is placed at the end of the changed string. Automatic scrolling 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

Page 18: ISPF EDIT Line Commands

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 ) 7 - Using the RFIND (repeat find) and the RCHANGE (repeat change) commands 8 - Error and information messages 9 - Syntax rules when using optional parameters

On every CHANGE command, you must specify a "from" string and a "to" string. In most cases you simply enter CHANGE or its abbreviations CHG or C, followed by the two character strings. Example - ===> change demo test If you want to use the same string that was used in the previous CHANGE command, use an * (asterisk). Example - ===> chg * * 40 60 (change demo to test in cols 40 to 60) In some cases, you want to change a string of characters that cannot be entered in the simple format shown above. For these cases, special strings can be entered. For example, to change the expression "a = b" to "c = d" you must use delimited strings as the expressions contain blanks. Example - ===> c 'a = b' 'c = d' The following topics are presented in sequence, or may be selected by number: 1 - Delimited strings 4 - Text strings 2 - Hex strings 5 - Character strings 3 - Picture strings A delimited string begins and ends with apostrophes ('single quotes') or quotes ("double quotes"). There are special cases where a string must be entered as a delimited string. If you are not sure whether or not a delimited string is required, use the delimiters, as they are always valid. The special cases where delimited strings are required are: - if the string contains blanks, commas, apostrophes (or quotes), - if the string could be interpreted as a change keyword parameter, a column indicator, or is an asterisk. Examples: ===> chg "don't" do change don't to do ===> chg '"fast"' '"slow"' change "fast" to "slow" ===> c '*' '**' change single asterisk to double asterisk ===> change first 'all' many change the first occurrence of string "all" ===> chg 'first' '1st' all change all occurrences of the string "first" ===> chg '1' '2' 1 change digits "1" to "2" in column 1 ===> c 'AB"CD' "AB'CD" change AB"CD to AB'CD (embedded quote) To change a string of hexadecimal digits you use a hex string. A hex string is a quoted string that is preceded or followed by the letter "X". A hex string must contain only hexadecimal digits (0-9, A-F) and there must be an even number of digits. Examples - ===> chg x'00' 'ff'x

Page 19: ISPF EDIT Line Commands

or ===> chg "c1c2"x "a1a2"x Either or both of the strings in the CHANGE command can be hex strings. If you enter an invalid hex string, an error message will be displayed. Examples of invalid hex strings are: ===> chg x'000' 123 - odd number of hex digits ===> chg x'1234' x'fm2b' - not all hexadecimal digits. A picture string is used to describe the type of string to be changed instead of the exact characters to be changed. Example - ===> chg all p'¬' 'x' 72 change all non-blanks in column 72 to the character "x" A picture string is a quoted string that is preceded or followed by the letter "P". It can contain blanks, alphabetic and numeric characters which represent themselves, or any of the special characters listed below, each of which represents a class of characters. The special characters that can be used in a "from" 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 < - lower case alphabetics > - upper case alphabetics Examples of picture strings are: change p'.' x'00' change next invalid char to hex x'00' change p'###' 100 change next 3 digit number to 100. chg all 73 80 p'=' " " change any char in columns 73 to 80 to blank c all p'-' 1 10 "0" change all non-numeric characters in columns 1 to 10 into the char "0" c p'<' p'>' change any lower case to upper case c p'a>' p'=<' change char a, any upper case to char a, lower case c p'>' '¬' change any upper case to "not sign" (note: "not sign" has no special meaning in a "to" string) c p'<#' p'>=' change any lower case, any number to upper case, the number found A text string is used to change a character string regardless of whether alphabetic characters are upper or lower case. Example - ===> chg t'spf' SPF - to change the text "spf" to caps A text string is a quoted string that is preceded or followed by the letter "T". Any alphabetic characters within a text string are treated as if they were upper case and all alphabetic characters in the data that is being searched are treated as if they were upper case. In the example above, the CHANGE command would locate an upper case

Page 20: ISPF EDIT Line Commands

"SPF", a lower case "spf", or "Spf" (where only the first character is in upper case). In all cases, the string would be changed to "SPF" (as entered for the "to" string). A character string is used to change a character string which is found exactly as entered, as regards upper and lower case. Example - ===> chg c'DeCamp' 'deCamp'C find the characters "DeCamp" and change it to "deCamp". A character string is a quoted string that is preceded or followed by the letter "C". All characters within a character string are treated exactly as entered. The data is searched for an exact match. In the example above, the word "DeCamp" will be changed, but "decamp", "DECAMP", and other variations will not be changed. You can limit the range of lines within the data that is searched by the CHANGE command by entering a pair of "labels" indicating the first and last lines to be searched. The string will be changed if it is contained within the designated range. Command ===> c xxx yyy .zcsr .zlast changes the first "xxx" in the range of lines from the current cursor position to the end of data. 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 combination of "system labels" (.ZFIRST, .ZCSR, .ZLAST) or user labels. The label representing the smaller relative line number will be used as the start of the range and the label representing the larger relative line number will be used as the end of the range regardless of the order in which they are specified. The following topic will be presented only if selected by number: 1 - Labels and Ranges You can limit the columns that are searched by the CHANGE command by entering a pair of column numbers indicating the first and last columns to be searched. The "from" string will be found if it is completely contained within the designated columns. Command ===> chg xx yy 1 20 changes "xx" to "yy" in cols 1-20 If columns are not specified, the default columns specified by the BOUNDS line are used. If a single column is specified, the character string must start in the specified column. If the second column specified is larger than the record size, the record size is used. Note - The columns specified are used only in searching for the "from" string, and not in shifting data when a longer or shorter "to" string is specified. The BOUNDS line is used for the latter.

Page 21: ISPF EDIT Line Commands

Normally the CHANGE command searches for the next occurrence of the specified "from" string, starting at the top of the displayed page (if the cursor is on line 2), or at the cursor position (if the cursor is within the data portion of the edit display). You can control the direction and scope of the search by entering one of following optional parameters: NEXT PREV FIRST LAST ALL Command ===> chg xx yy prev changes the previous "xx" to "yy". The following topics will be presented only if selected by number: 1 - Using the "next" parameter 2 - Using the "prev" parameter 3 - Using the "first" parameter 4 - Using the "last" parameter 5 - Using the "all" parameter Normally the CHANGE command will find any occurrence of the entire "from" character string. You can control the portion of the string to be matched by entering one of the following optional parameters, thus limiting the strings that are found. CHARS PREFIX SUFFIX WORD Command ===> chg xx yy prefix changes the prefix "xx" to "yy" The following topics will be presented only if selected by number: 1 - Using the "chars" parameter 2 - Using the "prefix" parameter 3 - Using the "suffix" parameter 4 - Using the "word" parameter

Normally the CHANGE command will change any occurrence of the specified character string within the data being edited. You can limit the lines to be searched and changed by entering one of the following optional parameters: X - to change only excluded lines NX - to change only non-excluded lines Command ===> chg xx yy prefix x changes the prefix "xx" to "yy" on x'ed (excluded) lines. The following topics will be presented only if selected by number: 1 - Using the "x" parameter 2 - Using the "nx" parameter The RCHANGE (repeat change) command can be used to repeat the last CHANGE command that was entered. The RFIND (repeat find) command can be used to perform the "find" part of the last CHANGE command. Since these commands are sensitive to the current position of the cursor, they are normally entered via PF keys. (The default RFIND key is PF5 or PF17. The default RCHANGE key is PF6 or PF18).

Page 22: ISPF EDIT Line Commands

The two repeat PF keys can be used together to selectively change occurrences of a character string. The RFIND key is used to find the string. If you want to ignore it, press the RFIND key again (or take other action). If you want to change it, press the RCHANGE key. If a CHANGE command starts in the middle of the data and reaches the bottom or top without finding the character string, either the RFIND or RCHANGE key can be used to continue the search, wrapping around from the bottom line to the top line, or from the top line to the bottom line. The EXCLUDE command is used to exclude specific lines in the data set or member being edited. It can be entered as EXCLUDE, EX, or X . Command ===> ex all "*" 72 excludes lines with "*" in col 72 The differences between the FIND and EXCLUDE commands are: - the FIND command changes lines from excluded to non-excluded. - the EXCLUDE command changes lines from non-excluded to excluded. - the FIND command default is to search all lines. - the EXCLUDE command default is to search only non-excluded lines. - the FIND command allows 'X' and 'NX' parameters. - the EXCLUDE command interprets the ALL parameter as a keyword when no search string is specified. - the FIND command interprets the ALL parameter as the search string if no other search string is specified.

The commands listed below are of a general nature and do not fit into any specific category. LOCATE - to display a particular line in the data. RESET - to reset the edit display. SUBMIT - to submit edit data as a job stream for background execution. PROFILE - to display the current edit profile, to select an alternate edit profile, or to control profile locking. RECOVERY - to set RECOVERY mode on or off. SAVE - to save the data without ending the edit session. CANCEL - to cancel edit without saving the data. SPROF - to display the current SCLM edit profile during an SCLM edit session. FLIP - to reverse the exclude status of a range of lines. COMPARE - to display differences between data sets.