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

when does the SQL statement gets executed when you use cursor in the application programming ?

3 Answers   IBM,


How do you find the maximum value in a column in db2?

0 Answers  


Define sqlca.

0 Answers  


What is cursor with hold option in db2?

0 Answers  


Update command

1 Answers  






4. A DB2 application is bound with uncommitted Read isolation level.It issues a request that retrieves 20 rows out of 200000 in the table. Which of the following descrbes the rows that are locked as a result of this request? a. None of the rows are locked. B.The retrieved rows are locked. C.The last row of the result set is locked. D.The rows not previously updated by another application are locked.

3 Answers   Wipro,


How would the varchar column remarks defined?

0 Answers  


What is a Cartesian product?

2 Answers  


how to resolve -811 sqlcode .give clear explaination

3 Answers   IBM,


What is a base table?

2 Answers  


what is difference between random and sequence file access

1 Answers   Syntel,


What techniques are used to retrieve data from more than one table in a single SQL statement?

2 Answers  


Categories