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,
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.
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.
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
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!
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.
Ready to level-up your skills? Choose your own adventure.