I am all googled out on how to get this to work, nothing I try seems to do anything but give an error.
I need to call a CL program from PHP and pass parameters, some of which require quotes around them, see below:
call qsys.qcmdexc('call pgm(stklibr/qarc101) parm('01/03/2012' '31/09/2012' 'stock' '22222' '000' 'email@mycompany.com')',0000000104.00000)
This is the value of the parameter I am passing to db2_exec.
I get the following error if I go this:
42601 - Token 01 was not valid. Valid tokens: ) ,. SQLCODE=-104
I know my example has single quotes around the parameters as well as around the 1st parm for qcmdexc. I tried no quotes - no good because of the reuqired data formats, 2 quotes - errors as well.
Any ideas on how to correctly code this, or is there a better way please?
I need to call a CL program from PHP and pass parameters, some of which require quotes around them, see below:
call qsys.qcmdexc('call pgm(stklibr/qarc101) parm('01/03/2012' '31/09/2012' 'stock' '22222' '000' 'email@mycompany.com')',0000000104.00000)
This is the value of the parameter I am passing to db2_exec.
I get the following error if I go this:
42601 - Token 01 was not valid. Valid tokens: ) ,. SQLCODE=-104
I know my example has single quotes around the parameters as well as around the 1st parm for qcmdexc. I tried no quotes - no good because of the reuqired data formats, 2 quotes - errors as well.
Any ideas on how to correctly code this, or is there a better way please?
Comment