Error 'EZTC0205E $ must be a numeric field' on Alphanumeric 'MOVE'
search cancel

Error 'EZTC0205E $ must be a numeric field' on Alphanumeric 'MOVE'

book

Article ID: 200740

calendar_today

Updated On: 10-25-2024

Products

Easytrieve Report Generator

Issue/Introduction

Why are the below errors on moving a literal into an Alphanumeric field occurring?
...
           71    MOVE ',' TO A-FIELD1 A-FIELD2 A-FIELD3
EZTC0205E >>>                         $ must be a numeric field           
EZTC0100E >>>                                  $ end of statement expected  

 

Environment

Easytrieve Report Generator, release 11.6

Resolution

The EZTC0205E error occurs, because when using MOVE that way in Easytrieve, it expects a length at the location of A-FIELD2.
From Documentation on the MOVE statement
...

...
It has been highlighted what the MOVE is doing, resp. expecting in this case.

There is an example on the same page, which is somewhat misleading (
MOVE ZEROS TO COUNTER-1 COUNTER-2).
The thing is, that there is an exception - for example, the following works fine:
MOVE SPACES TO A-FIELD1 A-FIELD2 A-FIELD3
if all field are alpha-numeric
and
MOVE ZEROS TO N-FIELD1 N-FIELD2 N-FIELD3
if all field are numeric.
Only these two reserved words, SPACES and ZEROS, can be used in order to move spaces or zeros to multiple fields at once at one single MOVE statement.