Hi,
I'm trying to update a timestamp column in sybase. It just throws an error saying
AN EXCEPTION WAS THROWN WHILE SENDING A PACKET TO THE PEER.
iT'S JUST A SIMPLE UPDATE
SAS DATA SET --> TABLE LOADER WITH INSERT/UPDATE AND SKIP NEW ROWS OPTION --> SYBASE TARGET.
You need to leave more details, such as the log.
Add these options, maybe Sybase can give feedback before the exception:
options sastrace=',,,d' sastraceloc=saslog;
Perhaps your datatypes doesn't match, giving you an overflow?
Linus,
Thanks, I'm new to SAS. Do you want me to add the options to precode?
Here's the data example.
SAS DATA SET
COLUMN --> TYPE --> INFORMAT --> FORMAT-->DATAEXAMPLE
ID --> CHAR 16 --> $16 --> $16 --> 0534232
LAST_TMSP --> NUMERIC --> DATETIME27.6 -->DATETIME27.6 --> 06may2015:18:22:02.000000
SYBASE DATA
COLUMN --> TYPE -->DATAEXAMPLE
ID --> CHAR 16--> 0534232
LAST_TMSP --> DATETIME --> 7/19/2009 3:36 PM
Anywhere just before the insert to Sybase. In your example it seems you have different precision in the datetime column. Check SAS on line doc for data type mapping between SAS and Sybase (ODBC?)
You say you are updating a TIMESTAMP column but then later say it is DATETIME: LAST_TMSP --> DATETIME --> 7/19/2009 3:36 PM
So which is it? Check the Sybase schema to confirm, not how it appears in SAS.
Hi SASKiwi,
This is the datatype and data. No confusion or mistake in it. I've submitted a SAS Support ticket too
SAS DATA SET
COLUMN --> TYPE --> INFORMAT --> FORMAT-->DATAEXAMPLE
ID --> CHAR 16 --> $16 --> $16 --> 0534232
LAST_TMSP --> NUMERIC --> DATETIME27.6 -->DATETIME27.6 --> 06may2015:18:22:02.000000
SYBASE DATA
COLUMN --> TYPE -->DATAEXAMPLE
ID --> CHAR 16--> 0534232
LAST_TMSP --> DATETIME --> 7/19/2009 3:36 PM
If it helps, here is the list of supported data types and SAS conversions for Sybase (see LIBNAME Statement Data Conversions on this page):
I took the whole generated code and execute in SAS Base.
Ok, I think the problem is it is a view in Sybase that I'm trying to update to. It works when you execute the update command in a sybase interactive sql or aqua data studio but does not work from SAS. I will let you know if the problem gets solved when they grant the permission.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.