CA Datacom DDVELM0002 ALTER TABLE DROP COLUMN
search cancel

CA Datacom DDVELM0002 ALTER TABLE DROP COLUMN

book

Article ID: 129873

calendar_today

Updated On:

Products

Datacom DATACOM - AD CIS COMMON SERVICES FOR Z/OS 90S SERVICES DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS COMMON PRODUCT SERVICES COMPONENT Common Services CA ECOMETER SERVER COMPONENT FOC Easytrieve Report Generator for Common Services INFOCAI MAINTENANCE IPC UNICENTER JCLCHECK COMMON COMPONENT Mainframe VM Product Manager CHORUS SOFTWARE MANAGER CA ON DEMAND PORTAL CA Service Desk Manager - Unified Self Service PAM CLIENT FOR LINUX ON MAINFRAME MAINFRAME CONNECTOR FOR LINUX ON MAINFRAME GRAPHICAL MANAGEMENT INTERFACE WEB ADMINISTRATOR FOR TOP SECRET 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

Environment

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

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.
 

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