Hi all,
I am running in AIX 4 using DB2 Connect DB2 SDK 7.2.5. I am writing a script that connects to a UDB running on the mainframe. Here is a snippet of the code:
for APPSERV in TESTDB
do
( db2 <<-END_DB2
connect to ${APPSERV} user userid using password
DB2 UPDATE ${APPSERV}.PSPRCSRQST SET RUNSTATUS = '1',PRCSRTNCD = 0,CONTINUEJOB = 0,ENDDTTM = CURRENT TIMESTAMP,LASTUPDDTTM = CURRENT TIMESTAMP WHERE PRCSINSTANC
E = 7431
END_DB2
The above SQL runs correctly in db2 interactive mode, however, it fails with the following error when I run it via the script:
DB20000I The SQL command completed successfully.
db2 => db2 => DB21034E The command was processed as an SQL statement because it
was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0199N The use of the reserved word "SET" following "" is not valid.
Expected tokens may include: "IS <HEXSTRING> <CHARSTRING> <GRAPHSTRING> ".
SQLSTATE=42601
Any ideas?
Thanks!