COPYFILE If you specify an output fileid r for example:
copyfile data file a fix data file a (recfm f lrecl 130 the original file remains unchanged. The file FIXDATA FILE A contains
the converted records. -
If the records in a file being copied are variable-length, each
output record is padded with blanks to the specified record length. If any records are longer than the record length, they are truncated. When vou convert files from fixed-length records to variable-length
records, you can specify the TRUNC option to ensure that all trailing
blanks are truncated:
copyfile data file a (recfm v trunc
If you specify the LRECL option and RECFM V, the LRECL option is
ignored and the output record length is taken from the longest record in
the input file.
When you convert a file from variable-length to fixed-length records,
you may also specify a fill character to be used foe padding instead of
a blank. If you specify: copvfile short recs a (recfm f fill *
then each record recoed length.
variable-length existinq record. not altered.
in the file SHORT RECS is padded with asterisks to the
Assuming that SHORT RECS was originally a
file, the record length is taken from the longest
Note that if SHORT RECS is already fixed-length, it is Similarly, when you are converting back to variable-length a file
that was padded with a character other than a blank, you must specify
the FILL option to indicate the pad character, so that character is
truncated.
The FILL option can also be used to specify the packing character
used with the PACK option. When you use the PACK option, a file is
compressed as follows: all occurrences of two or more blanks are
encoded as one character, and four or more occureences of any other
character are written as three characters. If you use the FILL option
to specify a fill character, then that character is treated as a blank
when records are compressed. You do not need to specify the fill
character when you unpack the file since this is determined from the
filels pack record. If the fill character is specified, it is ignored. Since most fixed-length files are blank-padded to the record length, you
do not need to specify the FILL option unless you know that some other
character appears more frequently.
When you convert record formats on packed files with the COPYFILE command vou can specify single or multiple output files, in accordance with the procedures outlined under "Modifying Record Formatse" For
example: copyfile * assemble a (pack
compresses all ASSEMBLE files in the A-disk without changing any file
identifiers. The command:
copyfile * assemble a = script = (recfm trunc
converts all ASSEMBLE files to variable-length, and changes their
filetypes to SCRIPT. section 2. eMS Commands 41
COPYFILE When yoa use the COPYFILE command, you can specify particular columns of
data to be manipulated or particular characters to be translated.
Again, how you specify the file identifier determines how many file$ are
copied or modified. When you use the SPECS option on the COPYFILE command, you receive
the message: DMSCPY601R ENTER SPECIFICATION LIST: and a read is presented to your virtual machine and you may enter a
specification list. If you do not wish to receive this message, use the NOPROMPT option. The specification list you enter may consist of one or
more pairs of operands in the following format:
{
nn-mm }
/string/ hxx ••• col
nn-mm specifies the start and end columns of the input file that are to
be copied to the output file. If mm exceeds the length of the
input record, the end of the record is the assumed ending
position.
string is any string of uppercase and lowercase characters or numbers ielimited by any non-alphameric character.
hxx .•. is an even number of hexadecimal digits prefixed with an h.
col is the column in the output file at which the copy operation is
to begin. You can enter as many as 20 pairs of specifications. If you want to
enter more than one line of specifications, enter two plas signs (++? as
continuation indicators.
A specification list may contain any combination of specification
pairs; for example:
copyfile sorted list a (specs DMSCPY601R ENTER SPECIFICATION LIST: 11/ 1 1-8 3 III 12 1***1 14 ++ 18
After this command is executed, each record in the file SORTED LIST will look like the following: I 00000000 I *** 0000 •••• where the a's in columns 3 through 10 indicate information originally in
columns 1 through 8; the o's following the asterisks indicate the
remainder of each record, columns 9 through 80. When you enter a specification list, you are actually constructing a
file column by column. If you specify multiple input or output files,
the same copy operation is performed for each record in each output file.
42 IBM VM/370 eMS Command and Macro Reference
Previous Page Next Page