HP 3000 Manuals

KEY [ FCOPY Reference Manual ] MPE/iX 5.0 Documentation


FCOPY Reference Manual

KEY 

Lets you choose a key sequence in which to copy KSAM files.  The KEY
function works with KSAM V/E, CM KSAM, and KSAM XL fromfiles.

Syntax 

;KEY [=character-location]

Where:

character-location   Is a positive integer that identifies the key by the
                     location of its starting character in the data file.
                     The key may be a primary or an alternate key.

File Attributes 

The fromfile must be a KSAM file.

Operation 

Your system must have the KSAM subsystem in order for the KEY parameter
to function.  If you do not use the KEY function when copying a KSAM
file, FCOPY copies the file in primary key sequence to another KSAM file. 

If you specify zero as the character location (KEY=0), FCOPY copies the
file in physical record sequence (the sequence in which the records are
located in the file) rather than key sequence.

Restrictions 

You cannot combine KEY with NOKSAM.

Notes 

For a complete description of KSAM file characteristics and their
operation with FCOPY, refer to the KSAM/3000 Reference Manual 
(30000-90079) and Using KSAM XL (32650-90168).

Examples 

In the example below, FCOPY copies the file KSAM in key sequence
(alphabetical or numerical) according to the key value starting in
character location 21 (assuming that a key has been designated at
character 21).

     >FROM=KSAM;TO=ALPHA;KEY=21 

The FCOPY command below copies the KSAM1 file in primary key sequence
(the default) by omitting the KEY parameter:

     >FROM=KSAM1;TO=KSAM2 

The next example copies the KSAM1 file in chronological sequence, that
is, the sequence in which the records were written to the file:

     >FROM=KSAM1;TO=DUPL1;KEY=0 



MPE/iX 5.0 Documentation