home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!uvaarpa!darwin.sura.net!paladin.american.edu!auvm!SMUVM1.BITNET!UDCW
- Organization: Southern Methodist University
- Message-ID: <SAS-L%93012614335938@UGA.CC.UGA.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Tue, 26 Jan 1993 13:32:18 CST
- Reply-To: UDCW@SMUVM1.BITNET
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: UDCW@SMUVM1.BITNET
- Subject: COMMA DELIMITED ASCII FILES (the solution)
- Lines: 36
-
- Several people have helped me find a solution to my earlier posting.
- I would like to thank each of them; they are:
-
- Howard Schreier, Derek Morgan, Joe St Sauver, and Kernon Gibes
-
- Here is my earlier post:
-
- > I have an ASCII file that is delimited by commas and quotation marks(").
- > Numeric and character variables are both separated by commas except
- > when a character variable contains commas then the entire text string
- > is enclosed in quotation marks. For example,
- >
- > 12,54,67,"Welch,David",34,3,the big dog
- >
- > Is there an easy way to read a file like this in SAS? There are an
- > equal number of variables on each record and all variables are
- > ordered, but they are not fixed width.
- >
-
- The following program reads the file:
-
-
- filename data 'comma data a';
-
- data one;
- INFILE data DSD;
- INPUT A B C D & $char30. E F G & $char30.;
-
- Thanks again for the help. BTW, this option (DSD) is documented in
- Tech Report P-222 page 30 and is for version 6.07.
-
- Sincerely,
- David Welch
- Senior Systems Analyst
- Southern Methodist University UDCW @ vm.cis.smu.edu
- (214) 692-2036 dwelch @ sun.cis.smu.edu
-