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

How to find the maximum value in a column in the db2 database?

0 Answers  


What is index in db2?

1 Answers  


5 rows are inserted to a DB2 Table. Next 3 of those are updated, then a rollback is issued. What would happen when the rollback is issued?

2 Answers  


Explain db2.

0 Answers  


what is the difference between join and union?

4 Answers   IBM,






select * from orders where odate between '2010-01-01'and '2010-03-31' How do u fetch this into cursor?

2 Answers  


Give the name of some fields form sqlca.

0 Answers  


pls explain the precompilation process of cobol-db2 pgm

3 Answers   HCL, IBM,


What are the full forms of spufi and dclgen and why are they used?

0 Answers  


What is tablespace?

3 Answers  


Explain what a plan is?

3 Answers   CTS,


What is cursor with hold option in db2?

0 Answers  


Categories