Using KSAM/XL and KSAM 64 (32650-90886)

Chapter 8 67
Migration and Mixed Mode Processing
Migrating KSAM Files
Migrating KSAM Files
The data records from an existing KSAM file on an MPE V/E system can be migrated to an
existing KSAM XL or KSAM64 file on an MPE/iX system. Perform the following steps to
migrate an existing CM KSAM file with fixed-length records to a new KSAM XL or a
KSAM64 file:
1. Store both the CM KSAM key file and data file to tape using the TRANSPORT option
(used only if migrating to an MPE V/E system).
2. Restore both files to the MPE/iX machine (used only if migrating from an MPE V/E
system).
3. Create the new KSAM XL or a KSAM64 file using the BUILD command.
4. Run the FCOPY utility.
5. Enter the appropriate FROM= and TO= parameters to copy the CM KSAM file to a KSAM
XL file or a KSAM64 file.
6. Exit FCOPY.
7. Delete the original data file and key file from the MPE/iX machine.
8. Rename the new KSAM XL or KSAM64 file to the original CM KSAM data file name.
NOTE
KSAM XL and KSAM64 files require fixed-length records. If the source CM
KSAM file contains variable-length records, define the record length of the
target file as the maximum length of the source records. When copying the
file, FCOPY pads the source record with a fill character to create the target
record size. The fill character is specified during the file creation. The default
fill character for an ASCII file is a blank. The default fill character for a
binary file is a binary zero.
The following entries show the FCOPY commands needed to migrate the CM KSAM file
named ARMSTR.MGR.AR to an existing KSAM XL/64 file. Note that in this example, the
KSAM XL/64 file structure already exists. You can create the file with the BUILD command
or with the FOPEN or HPFOPEN intrinsics.
:FCOPY
>FROM=ARMSTR.MGR.AR;TO=ARMSTR2.MGR.AR
>EXIT
:PURGE ARMSTR.MGR.AR
:PURGE ARKEY.MGR.AR
:RENAME ARMSTR2.MGR.AR, ARMSTR.MGR.AR
If record-level locking has not been used and no other migration issues exist, the source
program can be run in compatibility mode. The program successfully accesses the new
ARMSTR file. Refer to the Migration Process Guide for details about migrating application
programs.
You can create a new KSAM XL/64 file and copy the CM KSAM record data in a single
step. Enclose the new file name in parentheses to specify that this is a KSAM XL/64 file. If