Page 1 of 1

SAS DB2UTIL help

PostPosted: Fri Jul 27, 2012 6:34 am
by mysteryman17_2k
First, I'm a newbie here and forgive me if I'm on the wrong section of forum to posts my question. My concern is I am following a sample DB2UTIL usage on to update a db2 table using sas data set, sample is as follow:

options db2dbug;
data trans;
empno=321783;ext=’3999’;
output;
run;
proc db2util data=trans table=testid.employees function=u;
mapto ext=phone;
where empid=%empno;
update; run;

With this example, the empno is a NUM datatype which where able to process the requests when I tests it. But when I try to add quotes on empno values (e.g. 321783 to '321783') to make it CHAR datatype (of course my table is also a CHAR datatype accordingly for this field), when I execute and test the result, it is now can't read correctly the value %empno. Below is the actual log I received:

UPDATE testid.employees SET phone = '3999' WHERE empid='
DB2 SQL Error, sqlca->sqlcode=100
DSNT404I SQLCODE = 100, NOT FOUND: ROW NOT FOUND FOR FETCH, UPDATE,
OR DELETE, OR THE RESULT OF A QUERY IS AN EMPTY TABLE
COMMIT WORK
COMMIT WORK

UTIL Function: U
UTIL LIMITS - COMMIT: 1000 LIMIT: 0 ERROR: 0

SQL calls attempted: 1
SQL calls failed: 1
SQL calls successful: 0

Kindly help with my concern.

Thank you.

Re: SAS DB2UTIL help

PostPosted: Fri Jul 27, 2012 6:44 am
by dick scherrer
Hello and welcome to the forum,

UPDATE testid.employees SET phone = '3999' WHERE empid='
is incomplete at best?

How is this request being submitted/presented to run?

Re: SAS DB2UTIL help

PostPosted: Fri Jul 27, 2012 3:54 pm
by mysteryman17_2k
Hi,

That's all the sdsf log has logged (and as I also observed it looks cut or something, I believed that is where the problem occured basically). I run this sas procedure, using dfsort (jcl) under ibm mainframe and retrieved error info from sdsf held log.

Re: SAS DB2UTIL help

PostPosted: Fri Jul 27, 2012 7:47 pm
by dick scherrer
Hello,

Please [post the JCL and control statements that are submitted using the Code tag to preserve alignment and improve readability.