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 a buffer in memory?

0 Answers  


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

0 Answers  


Q1. How will you use two different DB2 qualifiers in a single COBOL program? Suppose we have 2 tables EMP1 and EMP2 with same structure defined in two different DB2 qualifiers QUAL1.EMP1 and QUAL2.EMP2 now during first 15 days we want to use QUAL1.EMP1 and rest of the days QUAL2.EMP2  how will we do this.  We can create a single program and a single load for this program. 

2 Answers   RBS,


What is an EXPLAIN in DB2. How and what is the steps followed in EXPLAIN command. Can all the queries be used in EXPLAIN command to check the performance.

3 Answers   IBM,


How can we read records for specific member in CL? AND rpg?

0 Answers  


What techniques will be used to avoid deadlock??

5 Answers   IBM, SUN,


What is netezza database?

0 Answers  


What is isolation level?

4 Answers  


db2 query I have one table with the following details. SNO SNAME DOJ ------ -------------------- ---------- 10 KRISH 2007-03-19 20 REDDY 2007-05-19 30 RRRRR 2007-05-19 40 BBBBB 2008-05-19 50 CCCCC 2009-05-19 60 JJJJJ 2009-05-19 70 JJJJJ 2004-05-19 i want the output in the following format:( no of students joined in each year(no nedd to consider about month and date) year count --------- ---------- 2004 1 2007 3 2008 1 2009 2

9 Answers   TCS,


How do you concatenate the firstname and lastname from emp table to give a complete name?

0 Answers  


Explain the EXPLAIN statement?

1 Answers  


How and when does the db2 enforces the unique key?

0 Answers  


Categories