For embedded DB2 SQL application, I figure it out that I can use command line to create the application.
cob64 -C MFSYNC -z -o myTest myTest.cbl sqlca.cpy -L/home/db2inst1/sqllib/lib64 -ldb2 -ldb2gmf
But I got this error :
/bin/ld:sqlca.cpy: file format not recognized; treating as linker script
/bin/ld:sqlca.cpy:1: syntax error
collect2: error: ld returned 1 exit status
But if I rename sqlca.cpy as sqlca.cbl. run above command line as:
cob64 -C MFSYNC -z -o myTest myTest.cbl sqlca.cbl -L/home/db2inst1/sqllib/lib64 -ldb2 -ldb2gmf
Everything is fine.
Why cob64 does not know to compile sqlca.cpy file but only compile sqlca.cbl file?
But in Visual COBOL, it uses sqlca.cpy without any issue.
Appreciated for the help.