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

While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step?

4 Answers   CTS, IBM,


Can any one tell me about Restart logic in DB2.

2 Answers  


What are the prerogatives?

0 Answers  


On the create tablespace, what does the CLOSE parameter do?

1 Answers  


What is the usage of open cursor command?

0 Answers  






Why do we bind in db2?

0 Answers  


What is the role of the data page in the db2 database?

0 Answers  


How do I delete a table in db2?

0 Answers  


What is db2 bind?

0 Answers  


What is release/acquire in bind?

0 Answers  


What are packages in db2?

0 Answers  


What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?

4 Answers  


Categories