Date: Fri, 3 Dec 1999 10:27:07 +0100
Reply-To: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Subject: Re: Creating delimited ASCII file from SAS dataset
First of all DLM and DSD apply to INFILE, while reading, not to FILE, while
writing. Secondly, you missed the equals sign: DLM=char. However, you might
put var1 ',' var2 ',' var3 ',' var4;
This might give you an idea on how to program possible other variants.
Regards - Jim.
Y. Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070
senior statistician P.O. Box 1 fax. +31 412 407 080
5350 AA BERGHEM IMRO TRAMARKO: a CRO
J.Groeneveld@ITGroups.com the Netherlands in clinical research
"My job is to keep my computer working." - Jim Groeneveld
> -----Original Message-----
> From: Julia Hertl [SMTP:jah12@CORNELL.EDU]
> Sent: Thursday, December 02, 1999 8:57 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Creating delimited ASCII file from SAS dataset
> Hi SAS-L,
> I have what I know is a very simple question, but I can't find the
> anywhere. I need to create an ASCII file (cows2.dat) which is either tab-
> or comma-delimited (it doesn't matter which) out of a SAS dataset (cows).
> am using SAS 6.12 on UNIX, and when I submit the code:
> data _NULL_; set cows;
> file 'cows2.dat' dlm'09'x;
> put var1 var2 var3 var4;
> I get an error message saying "Invalid option name DLM". I got the same
> error when I tried dlm'05'x and "Invalid option name DSD" when I tried
> the option dsd.
> Usually when I create ASCII files out of SAS datasets, it is sufficient
> them to be space-delimited, but this time I need an ASCII file which is
> tab- or comma-delimited.
> Does anyone have any suggestions?
> Thank you.
> Julia Hertl
> Section of Epidemiology
> Dept. of Population Medicine and Diagnostic Sciences
> College of Veterinary Medicine
> Cornell University
> Ithaca, NY 14853