BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to delete records from a db2 table using proc DB2UTIL as shown below on os/390. As table name is too long I am getting following error

data indate;
deldate = '30NOV08' ;

options db2ssid=dbXX ;
proc db2util
data = indate
table = aaaaaaa.mmmmm_eee_xxxx_yyyy
function=delete update;
where calendar_dt = %deldate;
sqlout = sqlfile;
update;
run;

As existing table name is too long, I am getting the following error.
DSNT408I SQLCODE = -204, ERROR: aaaaaaa.mmmmm_eee_xxxx_yy . If you observe the last two bytes are truncated. The table has 5million rows, so I am not able to create view also. Can anyone suggest how to handle this?
1 REPLY 1
LinusH
Tourmaline | Level 20
The documentation states that db2util is compatible with SAS version 5. Maybe that affects the possibility to specify table name longer than 8 bytes...?
Another odd thing is how you refer to %deldate, can't see it defined in your program.
But as also declared in documentation, it's recommended to move from db2util to a libname approach, using regular SQL (which would probably be a implicit pass-thru to DB2).
/Linus
Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 799 views
  • 0 likes
  • 2 in conversation