EZT: Using an indexed field as a KEY on the JOB INPUT statement and getting a compile error EZTC0062E. What causes this?
search cancel

EZT: Using an indexed field as a KEY on the JOB INPUT statement and getting a compile error EZTC0062E. What causes this?

book

Article ID: 36445

calendar_today

Updated On:

Products

Easytrieve Report Generator

Issue/Introduction

The following will produce an Easytrieve Compile error:

          1  FILE PERSNL VS
                  2  REC150              001  150 A  INDEX REC150-IDX
                  3  EMPNUM   REC150    +009  005 A
                  4  *
                  5  JOB INPUT (PERSNL KEY EMPNUM)
EZTC0062E >>>                        $ cannot be an INDEXed field
                  6       DISPLAY EMPNUM

 

 

Environment

Easytrieve Report Generator, release 11.6

Resolution

With Easytrieve r11.6, additional error logic was added to ensure a key field can't be varying, indexed, or subscripted.

The following is why the additional error checking was added to the Easytrieve r11.6 compiler:

  • For the JOB INPUT (filename KEY key-fieldname) statement, using an indexed field could cause errors and/or improper references
  • The key-fieldname may not be referenced from the same location in the record, when looping back to the JOB statement for the next record, producing inconsistent results.

Additional Information

For additional details, please see the Easytrieve Programmers Guide under Chapter 3: with regards to File processing, and Synchronized File Processing.