HP 3000 Manuals

Copying KSAM Files [ FCOPY Reference Manual ] MPE/iX 5.0 Documentation


FCOPY Reference Manual

Copying KSAM Files 

If your system supports the KSAM/3000 subsystem, you can use FCOPY to
copy KSAM files.  With some exceptions, you can copy KSAM files in the
same way that you copy regular HP 3000 files.  The functions SKIPEOF,
IGNERR, and SUBSET do not apply to KSAM files.  The KEY option applies to
all KSAM files.  The NOKSAM option applies only to KSAM V/E and CM KSAM
files.  Refer to the KSAM/3000 Reference Manual (30000-90079) and Using 
KSAM XL (32650-90168) for more information on using KSAM files.

Copying to Existing KSAM Files 

To copy a KSAM V/E file or a CM KSAM file to another existing KSAM V/E or
CM KSAM file, use the FROM and TO parameters, with the value of the TO
parameter as tofile.  For example,

     >FROM=KSAM1;TO=KSAMA 

FCOPY copies the file in primary key sequence.

To copy a KSAM XL file to another existing KSAM XL file on an MPE XL
system, use the FROM and TO parameters, with the value of the TO
parameter as tofile, a single file name.  For example,

     >FROM=KSXL5;TO=KSXL6 


NOTE You cannot use the NOKSAM option when copying KSAM XL files.
Copying to New KSAM Files To copy an existing KSAM V/E or CM KSAM file to a new KSAM V/E or CM KSAM file, include the names of the new KSAM V/E or CM KSAM data file and key file in the TO parameter, as shown in the example below: >FROM=OLDKSAM;TO=(NEWKSAM,NEWKSAMKEY) To copy an existing KSAM XL file to a new KSAM XL file on an MPE XL system, include the name of the new KSAM XL file in the TO parameter, as shown in the example below: >FROM=OLDKSXL;TO=(NEWKSXL) Copying from KSAM XL Files to CM KSAM Files You can copy a KSAM XL file to a CM KSAM file on an MPE XL system using the FROM and TO parameters as described under "Copying to Existing KSAM Files" above, with these stipulations: * You may not use the NOKSAM option. * The tofile must be specified as a (datafile,keyfile) pair. * The fromfile must be an existing KSAM XL file. For example, >FROM=OLDKSXL;TO=(NEWKSAM,NEWKSAMKEY) FCOPY estimates the size of the keyfile if you use the NEW option. Copying from CM KSAM Files to KSAM XL Files You can copy a CM KSAM file to a KSAM XL file on an MPE XL system using the FROM and TO parameters as described under "Copying to Existing KSAM Files" above, with these stipulations: * The tofile must be specified as an existing KSAM XL file, unless you are creating a new file. If the tofile is a new file, you must specify it as (targetfile). You can backreference the targetfile to a KSAM XL file using a file equation. * The fromfile must be an existing CM KSAM file. For example, > FROM=FILECM;TO=(FILENM) If you open the CM KSAM file with the NOKSAM option, the deleted data records of the CM KSAM file as well as its active data records are included as active data records in the KSAM XL tofile (targetfile). If you open the CM KSAM file with the KEY=0 option (see "Copying Key Sequences" below), the KSAM XL tofile contains only the active data records of the CM KSAM file. Copying Key Sequences To copy records from a KSAM file in a particular key sequence, use the KEY function. This option is valid for all types of KSAM files. The KEY function lets you specify the starting character position for the key you want to use to copy the file. You can copy the file in primary key sequence, any alternate key sequence, or physical record sequence. For example, the FCOPY command below instructs FCOPY to copy the KSAM V/E file KSAM1 to the KSAM V/E file KSAM2 in the sequence determined by the key beginning in position 21 of the data records of KSAM1: >FROM=KSAM1;TO=KSAM2;KEY=21 To copy a KSAM file in physical record order, specify zero as the character location. For example, the command below copies the file KSAM3 to the file KSAM4 in the same physical record order: >FROM=KSAM3;TO=KSAM4;KEY=0 To copy a file in primary key sequence (the default), omit the KEY function from your FCOPY command. The command below copies KSAM5 to KSAM6 in primary key order: >FROM=KSAM5;TO=KSAM6 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


MPE/iX 5.0 Documentation