Hi,
I am working at a company which is using IMS DB and DB2 is nonexistent. However, I appeared in an interview where there was a question on DB2, and I need help for its answer. The question was like: If There is a COBOL-DB2 program which works well in production. Now if a programmer adds or say deletes one column in one of the DB2 tables used in this program, what are we supposed to do?
Can that program still executes without a change or not?
Regards
COBOL DB2 question
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COBOL DB2 question
If the program is using a column that is deleted from DB2, at a minimum there will be code changes required to remove the references to the deleted column.
-
- New Member
- Posts: 5
- Joined: Sun Nov 30, 2014 7:56 am
Re: COBOL DB2 question
But if the column is never referenced in the COBOL program, then? Will still be required to compile?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COBOL DB2 question
The answer is "it depends". For example, if the site standard is to recompile each program when a database change is made, then you recompile the program. If the column is referenced in a copy book used by the program, you need to recompile the program. As long as the column is completely unused by the program (and its copy books) then you do not need to recompile.
Recompile implies to bind the program again, of course.
Recompile implies to bind the program again, of course.
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