FCOPY Reference Manual (32212-90008)

48 Chapter3
FCOPY Applications and Examples
Copying KSAM Files
Copying to a Non-KSAM File
To copy data in a particular key sequence from a KSAM file to a non-KSAM file, use the
KEY function. For example, the command below copies the data file of the KSAM V/E file
KSAM7 to the disk file DATA in the order determined by the key beginning in location 20 of
the KSAM7 data file:
>FROM=KSAM7;TO=DATA;KEY=20
To copy the data file of a KSAM V/E or CM KSAM file to a non-KSAM file, use the NOKSAM
and NOUSERLABELS functions. NOKSAM instructs FCOPY to copy the CM KSAM data file to a
non-KSAM file. (This option is not valid for KSAM XL files.) NOUSERLABELS instructs
FCOPY not to copy the CM KSAM file's user labels. For example, the command below
copies the data file of the CM KSAM file KSAM8 to the disk file NKSAM1:
>FROM=KSAM8;TO=NKSAM1;NOKSAM;NOUSERLABELS