Add or delete columns in COBOL application program.

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Binamra
Registered Member
Posts: 67
Joined: Mon Jun 17, 2013 10:42 pm

Add or delete columns in COBOL application program.

Post by Binamra »

Hi Morning,

I have a basic doubt but wanted to get it clarified.

Is it possible to add/delete columns in the application program? If yes, how can it be performed?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Add or delete columns in COBOL application program.

Post by Robert Sample »

You have not clearly stated what you want to know. "Add or delete columns" -- if you mean changing the length of the COBOL source statements, then the answer is no, this cannot be done. COBOL uses certain columns in certain ways (1 to 6 for line numbers, 7 for comments or debugging statements, 8 to 11 for area A, 12 to 71 for area B) and these cannot be changed. If you mean adding or deleting DB2 columns from the program, then yes that can be done -- although it is not clear why this would even be a question. If you meant something else, you will need to explain more.
Binamra
Registered Member
Posts: 67
Joined: Mon Jun 17, 2013 10:42 pm

Re: Add or delete columns in COBOL application program.

Post by Binamra »

I meant to add/delete columns in a DB2 table from a COBOL program. I was thinking it needs to be always done by the DBA team and programmers can not do it.
User avatar
DB2 Guy
Forum Moderator
Forum Moderator
Posts: 121
Joined: Sun Apr 21, 2013 8:25 pm
India

Re: Add or delete columns in COBOL application program.

Post by DB2 Guy »

Robert is correct. DDL operations can be performed using a program too - if the given ID, requesting the execution of the program, has the authority to run DDL statements. Other than that, if you know how to write DDL statements there is no restrictions imposed by the system and I can infer from your post.
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 COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”