"IF FILE-STATUS EQ ..." results in EZTC0644E error

Document ID : KB000116689
Last Modified Date : 01/10/2018
Show Technical Document Details
Question:
How may the following EZTC0644E compiler error be corrrected?
 
Example:
IF FILE-STATUS EQ 0
      EZTC0644E >>> $ more qualification required.

 
Environment:
CA Easytrieve release 11.6
Answer:

If more than one file is opened during an activity, FILE-STATUS must be qualified with the appropriate file name as of CA Easytrieve release 11.6.

If there is more than one file being used in the program, the file status statement will need to be qualified as

IF filename:FILE-STATUS NE 0
   or
IF FILE-STATUS(filename) NE 0

so that CA Easytrieve knows which file's FILE-STATUS is being requested.

Additional Information:
Please note: 
SO00718 and SO00717 allow for using the default value for FILE-STATUS, but only when there is one input file involved in an activity.