Hi All,
Question A
I have situation where i need convert the SAS datasets into the flat files irrespective how many varaiables or how much data it has . ( i am trying out in such a way that if i give dataset name it should convert the data into flat file)
"One observation should be read as single like example i am going to assign varchar(3000) so on."
Question B
Coverting the flat file into the sas dataset even in this case also i am not about the size but should read the variables and coloums data.
Any help would really be apprciated .. I am trying out from end as well.
MVK
I'm not sure about your requirements, but try to start with PROC EXPORT/IMPORT, and see if they can do what you need.
Check out Chris' blog posting. Either you can use his Enterprise Guide task, or it may give you some ideas to do it yourself.
Tom
http://blogs.sas.com/content/sasdummy/2013/01/21/turn-your-data-set-into-a-data-step-program/
Just for understanding this what i am looking at
mydataset has following observation in that.
First_name Last_name Enumber
Mike Dell 1234
when i read the data into flat file i want it this way
First_name,Last_name,Enumber
Mike,Dell,1234
This what i am looking for??
Any help on this is apprciated.
MVK
PROC EXPORT!
Yes, the format that you are showing is termed "csv", for comma-separated-values. This is easy do to with SAS. As Linus suggests, check out PROC EXPORT.
Tom
and if you don't like proc export
data _null_ ;
file 'your.csv' dsd lrecl=30000 ;
set your.data ;
put (_all_)(:) ;
run ;
Probably a good idea also to write the proc contents output data set into a matching csv
Then the reciever of the data has an idea about the datatypes.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.