I'm a newbie with SAS. I'm trying to convert a CSV file into SAS format. Please find the code and logs below and let me know what is wrong. OPTIONS NOFMTERR ;
%let table=%sysget(v1);
%let outfil=%sysget(v2);
%macro importa ;
proc import datafile="&table" out="&outfil" dbms=csv replace ; run ;
%mend importa ;
%importa ; CSV file: 27697,1,PF,2,33,1,5,21,1987-11-09,0,1983-06-28,1987-11-09,,29,1,11,0,4,0,,32,,0,2,,,0,,I,2016-11-30,23950,4,28 When I run the sas command like: sas -noterminal -set v1 /mypath/temp.csv -set v2 /mypath /mypath/import.sas it errors out that: NOTE: SAS initialization used:
real time 0.02 seconds
cpu time 0.01 seconds
1 OPTIONS NOFMTERR ;
2
3 %let table=%sysget(v1);
4 %let outfil=%sysget(v2);
5
6 %macro importa ;
7 proc import datafile="&table" out="&outfil" dbms=csv replace ; run ;
8 %mend importa ;
9 %importa ;
ERROR: ""/mypath"" is not a valid name.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: The SAS System stopped processing this step because of errors.
10
... View more