LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1999, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 27 Dec 1999 09:18:43 +0100
Reply-To:     detecsm_hellriegelg@WESTLB.DE
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE>
Subject:      Antwort: Dataset - > CSV file
Content-type: multipart/mixed;
              Boundary="0__=PyR4DhEmldhAxf9iBl7WHjExhF9ixEGfeMh17l5rdkiIL0Naumho4mqM"

"R. Favre" <romuald_favre@YAHOO.COM> on 26.12.99 16:55:13

Bitte antworten an "R. Favre" <romuald_favre@YAHOO.COM>

An: SAS-L@LISTSERV.UGA.EDU Kopie: (Blindkopie: DeTeCSM HellriegelG/D/ExternalStaff/WLB) Thema: Dataset - > CSV file


How to convert a sasdb (.sd2) into a CSV file?

I would like to do it directly in the SAS Program Editor (without using SCL list) Is it possible?

Thank you

r.favre

rfavre@atraxis.com

Yes, it's not necessary to use such things, like S-lists. Simply allocate the subdirectory, your SAS file is in with a libname (TEST). Then do the following:

data _null_;

set TEST.sastable;

d=";";

file "csv.csv";

put var1 d var2 d var3 d .......;

run;

If you want to find all variables and do the output automaticly, e.g. for all SAS files in a subdir, that is possible too with a macro. If you want do do that, contact me and I can help you with that.

Mit freundlichen Grüßen

Gerhard Hellriegel DeTeCSM

WestLB Abteilung: 001-80622 Aderstr. 22 D - 40217 Düsseldorf Tel.: +49211 826 6173 Fax: +49211 826 5393


Back to: Top of message | Previous page | Main SAS-L page