BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LinusH
Tourmaline | Level 20
I don't think there will ever be a SAS 10, perhaps on or two more maintenance releases on 9.4.
The current/upcoming major releases from SAS is Viya, and ASFAIK they haven't lifted the 32 name length restriction.
Data never sleeps
ivesleo
Calcite | Level 5

Hello all,

 

Truncating the column name by keeping the first 32 characters normally works in PROC SQL.  Just omit the remaining characters past the first 32 and SAS will recognize the full name of the column. That is my approach when using PROC SQL, but the same should be true for data steps.

JohnJPS
Quartz | Level 8

It was communicated at the Global Forum that this will finally be fixed in version 9.5.

Mark_sas
SAS Employee

Yes indeed.  The 9.5 release of SAS is currently slated to contain long name support (i.e., up to 255 characters) for member names of type DATA, VIEW, and ITEMSTOR, as well as variable names for DATA, VIEW, and PROGRAM.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

bijay
Calcite | Level 5

Work around is by using sql pass through:

 

proc sql;
connect to <engine> (dsn=xxxx user=xxx pw=xx);
create table longtabletest as
select * from connection to <engine>
(select * from <table name with more than 32 character>
where <filter condition if any>);
disconnect from <engine>;
quit;
 

ScottBass
Rhodochrosite | Level 12

Using your explicit passthrough workaround, what results do you get in SAS when your RDBMS table is something like:

 

CREATE TABLE FOO (
   THIS_IS_A_LONG_COLUMN_NAME_THAT_IS_MORE_THAN_32_CHARS VARCHAR(50),
   THIS_IS_A_LONG_COLUMN_NAME_THAT_IS_MORE_THAN_32_CHARS2 VARCHAR(50),
   THIS_IS_A_LONG_COLUMN_NAME_THAT_IS_MORE_THAN_32_CHARS3 VARCHAR(50)
)

Are all columns imported successfully?


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.

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