Can we use select * statement in cobol program without
giving field names ???

Answers were Sorted based on User's Feedback



Can we use select * statement in cobol program without giving field names ???..

Answer / vish

Yes we can do it but as a practice people don't use "SELECT
*..." in COBOL program. Possibly the main reason for this
is that if there is any modification to the table in future
(e.g. a column addition) then all such programs needs to be
at least recompiled once even if there is no code changes
into them. This is ensure taht they use latest DCLGEN for
the modified table else the programs will abend for column
mismatch.

Is This Answer Correct ?    14 Yes 0 No

Can we use select * statement in cobol program without giving field names ???..

Answer / shailendra

yes

Is This Answer Correct ?    4 Yes 0 No

Can we use select * statement in cobol program without giving field names ???..

Answer / guest

Shouldnt the code be changed to handle the new column that
would be returned by the SELECT *...

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More DB2 Interview Questions

What is the difference between a package and a plan?

6 Answers   Infosys, L&T, Mphasis,


Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.

9 Answers   Cap Gemini,


When one binds a PACKAGE ( of a plan ) what package information is stored and where it is stored?

3 Answers  


What is a correlated sub query?

2 Answers  


I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some data. In cursor3 (using for some updation) I'm using the data retrieved by the above 2 cursor. My question is, while working with cursor3, periodically if I give commit, will all the three crsors will be closed or only cursor3 will be closed?

4 Answers  






What are the 4 environments which can access DB2 ?

2 Answers  


Suppose if I need to update a column, how you do that using cursor?

2 Answers   Verizon,


Is it mandatory to use DCLGEN? If not, why would you use it at all?

2 Answers  


How can record locking be achieved in those DB2 versions which do not support it?

0 Answers  


What is a db2 tablespace?

0 Answers  


How do I optimize a query in db2?

0 Answers  


Explain in brief how does db2 determine what lock-size to use?

0 Answers  


Categories