How do I CREATE an external dataset with sas code?

I would like to create within a sascode a non-exsistent
textfile on the host.
So I am not forced to create the file befor filling it.

Answers were Sorted based on User's Feedback



How do I CREATE an external dataset with sas code? I would like to create within a sascode a non..

Answer / temporarypostedname

I thought about sth like this:

Data _null_;
filename fileref <device-type>
dsnname='path'

run;


something like this buy it do not work.
and i would like to add BLK, DISP; UNIT SIZE

Is This Answer Correct ?    0 Yes 0 No

How do I CREATE an external dataset with sas code? I would like to create within a sascode a non..

Answer / kumar

/*this is only for txt file*/
data _null_;
file print;
if _n_=1 then do;
put @5'name1'@10 name2';
put @5name1 @10name2;
end;

and for excel file

file kala dde 'path.xls';
data l;
infile kala;
input name1 name2;
run;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

what is snowflake schema? : Sas-di

0 Answers  


Why double trailing @@ is used in input statement?

0 Answers  


Which is the Best SAS training Institute in Delhi NCR for SAS certification preparation

1 Answers   SAS,


What is the work of tranwrd function?

0 Answers  


what are some differences between proc summary and proc means? : Sas programming

0 Answers  






Differentiate between sas functions and sas procedures.

0 Answers  


What report output formats can you generate using SAS?

3 Answers   Accenture,


what is hash files in sas and why we are using this one in sas?

0 Answers   L&T, SAS,


Are the preferred term counts are always equal to Body system counts? If so, Why are they equal if not why they are not equal?

1 Answers   Icon,


what are some good sas programming practices for processing very large data sets? : Sas programming

0 Answers  


WHAT IS DEBUGGING? HOW TO TEST THE DEBUGGING IN SAS?

3 Answers   Accenture,


How do you add a number to a macro variable? : sas-macro

0 Answers  


Categories