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.
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.
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