@jpate242 wrote:
this is my code
filename main '/folders/myfolders/Practice/main.txt';
data = main; infile main dlm = ' '; input x y z ; run;
and its giving me an error
You need to show the actual lines from the SAS log to get detailed help. Note on using this forum: Use the pop-up window you get when clicking on the Insert Code or Insert SAS Code icons to enter example text (or log lines) and example program code, respectively.
The DATA statement does not want an equal sign. You do not need to tell SAS to use space as the delimiter, it is the default.
Try:
filename main '/folders/myfolders/Practice/main.txt';
data main;
infile main truncover;
input x y z ;
run;
If you want to use something else as the delimiter then normally you also want to use the DSD option so that adjacent delimiters are treated as marking a missing value. If you want to use a TAB as delimiter then you are better off use the hex code for a tab character instead of an actual tab characters. Most reasonable program editors will replace tabs with spaces to allow code to be portable to users that might prefer different tab stops than you do.
data main;
infile main dsd dlm='09'x truncover;
input x y z ;
run;
... View more