Size of a column has been changed in DB2 table (Suppose it
was of 5 characters and later changed to 4 characters) and
forgot to change the DCLGEN in COBOL program, what will
happen during the execution of code? If the program Abends
then what will be the error? If it doesn't abend then hpw
the error can be catched?

Answers were Sorted based on User's Feedback



Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed t..

Answer / chitra

The program will get abended and the error will data
exception error.

Is This Answer Correct ?    1 Yes 0 No

Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed t..

Answer / srikanth doki

The error will not be catched at that time. Dclgen will not
check the database tables and the dbrm will check the
database if it is not matched then the data exception error
will be raised at that time.

Is This Answer Correct ?    0 Yes 0 No

Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed t..

Answer / suresh

The program will get abended and the error will data
exception error.

Is This Answer Correct ?    0 Yes 0 No

Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed t..

Answer / ankit

it will work normally until the data fetched is of 4 bytes
but if it will be fetching a data of 5 bytes, then a
exception will occur and program will abend with abend code
SOC7.

Is This Answer Correct ?    0 Yes 1 No

Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed t..

Answer / mohit

Nothing critical will happen.. I will make understand with
example below:

Consider some 2 bytes as * are before that variable as $
and then rest copybook as & , so after changing table
layout will look like:

**$$$$&&&&&& and program will layout as
**$$$$$&&&&&&. So, now what happens table always passes
something as 4 bytes to 5 bytes which easily is compatible
with a bigger space. So, you will see a space actually
which might disturb your output.

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More COBOL Interview Questions

Explain complete concept of table handling in COBOL with an example?

2 Answers   IBM, TCS, Wipro,


diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,


How to remove 2 duplicate records and copy only one using job control language?

0 Answers  


A cobol program to read a file , match it with other if. If match occurs then write it to an output file. If no match then no need to write it.Error log created by program to track any error.

1 Answers  


Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 10 bytes . There should be some difference between two allocations ? Thanks krishna chaitanya

2 Answers   CSC,






What is the utilization of copybook in cobol? Could we utilize a similar copybook?

0 Answers  


how will u pass dadta to cobol+db2 program...?

4 Answers   IBM,


i want to learn mainframes. i completed MCA ,whats the future of mainframes

5 Answers  


is it possible to declare index in cobol program? if it is not why its tell me pls

3 Answers  


In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,


i want to store 20 digits . h will u do it in cobol ?

4 Answers   TCS,


What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


Categories