Compile error: EZTC0168E label not defined.
search cancel

Compile error: EZTC0168E label not defined.

book

Article ID: 52262

calendar_today

Updated On: 10-29-2024

Products

Easytrieve Report Generator

Issue/Introduction

When compiling an Easytrieve program, getting this error:
   EZTC0168E >>>      $ label not defined, but the label is definitely in the program.

How may this be corrected?

Example:

JOB INPUT SEQFILE NAME EZTDEMO
   PRINT REPORT1 
* 
   IF DOB = 1 
      GO TO END-IT 
EZTC0168E >>>      $ label not defined 
   ELSE 
* 
      IF DOB = 2 
         GO TO END-IT 
EZTC0168E >>>      $ label not defined 
     END-IF 
   END-IF 
END-IT.
 

Resolution

The label "END-IT", is at the end of the program and since in this program example there is no "GO TO JOB", the label is after an implied "GO TO JOB".
This is an invalid location for a label.

The Easytrieve compiler for releases 11.x are detail enough to recognize the coding problem to prevent a runtime error from occurring.

To correct the EZTC0168E >>> $ label not defined error there are a couple of options.

  1. After the "END-IT." statement, you can add this statement: "GO TO JOB".
  2. You can delete the "END-IT." statement and change the "GO TO END-IT" statements to "GO TO JOB".

The following example, would clear up the EZTC0168E compile error.

JOB INPUT SEQFILE NAME EZTDEMO
  PRINT REPORT1               
  IF DOB = 1                  
     GO TO END-IT 
  ELSE                        
     IF DOB = 2               
        GO TO END-IT 
     END-IF                   
  END-IF                      
END-IT. 
GO TO JOB