Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Duplicating secondary keys

&pagelevel(4)&pagelevel

When converting NK-ISAM files, PERCON will not automatically copy secondary keys that may exist in the input files to the output files. If required, however, PERCON can obtain the secondary keys of input files and reconstruct them in the output files after conversion. Since PERCON usually processes more than one input file and more than one output file, the user has to specify whether this function is to be activated and for which files.

The reconstruction of the secondary keys for the output files is performed as the last action before completing a conversion step, provided no event has occurred up to this point that would require an abnormal termination, i.e. all output files must have been created without error.

In this case, PERCON determines the defined name, position and length values as well as the DUPKEY attribute of all secondary keys of the specified input file, subsequently using these values to reconstruct all secondary keys for the output file.

If any of the secondary keys to be duplicated already exists in the output file and the values defined for its position, length and DUPKEY attribute match those in the input file, processing is continued without further action.

If an error occurs during secondary-key duplication, one or more of the messages PER0099 thru PER0103 will be output and the conversion step will be aborted.

If the input file is a NK-ISAM file without secondary keys, however, processing is continued normally after issuing a PER0097 warning.

The following error situations may occur when duplicating secondary keys:

  1. The input or output file is not an NK-ISAM file.

  2. The input file has no secondary keys (results in PER0097 warning).

  3. The output file contains duplicate primary keys or logical flags or value flags.

  4. The output file already contains a secondary key to be duplicated, but the values for its position, length and DUPKEY attribute differ from those in the input file.

  5. Duplicating the secondary keys would cause the maximum number of 30 secondary keys to be exceeded.

  6. The secondary key has been defined with DUPKEY=*NO, but identical secondary key values occur in various records of the output file.

  7. At least one record of the output file is too short to accommodate the complete secondary key.

  8. Other unexpected system errors.

The ALTERNATE-INDEX operand is ignored for the Edit basic function.