Compile error: EZTC0168E label not defined.

Document ID : KB000052262
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When compiling an Easytrieve program, I am getting a EZTC0168E >>>      $ label not defined, but the label is definitely in the program. How do I correct this?

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.

Solution:

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