Skip to main content

Problem:

If one has nested programs where one of the programs accesses DB2 using the DB2 compiler directive IGNORE-NESTED=PROGRAMID allows the program to compile correctly-

However when both the Nested programs use DB2 (not using IGNORE-NESTED directive)

get error-

COBCH0012S Operand SQLCA is not declared (message applies to code produced by External Compiler Module) : D:\\mfeex\\nested\\testn.cbl(103,15)

Compilation complete with 1 errors, 0 warnings, 0 notices and an exit code of 12

Resolution:

If one of the nested modules uses SQl, that is fine but you need to compile with the IGNORE-NESTED=PROGRAM-ID HCO compiler directive.

Only one program in a nested group can access Db2.

HCO doesn't support SQL code in two different nested modules. Make one or both of the nested routines subroutines.

Old KB# 6597

#EnterpriseDeveloper
#MFDS