DATA Step, Macro, Functions and more

Error while importing from csv 'Device is offline'

Reply
Occasional Contributor
Posts: 17

Error while importing from csv 'Device is offline'

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

 

 

Super User
Posts: 9,873

Re: Error while importing from csv 'Device is offline'

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 1 reply
  • 134 views
  • 0 likes
  • 2 in conversation