BookmarkSubscribeRSS Feed
dhir
Obsidian | Level 7

Hi, I am trying to import a .csv file saved on my local machine onto SAS server. The import is successful if I use File>Import Data> from the menu. But when I try to write a code, the import fails error 'Device is offiline' 

 

Code is as follows: 

 

data sasuser.AMAT_87_ASK_TRIAL;
infile 'E:/*/*/*/AMAT+ISSM (1987-92)/AMAT 1987//AMAT_87_ASK.csv'
delimiter = ','
firstobs = 2
lrecl=32767
dsd
missover;

LENGTH
XA 8
ASK 8
ASKSIZE 8
SELLTIME 8
VOLS 8
ALAMBDA 8
AMU 8
TQ $1
REGIMEASK 8
OLDINDEX 8
VOLSOLD 8
PROBS 8 ;
FORMAT
XA BEST4.
ASK BEST6.
ASKSIZE BEST6.
SELLTIME TIME8.
VOLS BEST6.
ALAMBDA BEST12.
AMU BEST12.
TQ $CHAR1.
REGIMEASK BEST3.
OLDINDEX BEST4.
VOLSOLD BEST6.
PROBS BEST11. ;
INFORMAT
XA BEST4.
ASK BEST6.
ASKSIZE BEST6.
SELLTIME TIME8.
VOLS BEST6.
ALAMBDA BEST12.
AMU BEST12.
TQ $CHAR1.
REGIMEASK BEST3.
OLDINDEX BEST4.
VOLSOLD BEST6.
PROBS BEST11. ;
INPUT
XA : ?? BEST4.
ASK : ?? COMMA6.
ASKSIZE : ?? BEST6.
SELLTIME : ?? TIME8.
VOLS : ?? BEST6.
ALAMBDA : ?? COMMA12.
AMU : ?? COMMA12.
TQ : $CHAR1.
REGIMEASK : ?? BEST3.
OLDINDEX : ?? BEST4.
VOLSOLD : ?? BEST6.
PROBS : ?? COMMA11. ;
run;

 

 

LOG

 

ERROR: Device is offline.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set SASUSER.AMAT_87_ASK_TRIAL may be incomplete. When this step was stopped there were 0 observations and 12
variables.
WARNING: Data set SASUSER.AMAT_87_ASK_TRIAL was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

 

1 REPLY 1
Kurt_Bremser
Super User

File - Import imports from the local environment.

Code, OTOH, is executed directly on the server, and you must make sure that the path you use on the local machine is also available there.

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
  • 1 reply
  • 965 views
  • 0 likes
  • 2 in conversation