HPlogo Using KSAM XL and KSAM 64 > Chapter 8 Migration and Mixed Mode Processing

Migrating KSAM Files

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

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 the KSAM XL/64 file does not exist, a new file is created. A new file is also created by using the NEW option.

If you create the file and copy data to it using one command, however, you are not able to change the key structure. This would not be acceptable when copying variable-length records because the record length and record type parameters must be modified to acceptable values.

  :FCOPY
  >FROM=ARMSTR.MGR.AR;TO=(ARMSTR2.MGR.AR)
  >EXIT

or

  :FCOPY
  >FROM=ARMSTR.MGR.AR;TO=(ARMSTR2.MGR.AR);NEW
  >EXIT

FCOPY copies data records from the source file in the sequence identified by the primary key. Use the KEY= option to select a different sequence for copying the records. To retain the physical layout of the source file, specify KEY=0. This specification copies the records in the order that they reside in the source file without regard to a key.


NOTE: The NOKSAM option is not allowed with KSAM XL/64 files.




Differences in KSAM File Features


Mixed Mode Operation