Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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.
000300
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
The cursor is always placed on the first "insert" line on 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.
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
000300
r3 400 This single line will be repeated 3 times.
000500
or
rr 700 This block
000800 of three lines
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.
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.
000300
c 0400 This single line will be copied.
or
cc 600 This block
000700 of three lines
cc 800 will be copied.
Use M or MM to move one or more lines. After a line has been moved it
will exist only in its new location.
000300
m 0400 This single line will be moved.
or
mm 600 This block
000700 of three lines
mm 800 will be moved.
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).
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.
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.
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.
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;
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.
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.
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
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
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.
000300
f - - - - - - - - - - - - - 10 LINE(S) NOT DISPLAYED
001400 (will display the first of the above 10 lines).
f10 - - - - - - - - - - - - 33 LINE(S) NOT DISPLAYED
005800 (will display the first 10 of the above 33 lines).
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).
Use the S line command to show the structure of one or more lines of a
block of excluded lines.
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.
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.
=BNDS> < >
ts 400 This is text data on the This is text data on the
000500 left side. - right side.
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.
Multiple blanks in the middle of a line are left unchanged. They are
not compressed out by the TF command.
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.
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.
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 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.
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)
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:
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.
===> find 'part "A"' find a string which contains quotation marks.
A hex string must contain only hexadecimal digits (0-9, A-F) and there
must be an even number of digits.
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.
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.
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 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.
If the second column specified is larger than the record size, the
record size is used.
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"
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"
You can limit the lines to be searched by entering one of the following
optional parameters:
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 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).
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).
- 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.)
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)
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)
A hex string must contain only hexadecimal digits (0-9, A-F) and there
must be an even number of digits.
Either or both of the strings in the CHANGE command can be hex strings.
Example - ===> chg all p'¬' 'x' 72 change all non-blanks in column
72 to the character "x"
Example - ===> chg t'spf' SPF - to change the text "spf" to caps
In the example above, the CHANGE command would locate an upper case
"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.
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 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.
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.
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.
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
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
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:
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).
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 .
The commands listed below are of a general nature and do not fit into any
specific category.