BookmarkSubscribeRSS Feed
india2016
Pyrite | Level 9

Hello All,

 

I am facing problem while loading data into Oracle database using SCD Type 2 in SAS DI.

But I got error

 

"Variable ***** has different lengths on BASE  and DATA files ( Base 512 DATA 128) 

 

I searched on past error but I cant solve this error also I tried Force option and used some options.

But dint get any solution.

 

If anyone has solution for this then please Help me out.

 

Thank you,

 

2 REPLIES 2
Kurt_Bremser
Super User

Specify the correct length of 512 for this variable in your newly created dataset (which is appended to the existing table, as this is a WARNING from PROC APPEND).

Patrick
Opal | Level 21

@india2016

That the length difference between the variable in the base and the data table is exactly of factor 4 makes me think that you might have a problem with "byte semantics".

 

Below 4 libname options - defined as part of the libname metadata definition - are what was required in an actual project to make it work. What's right for you depends on your environment but below should give you a good start.

DBCLIENT_MAX_BYTES=1 
ADJUST_BYTE_SEMANTIC_COLUMN_LENGTHS=NO 
ADJUST_NCHAR_COLUMN_LENGTHS=NO 
DBSERVER_MAX_BYTES=1 

Another option worth considering:

UTILCONN_TRANSIENT=YES

And if you're using bulk loading then it's also worth to explicitly define some of the bulk load options, especially BL_DEFAULT_DIR

BL_DEFAULT_DIR='/data/saswork/BulkloadTemp/'

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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