CA Datacom DDVELM0002 ALTER TABLE DROP COLUMN

book

Article ID: 129873

calendar_today

Updated On:

Products

CA Datacom CA DATACOM - AD CA CIS CA Common Services for z/OS CA 90s Services CA Database Management Solutions for DB2 for z/OS CA Common Product Services Component CA Common Services CA Datacom/AD CA ecoMeter Server Component FOC CA Easytrieve Report Generator for Common Services CA Infocai Maintenance CA IPC Unicenter CA-JCLCheck Common Component CA Mainframe VM Product Manager CA Chorus Software Manager CA On Demand Portal CA Service Desk Manager - Unified Self Service CA PAM Client for Linux for zSeries CA Mainframe Connector for Linux on System z CA Graphical Management Interface CA Web Administrator for Top Secret CA CA- Xpertware

Issue/Introduction

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

Cause

The error DDVELM0002 means ELEMENT LENGTH ZERO

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

Environment

Release: DBCISF00200-15.1-Datacom-Database-Option for CICS Services
Component:

Resolution

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