DATA Step, Macro, Functions and more

Error in Proc Import File in Client Machine

Reply
New Contributor
Posts: 4

Error in Proc Import File in Client Machine

I am intended to import a file that is not in the server's SAS  but is in my client machine and the following code is giving error.

14         PROC IMPORT OUT=WORK.ORDERS

15                 DATAFILE='L:\03_CRM\5.Projectos\5.Laboratorio Jumbo\1. TROCA (Ficheiros)\3. MERCADORIA (Auchan)\1. DEPARTAMENTO

15       ! (Detalhe)\cartoes_nao_integral.csv'

16                 dbms=csv;

NOTE: The previous statement has been deleted.

NOTE: The previous statement has been deleted.

17                 SERVER='xxx.xx.x.xxx';

                   ______

                   180

18             SERVICE=SASPCFILE;

               _______

               180

ERROR 180-322: Statement is not valid or it is used out of proper order.

19         RUN;

ERROR: Physical file does not exist, /home/pt00007/L:\03_CRM\5.Projectos\5.Laboratorio Jumbo\1. TROCA (Ficheiros)\3. MERCADORIA

(Auchan)\1. DEPARTAMENTO (Detalhe)\cartoes_nao_integral.csv.

What is the problem with is code

Thanks for the help

Trusted Advisor
Posts: 2,113

Re: Error in Proc Import File in Client Machine

A couple of things.  In the documentation,

Base SAS(R) 9.4 Procedures Guide

SERVER and SERVICE do not appear to be valid statement for the PROC.

Also, the L: drive does not appear to be known on the server.  If the data are on your client, you've first got to get it to the server before the processing can proceed.

Trusted Advisor
Posts: 1,128

Re: Error in Proc Import File in Client Machine

Yes i agree with Duke,

An additional thing to be noted is to include the replace in the proc import to over write the data in the existing dataset.

Thanks,

Jagadish

Thanks,
Jag
PROC Star
Posts: 7,363

Re: Error in Proc Import File in Client Machine

While 'server' isn't a valid option with proc import, it IS a valid option with using the excel engine in a libname statement.  Take a look at: http://books.google.ca/books?id=QOI_xTgWwgsC&pg=PA35&lpg=PA35&dq=import+excel+libname+engine+format+...

Ask a Question
Discussion stats
  • 3 replies
  • 358 views
  • 6 likes
  • 4 in conversation