BookmarkSubscribeRSS Feed
Deepak13
Obsidian | Level 7
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

7 REPLIES 7
Reeza
Super User
Export to the myfolders location and find the file there.

Myfolders is on your computer anyways.

If you want to export to other locations, you need to set them up as a shared drive the way you did for myfolders.

FYI - I'm guessing you accidentally set up SAS UE incorrectly and chose to leave it that way.
Deepak13
Obsidian | Level 7

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:

 

NOTE: There were 3 observations read from the data set WORK.STUD_ADDRESS.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.14 seconds
cpu time 0.08 seconds
 
 
79 proc export data= stud_address outfile= "/folders/myshortcuts/Myfolders/Address.dat" replace;
ERROR: Unable to determine datasource type. Please use the DBMS= option.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.06 seconds
cpu time 0.00 seconds
 
80 run;
81
82 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
95
Tom
Super User Tom
Super User

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;

 

Tom
Super User Tom
Super User

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.

 

Deepak13
Obsidian | Level 7

Hi,

 

could you please share a example program on how to use unix style filepaths.

ballardw
Super User

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.

Deepak13
Obsidian | Level 7

Yes, you are right I use SAS UE, is there no way to export datafile to my system?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 876 views
  • 1 like
  • 4 in conversation