INCLUDE & COPY in COBOL

(1).
EXEC SQL
     INCLUDE CUSTDCL
END-EXEC.

(2).
EXEC SQL
       COPY CUSTDCL
END-EXEC.

INCLUDE is executed at pre-compile time (by the SQL Compiler).
COPY is executed at compile time (by COBOL Compiler).

 WRONG:
     (2)  We can use COPY for DCLGEN, but get RC=4 from precompiler because the pre-compiler searchs for the host variables used in SQL statement and it doesn't not find them returns 4.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章