SAS DB2UTIL help



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

SAS DB2UTIL help

Postby mysteryman17_2k » Fri Jul 27, 2012 6:34 am

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.
mysteryman17_2k
 
Posts: 2
Joined: Thu Jul 26, 2012 12:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SAS DB2UTIL help

 

Re: SAS DB2UTIL help

Postby dick scherrer » Fri Jul 27, 2012 6:44 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: SAS DB2UTIL help

Postby mysteryman17_2k » Fri Jul 27, 2012 3:54 pm

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.
mysteryman17_2k
 
Posts: 2
Joined: Thu Jul 26, 2012 12:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SAS DB2UTIL help

Postby dick scherrer » Fri Jul 27, 2012 7:47 pm

Hello,

Please [post the JCL and control statements that are submitted using the Code tag to preserve alignment and improve readability.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to All other Mainframe Topics