BookmarkSubscribeRSS Feed
etl_tool
Calcite | Level 5

     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.

7 REPLIES 7
LinusH
Tourmaline | Level 20

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?

Data never sleeps
etl_tool
Calcite | Level 5

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

LinusH
Tourmaline | Level 20

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?)

Data never sleeps
SASKiwi
PROC Star

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.

etl_tool
Calcite | Level 5

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

mebass
SAS Employee

If it helps, here is the list of supported data types and SAS conversions for Sybase (see LIBNAME Statement Data Conversions on this page):

http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/viewer.htm#n1n0n59fz7nfs2n1sy...

etl_tool
Calcite | Level 5

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.

SAS Innovate 2025: Register Now

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!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 7 replies
  • 2978 views
  • 0 likes
  • 4 in conversation