A column has been added to a CA Datacom table using SQL ALTER TABLE.
Trying to drop the column with ALTER TABLE DROP COLUMN fails with error DDVELM0002. Errors are:
SQLCODE = -118, SQLSTATE=R MESSAGE = DSF 'NSV1' DDVELM0002 table_name.SQLEL
The error DDVELM0002 means ELEMENT LENGTH ZERO
During verification of a DATABASE structure, an ELEMENT entity-occurrence was detected with a LENGTH attribute-value of zero.
When doing an ALTER of a table in SQL to add a column it will build an SQLEL element if one does not already exist. Only the fields needed for the ALTER are added to the element. A second ALTER will add additional fields to the SQLEL element if needed.
Datadictionary requires that there be at least one field in an element, so the last column in the SQLEL element cannot be dropped.
Release: DBCISF00200-15.1-Datacom-Database-Option for CICS Services
To drop the last column in an SQLEL element first add another field to the SQLEL element via DDOL or DDUPDATE. Then copy it to PROD status and then the do the ALTER TABLE DROP COLUMN