5The DB2_SQLROUTINE_COMPILE_COMMAND does not normally need to be set. 5However, when it is set on Windows, there can be a problem caused by the 5%DB2PATH% variable containing a space between "Program" and "Files" in the 5default path "C:\Program Files\IBM\SQLLIB". This problem can 5occur even though the entire command value is in quotation marks.
5The workaround uses the short form for the %DB2PATH% value. In the 5default case, this is "C:\PROGRA~1\IBM\SQLLIB". You can either 5set %DB2PATH% to the short form of the path where DB2 UDB is installed:
5 set db2path=C:\PROGRA~1\IBM\SQLLIB
5and run the DB2_SQLROUTINE_COMPILE_COMMAND with the default value:
5 db2set DB2_SQLROUTINE_COMPILE_COMMAND="cl -Ox -W2 -TC -D_X86_=1 -MD 5 -I%DB2PATH%\include SQLROUTINE_FILENAME.c /link -dll 5 -def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll 5 %DB2PATH%\lib\db2api.lib"
5Or you can change the value of the command itself by substituting the 5short form of the path value for %DB2PATH%:
5 db2set DB2_SQLROUTINE_COMPILE_COMMAND="cl -Ox -W2 -TC -D_X86_=1 -MD 5 -IC:\PROGRA~1\IBM\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll 5 -def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll 5 C:\PROGRA~1\IBM\SQLLIB\lib\db2api.lib"
5The actual path used must be where DB2 UDB is installed. For 5example, if DB2 UDB is installed in the same path on the D: drive, the 5setting would be "D:\PROGRA~1\IBM\SQLLIB".