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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you mean by data staging area? : Sas-di

611


How to create an external dataset with sas code?

596


For what purpose would you use the RETAIN statement?

1057


describe about metadata object? : Sas-di

634


What is the function of output statement in a SAS Program?

621






What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

736


Which command is used to save logs in the external file?

578


Can you explain the process of calendar?

650


what are the benefits of data integration? : Sas-di

548


how does sas handle missing values in sort order? : Sas programming

539


What is the basic syntax of a sas program?

675


What is the use of stop statement?

654


Do you know the features of sas?

603


why is sas data integration studio important? : Sas-di

570


Explain input and put function?

657