Thank you, Blair
I tried your instruction.
echo $COBCPY
/home/db2inst1/sqllib/include/cobol_mf:/opt/microfocus/VisualCOBOL/cpylib
I have the $COBCPY setup correctly, I also have "EXEC SQL INCLUDE sqlca END-EXEC" in mytest.cbl
cob64 -t -C MFSYNC -z -o mytest mytest.cbl -L/home/db2inst1/sqllib/lib64 -ldb2 -ldb2gmf
rwxr-xr-x 1 db2inst1 db2iadm1 13919 Apr 29 16:10 mytest
You can see the file size is 13919 bytes
cob64 -t -C MFSYNC -z -o mytest mytest.cbl sqlca.cbl -L/home/db2inst1/sqllib/lib64 -ldb2 -ldb2gmf
-rwxr-xr-x 1 db2inst1 db2iadm1 18582 Apr 29 16:06 mytest
The file sizes are different. both work under DB2. it seems sqlca.o is linked into the later one. but the first one just call it at run-time. I feel confused.
To my expectation, the file size for both should be the same. no matter explicitly or implicitly to include sqlca.cpy.
Thank you again,
-Jack