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 difference between alias and synonym in db2?

0 Answers  


What is the maximum length of sqlca?

0 Answers  


What information is contained in a SYSCOPY entry?

2 Answers  


What are the contents of dclgen?

0 Answers  


How many Buffer pools are there in DB2 and what are they?

1 Answers   IBM,


What is the difference between bind and rebind in db2?

0 Answers  


How can you do the explain of a dynamic sql statement?

0 Answers  


wht steps we need will coding cobol and db2 pgm ?

6 Answers   CGI,


Which is faster delete or truncate?

0 Answers  


How do you stop a db2 database in linux?

0 Answers  


Can we delete records from view?

0 Answers  


Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code?

6 Answers  


Categories