BookmarkSubscribeRSS Feed
habitusantos
Fluorite | Level 6

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

3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12

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.

Jagadishkatam
Amethyst | Level 16

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
art297
Opal | Level 21

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

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

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1012 views
  • 6 likes
  • 4 in conversation