BookmarkSubscribeRSS Feed
MariaD
Barite | Level 11

Hi Folks, 

 

I tried to import a table, using PCFF, which name is longer than 32 characters. When I use point-and-click I don't have any problem but using PCFF the following error appear:

 

26         proc import table='XXX_XX_XX_XX_XX_XX_XXXX_XXXX_XXXX'
27               dbms=accesscs
28               out=table replace;
29               database='\\folder\file.mdb';
30               server='IP';
31               port=9621;
32               serveruser='user';
33               serverpass=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
34         run;

ERROR: TABLE value exceeds maximum length of 32 characters.

 

There is any way to import it using SAS code?

 

Regards,

4 REPLIES 4
SuryaKiran
Meteorite | Level 14

Hi,

 

SAS cannot handle tables names that have longer than 32 characters, try creating views for those tables or you can run a pass-through query if possible. 

Thanks,
Suryakiran
MariaD
Barite | Level 11

Hi @SuryaKiran,

 

Thanks! But why using import from point and click works?

 

Regards,

SASKiwi
PROC Star

Behind the scenes, the point-and-click interface copies the Excel file up to the remote SAS server as a delimited file with a shortened filename without using SAS code. That is why it works for longer filenames as it is not using SAS code to do the transfer.

 

BTW the 32-character limit is being increased in SAS 9.5 to 128 characters and is due out probably in the next 12 months. 

Vince_SAS
Rhodochrosite | Level 12

Try something like this SQL explicit pass-through code:

 

proc sql;
  connect to access (path='\\folder\file.mdb');  
  create table work.table as select * from connection to access
    (
      select * from XXX_XX_XX_XX_XX_XX_XXXX_XXXX_XXXX
    );
  disconnect from access;
quit;

 

Vince DelGobbo

SAS R&D

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2183 views
  • 0 likes
  • 4 in conversation