Why VARCHAR is declared on level 49 only?

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Nitin Gadge
Registered Member
Posts: 27
Joined: Tue Aug 20, 2013 11:32 am

Why VARCHAR is declared on level 49 only?

Post by Nitin Gadge »

Hi,

In ouy team we copy the existing DCLGEN from prod to create new DCLGEN. As per a new requirement I have to add a new column in the existing table. I noticed that a level number 49 is used to declare the VARCHR and it's mandatory for declaring the Varchar columns.
 
I have searched a lot but I could not really get the reason and logic behind it that why the varchar columns must be declared on
level number 49? What can be the reason? If someon of you can guide me on this it would be grat help.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Why VARCHAR is declared on level 49 only?

Post by Robert Sample »

the short answer is because that is the way it works.  You cannot always find out why something is the way it is; you just have to live with it.
My personal thought is that 49 is the lowest COBOL level allowed for a variable and nobody wanted to allow a VARCHAR variable to be a group.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”