Created On:  17 September 2010
Problem:
When running a DB2 program a runtime error 173 Called program file not found results on the call to sqlgstrt.
The program was precompiled using the IBM DB2 pre-processor:
db2 prep db2test.sqb (which produces db2test.cbl with expanded calls to DB2 API routines)
Then compiled using Server Express cob command.
cob -ivt db2test.cbl
The program was precompiled using the IBM DB2 pre-processor:
db2 prep db2test.sqb (which produces db2test.cbl with expanded calls to DB2 API routines)
Then compiled using Server Express cob command.
cob -ivt db2test.cbl
Resolution:
When using the DB2 command-line pre-compiler, db2 prep, then per the IBM documentation, you must link the application to executable. Refer to the COBOL samples provided by IBM for examples of how to link COBOL applications. The best method is that Server Express provides an integrated DB2 external compiler module, DB2 ECM. Using this for the program compilation allows execution in intermediate and generated code.  Refer to the section "Building Applications" within the DB2 chapter of the Server Express Database Access manual for details of how to link DB2 applications.
Old KB# 31732
#Server
#ServerExpress
#EnterpriseServer
#Enterprise
#DB2sqlgstrt
#COBOL

