Hi,
I am trying to execute the DB2 load utility from a C program.
lPid = fork();
execl(csExePath, csExeName,csCmd, NULL);
the contents of the parameter variables are as follows:-
csExePath:- /home/db2dcln/sqllib/bin/db2
csExeName:-
csCmd:- 'LOAD FROM /Test/log/193.37.6.18.PRE.err OF del MODIFIED BY
COLDEL| DUMPFILE=/Test/bad/193.37.6.18.myfile.ERR_LOAD.bad MESSAGES
193.37.6.18.myfile.ERR_LOAD.log INSERT INTO ERROR_MSG'
Also tried with csExeName='db2'
The connection to DB2 is taken in the program using EXEC SQL DB2
connect to user myuserid using mypassword
The command doesn't seem to be running successfully because the '.log'
and '.bad' file do not get created and the table is also not
populated.
The same command(mentioned as follows) seems to be running from the
command prompt. (We are using DB2 on AIX )
$>/home/db2dcln/sqllib/bin/db2 'LOAD FROM
/Test/log/193.37.6.18.PRE.err OF del MODIFIED BY COLDEL|
DUMPFILE=/Test/bad/193.37.6.18.myfile.ERR_LOAD.bad MESSAGES
193.37.6.18.myfile.ERR_LOAD.log INSERT INTO ERROR_MSG'
What can the problem be ? Why isn't it running from the C program?
Thanks in advance
Arti