BookmarkSubscribeRSS Feed
sasprofile
Quartz | Level 8

Hello Friends,

 

Am trying to import excel file from 9.4 SAS Grid control node to PC File server,I tried various to import the file but the none of the code is working.Its giving so many issues.

 

I tried  below code to import, I would really appreciate if anyone can assist me in regards to this

please send me  the correct code for exporting file from PC file server to Grid control node also.

 

I tried all the codes given in the support websites also but none of them worked,not sure where its going wrong

 

 

 

PROC IMPORT DBMS=EXCELCS 

            DATA= 'D:\pcfile\Demo.xls’

            OUTFILE= \tmp REPLACE;

            PORT=xxxx;

            SERVER='xxxxxxxxxx';

            SHEET='yoursheet';

RUN;

 

 

Thank you

 

5 REPLIES 5
sasprofile
Quartz | Level 8
Thank you so much for your prompt reply When I used below code for import from grid node to pc file server by launching sas on node,am getting below error proc import dbms=excelcs data='D:\pcfile\Demo.xls' outfile=\tmp REPLACE; port=xxxx; server="xxxxxxxxxxx"; sheet=sheet1; run; Proc import dbms=excelcs data='D:\pcfile\Demo.xls' ---- 22 76 Error 22-322 Syntax error,expecting onc eof the following: ;,DATAFILE,DATATABLE,DBMS,DEBUG,FILE Error 76-322 Syntax error,statement will be ignored outfile=\tmp REPLACE; port=xxxx; server="xxxxxxx"; run; when am using below export code am getting below error proc export data= sashelp.prdsale; dbms=xls; file="D:\pcfile\prdsale.xls"; port=xxxx; server="xxxxxxxxxxx"; sheet=sheet1; run; proc export data=sashelp.prdsale; Error:FILE or TABLE is required and must be specified. dbms=xls; file="D:\pcfile\prdsale.xls"; port=xxxx; server="xxxxxx"; sheet=sheet1; run; am not sure where its going wrong,would appreciate if you can suggest
SASKiwi
PROC Star

To correct the first syntax error use OUT = DatasetName not OUTFILE. = . To fix the second syntax error add OUT = . 

Terho
Obsidian | Level 7

Hello,

I've had similar issues where we tried to SAS Import from PC to Linux. I found that the PC File Server is not very reliable.

 

As a workaround, First importing the file into Linux, and then importing is more reliable. I first upload the file into Linux, and then run an import code to bring into SAS:

 

proc import datafile="/LINUX_FILE_PATH_HERE/CREPI.csv"
out=temp.CREPI dbms=CSV replace; run;

sasprofile
Quartz | Level 8
Thank you Terho, I want to import file from PC file server to Grid node In the code provided you have not mentioned the pc file server port and server name. and also does import works in this case for csv file..I believe it works only with excel and access files.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 1712 views
  • 1 like
  • 4 in conversation