Skip to main content

DB2 FUNCPATH directive fails when specified with multiple parameters

  • April 24, 2014
  • 0 replies
  • 0 views

Problem:

When using a COBOPT(COBOL OPTIONS) file a compilation failure occurs if the DB2 directive FUNCPATH is specified with multiple parameters.

For example

-C DB2(FUNCPATH=='SYSIBM,SYSFUN, db2inst1')

Would return the error:-

*DB2 directive = SYSFUN is invalid- check documentation for list of valid directives

*Rejected - DB2(FUNCPATH=SYSIBM, SYSFUN, db2inst1)

*1507-U

Resolution:

For compilation the COBOPT process has to cope with

  • multiple options that can contain spaces,
  • options that are separated by spaces,
  • quotation characters used to escape spaces (but not actually part of the option), and
  • quotation characters that actually need to be passed through as part of the argument.


What is required is for the entire DB2 OPTION, and the option arguments to be contained within double quotes.



Therefore, the example above would need to change from :-


-C DB2(FUNCPATH=='SYSIBM, SYSFUN, db2inst1')

to

-C "DB2(FUNCPATH=='SYSIBM, SYSFUN, db2inst1')"


#EnterpriseDeveloper
#MFDS
#StudioEnterpriseEdition

0 replies

Be the first to reply!