data Stud_address; Infile "/folders/myshortcuts/Myfolders/Imports/Address.dat" truncover; input Names $13. suite Address $18.; run; proc print data=stud_address; run; proc export data= stud_address outfile= "T:\SAS\output\Stud_address.dat" dbms= dlm replace; run;
Hi ,
I have tried exporting the program but cant able to do so, Kindly help! not sure where iam stucl
Hi reeza,
Many thanks! But even after selecting the same folder for output, I get errors. Please see code and error.
are you sure? is my SAS UE is setup incorrect? is there any way to correct it?
data Stud_address;
Infile "/folders/myshortcuts/Myfolders/Imports/Address.dat" truncover;
input Names $13. suite Address $18.;
run;
proc print data=stud_address;
run;
proc export data= stud_address outfile= "/folders/myshortcuts/Myfolders/Address.dat" replace;
run;
ERROR:
That error is not a PATH issue. You didn't tell PROC EXPORT what type of file you wanted to create.
For some known extensions PROC EXPORT will guess what type of file you want to create but it is better to tell it using the DBMS= option on the PROC statement.
If you want to recreate your fixed format text file then just do that using a data step.
But you would need to tell it what format to use for the SUITE variable.
data _null_;
set stud_address;
file "/folders/myshortcuts/Myfolders/Address.dat" ;
put Names $13. suite 10. +1 Address $18.;
run;
Does the first data step run?
If so then you need to use Unix style file paths, not the Windows style path you have in the last step.
Hi,
could you please share a example program on how to use unix style filepaths.
Your infile statement makes me think you may be using the University Edition. As such the only paths it can see are those specifically set up for the virtual machine to use. So it likely does not "see" the T drive or any folders there.
Yes, you are right I use SAS UE, is there no way to export datafile to my system?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.