Can SQL statements/queries be included in a copybook?

Answers were Sorted based on User's Feedback



Can SQL statements/queries be included in a copybook?..

Answer / tom

Yes, if the copybook is included with the precompiler
directive EXEC SQL INCLUDE. No, if one attempts to include
the copybook with a COBOL COPY directive.

Is This Answer Correct ?    5 Yes 2 No

Can SQL statements/queries be included in a copybook?..

Answer / ekalavya

The DB2 related things have to be included with the pre
compiler directive
EXEC SQL
INCLUDE XYZ
END-EXEC
But not like COPY XYZ.

This is because COPY statements are expended during
Compilation step, but the DB2 related items should be
available in pre-compilation step inorder to create DBRM
module, which is the input for Binding process into
PLAN/PACKAGE.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

Explain correlated sub-queries.

0 Answers  


How to select the duplicate rows from a table?

4 Answers  


What is a correlated sub query?

2 Answers  


Is it possible to create an Instance in DB2 using DB2 Control Center ?

0 Answers   MCN Solutions,


AGGREGATE function support by DB2. A) SUM & AVG B) SUM, MIN & AVG C) SUM, MAX, AVG , MIN &COUNT D) NONE

2 Answers   Accenture,


is it possible to get -811 error when you use cursors. why?

2 Answers   IBM,


What is the use of dclgen in db2?

0 Answers  


What is copy pending status in db2?

0 Answers  


How to fetch the last row from the table in SQL (db2)?

0 Answers  


What is the error code -803 ?

3 Answers  


What is the function of the Data Manager?

2 Answers  


Explain db2.

0 Answers  


Categories