Problem:
When generating a DCLGEN for a VARCHAR field, for example:
AFED_DES_ELEMEN varchar(100) NOT NULL,
it creates a copybook field as shown below:
03 TINASFED-AFED-DES-ELEMEN PIC X(100).
which seems incorrect.
The structure should include the length of the field and look like:
03 AFED-DES-ELEMEN.
49 AFED-DES-ELEMEN-LEN PIC S9(4) USAGE COMP.
49 AFED-DES-ELEMENL-TEXT PIC X(100).
Resolution:
In Enterprise Developer select Tools, Options.
Select Micro Focus then Open ESQL Assistant.
Under the DCLGEN heading, change Use Level 49 to True
Press the OK button and rerun the DCLGEN.
This will create then create the desired structure.
#MFDS
#VARCHAR
#EnterpriseDeveloper
#DCLGEN
