For those portions of the file identifier that you want
same, you may code an equal sign in the output fileid.
command line above can be entered:
coPvfile test1 assemble a test2 = = COPYFILE to stay the
Thus, the
The equal sign may be used as a prefix or suffix of a file
identifier. For example, the command:
copvfile abc file= type= =
creates an output file called FILEA TYPEB C. When you copy a file from one
the old and new filemodes, and any
to make; for example: virtual disk to another, you specify
filename or filetype change you want
copvfile test3 assemble c good = a
This command makes a copy of the file TEST3 C, and names it GOOD A.
If you want to copy only particular records in a file, you can use
the PRLABEL/TOLABEL options. Por example:
copvfile old test a new test a (frlabel start for 41 copies 41 records from the file OLD TEST Al, beginning with the record
beginning with the character string START into the file NEW TEST 11. You can combine two or more files into a single file with the COPYFILE command. For example: copyfile test datal a test data2 = test data3 b
copies the files TEST DATAl and TEST DATA2 from your A-disk and combines
them into a file, TEST DATA3, on your B-disk.
Note that if any input file has a filemode number of 3, it is possible that the file will be copied in a sequence different from its
order on the disk.
If you want to combine two more files without creating a new file:
use the APPEND option. Por example:
copyfile new list a old list a (append
appends the file NEW LIST A to the bottom of the existing file labeled OLD LIST A.
Note: If the file NEW LIST A has a different LRECL from the file OLD LIST A, the appended data is padded, or truncated
6
to the LRECL of the file OLD LIST A.
Whenever you code an asterisk (*) in an input fileid, you may cause
one or more files to be copied, depending upon the number of files that
satisfy the remaining conditions. For example:
copyfile * test a combined test a
copies all files with a filetype of TEST on your A-disk into a single
file named TEST. If only one file with a filetype of TEST
exists, only that file is copied.
Section 2. CKS Commands 39
COPYFILE If you want to copy all the files on a particular disk to another
disk, you could enter:
copyfile * * b = = a
All the files on the B-disk are copied to the A-disk. The filenames and
filetypes remain unchanged. You can also copy a group of files and change all the filenames or
all the filetypes. For example:
copy file * assemble b = test a
copies all ASSEMBLE TEST on the A-disk.
files in the B-disk into files with a filetype of
The filenames are not changed. You can use the SINGLE option to override multiple output mode. For
example:
copyfile * test a = = B (single
copies all files on the A-disk with a filetype of TEST to the B-disk as
one combined file, with the filename and filetype equal to the first
input file found. Whenever an asterisk appears, it indicates that all files are to be
copied; whenever an equal sign (=) appears, it indicates that the same
files are to be copied. For example:
copyfile x * al = file =
combines all files with a filename of X on the A-disk into a single file
named X FILE Al. Whenever an equal sign appears in the output fileid in a position
corresponding to an asterisk in an inputfileid, multiple input files
produce multiple output files. When you perform copy operations of this
nature you might wish to use the TYPE option, which displays the names
of files being copied. For example:
copvfile * test a = output a = summary = (type
might result in the display: COpy I ALPHA TEST A l' TO 'ALPHA SUMr!ARY A" (NEW FILE) COPY 'ALPHA OUTPUT A' COPY 'BETA TEST A 1 I TO 'BETA SUJ!IIJ!IIARY A" (NEW FILE) COPY 'BETA OUTPUT A.'
which indicates that files ALPHA TEST A and ALPHA OUTPUT A were copied
into a file named ALPHA SUr!MARY A and that files BETA TEST A and BETA OUTPUT A were copied into a file named BETA SUMMARY A. You can use the RECFM and LRECL options to change the record format of a
file as you copy it. For example:
copyfi1e data file a (recfm f lrec1 130 converts the file DATA FILE Al to fixed-length 130-character records. 40 IBM VM/370 eMS Command and Eacro Reference
Previous Page Next Page