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

What is a synonym ?

2 Answers  


Can you search give an array in the WHERE clause of a db2 query?

1 Answers  


How do you Load a table ?? and what is Load replace ?

2 Answers   Xansa,


What are the benefits of using the db2 database?

0 Answers  


How to create db2 table in mainframe?

0 Answers  


What is the difference between using bind () and rebind () methods of naming class?

0 Answers  


How is the value function used?

0 Answers  


Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.

5 Answers  


How to solved 818 error

4 Answers   Keane India Ltd, Wipro,


What is cursor stability?

1 Answers  


What are leaf pages?

3 Answers  


What is with ur in db2?

0 Answers  


Categories