Programs with CASE statements that contain brackets around the associated field name fail to compile with message
EZTC0124E >>> $ fieldname expected
This occurs when the field names on a CASE statement are enclosed in parenthesis:
CASE (UR-LEVEL(WS-COUNTER))
WHEN '11'
OFILEA-CLASS(WS-COUNTER) = 'N'
WHEN '44'
OFILEA-CLASS(WS-COUNTER) = 'Y'
OTHERWISE
OFILEA-CLASS(WS-COUNTER) = '?'
END-CASE
How may this be resolved?
Easytrieve Report Generator, release 11.6
Release 11.6 does adhere more to the correct syntax than the prior releases and uses a different compiler to do so.
The documentation does support no parenthesis on the CASE statement.
The parenthesis do need to be removed. This is the resolution to resolving the EZTC0124E error message as Easytrieve is parsing the code as designed.