DBA > Job Interview Questions > DB2 ( IBM Database 2 ) Interview Questions

Can we declare DB2 HOST variable in COBOL COPY b

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

Can we declare DB2 HOST variable in COBOL COPY book ?

NO. If we declare DB2 host variable in COBOL COPY book, at the time of Pre-compilation we get the host variable not defined, because pre-compiler will not expand COBOL COPY book. So we declare it either in DCLGEN with EXEC SQL INCLUDE DCLGEN name END-EXEC or we directly hardcode it in the working storage section.

(Continued on next question...)

Other Job Interview Questions