BookmarkSubscribeRSS Feed
neverstoplearning
Calcite | Level 5

Currently, we are reading DB2 table using korn shell that create a txt file(Ç as delimiter) which later bring into SAS and its working fine.

We have a requirment get rid of korn shell script and directly read data from db2 using sas script. When I am reading data from db2 table using sql pass thru one of the column is getting truncated (please look for value 00011111111 in below string. Need assistance to sove this issue.

 

20150901Ç0Ç0Ç0Ç0Ç0Ç0Ç0ÇÇ"00011111111"Ç20140709Ç5500.000000000012Ç0Ç0

 

Thanks,

Dinesh

3 REPLIES 3
LinusH
Tourmaline | Level 20

What (exactly) is the data type in DB2?

Share your SQL to extract that columns and move it to SAS.

How is it truncated?

Data never sleeps
neverstoplearning
Calcite | Level 5

data type in DB2 is defined as

 

Column name                   Data type name      Length     Scale Nulls

--------------------------------------------------       -----------       ------

ACCT_REF_NB                   CHARACTER               11          0 No

 

 

Also, looks like there a problem with buffer(readbuff). The same record is written twice after approx 100 observations.

 

Thanks,

Dinesh

LinusH
Tourmaline | Level 20

You are still not sharing your SQL, or given any description about the truncation.

And by adding more "problems" to the same thread doesn't really help, especially if you don't describe that either.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 920 views
  • 0 likes
  • 2 in conversation