If you do not specify a record length, the editor assumes the
following defaults: For editing old files, the existing record length is used. For creating new files, the following default values are in effect: EXEC FREEFORT LISTING SCRIPT VSBDATA All others 80 characters
81 characters
121 characters
132 characters
132 characters 80 Format VarIable variable Variable Variable Variable Fixed
If you edit a variable-length file and the existing record length is
less than the default for the filetype, the record length is taken from
the default valuee When you use the LRECL option of the EDIT command you can override
these default record lengths; you can also change the record lengths of
existing files to make them larger, but not smaller.
If you try to override the record length of an existing file and make
it smaller, the editor displays an error message, and you must issue the
EDIT command again with a larger record length. For example, suppose
you have on your B-disk a file named MYFILE FREEPORT, which was created
with the default record length of 81. If you try to edit that file by
issuing:
edit myfile freefort b (lrecl 72
the editor displays the message: GIVE A LARGER RECORD LENGTH. You must then issue the EDIT command again and either
of 81 or more, or allow it to default to the current
the file.
specify a length
record length of You can use the COPYFILE command to increase or decrease the record
length of a file before you edit it. For example, if you have
fixed-length, 132-character records in a file, and you want to truncate
all the records at colUmn 80 and create a file with 80-character
records, you could issue the command:
copyfile extra funds a (lrecl 80 The largest record you can edit with the editor is 160 file with record length up to 160 bytes (for example, a
created by a DOS program) can be displayed and edited.
characters. A
listing file
The largest record you can create with the CMS editor, however, is 130 characters using a 3270 display terminal and 134 characters using a
typewriter terminal such as a 2741 or 1050. If you enter more than 130 characters on a 3270, the record is truncated to 130 characters when you
press the Enter key. Note that as the line is truncated to 130 characters, the CMS editor will not know the actual line length entered,
and will not issue the "TRUNCATED" messgae. If you type more than 134
characters on a line using a typewriter terminal, CP generates an
attention interruption to your virtual machine and the input line is
lost when you press the Return key.
74 IBM VM/370 CMS User's Guide
Page of GC20-1819-2 As Updated April 1, 1981 by TNL GN25-0826
For most purposes, you will not need to create records longer than 130 characters. If it is necessary, however, you can expand a record
that you have entered. To add more characters to the record (for
example, by changing a string to a 31-character string), use
the CHANGE subcommand and the necessary operands. For a record longer
than 130 characters, the same CHANGE subcommand, with its operands
omitted, truncates the record to a length of 130 characters. You cannot create a record that is longer than the record length of
the file. For example, if the file you are editing has a default record
length of 80, or if JOU specified LRECL 80 when you created the file,
the editor truncates all records to 80 characters.
There is a relationship between the record length of a file and the
maximum number of records it can contain. Figure 6 shows the
approximate number of records, rounded to the nearest hundred, that the
editor can hangle in a virtual machine with different amounts of virtual
storage.
virtual I!achine Size Record
Length 320K 512K 768K 1102QK 80 Characters 1700 3800 6800 9800 120 Characters 1100 2600 Q700 6800 132 Characters 1100 2400 4300 6200 160 Characters 900 2000 3600 5100 Figure 6. Number of Records Handled by the Editor RECORD FORMAT with the CMS editor, you can create either fixed-or variable-length
files. Except for the filetypes EXEC, LISTING, FREEFORT, SCRIPT, and VSBDATA, all the files you create have fixed-length records
i by default. You can change the format of a file at any time during an editing
session by using the REeF!! subcommand:
recfm v
This changes the record format to variable-length. This does not change
the record length; in order to add new records with a greater length,
you must write the file onto disk and then reissue the EDIT command
using the LRECL option.
The COPYFILE command also has an REeFK option, so that you can change
the record format of a file without editing it. The command:
copyfile * requests a1 (recfm v trunc
changes the record· formats of all the files with a filetype of REQUESTS on your A-disk to variable-length. The TRUNe option specifies that you
want trailing blanks removed from each of the records. When you are
editing a file with variable-length records, trailing blanks are
truncated when you write the file onto disk with the FILE or SAVE subcommand. (In VSBDITA files, however, blanks are not truncated.) Section 5. The eKS Editor 75
Previous Page Next Page