home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!darwin.sura.net!paladin.american.edu!auvm!COMPUSERVE.COM!76350.1604
- Message-ID: <920729213233_76350.1604_EHJ52-2@CompuServe.COM>
- Newsgroups: bit.listserv.sas-l
- Date: Wed, 29 Jul 1992 17:32:34 EDT
- Reply-To: Andy Norton <76350.1604@COMPUSERVE.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Andy Norton <76350.1604@COMPUSERVE.COM>
- Subject: Comma delimited output file from SAS on MVS/ESA
- Comments: To: SAS-L <SAS-L@AWIIMC12.IMC.UNIVIE.AC.AT>
- Lines: 35
-
- ----------------------------------------------------------------------
- CONTENT: Response
- SUMMARY: Response to Pauline Sing
- Using grouped format lists with literals;
- using variable lists _NUMERIC_ and _CHARACTER_
- REL/PLTF: 6.07.01/CMS, 6.04/PC-DOS
- E-ADDR: 76350.1604@compuserve.com
- NAME: Andy Norton
- ADDRESS: Trilogy Consulting, 5822 Lovers Lane, Kalamazoo MI 49002
- PHONE: (616) 344-2191
- ----------------------------------------------------------------------
- Pauline Sing (DC.SYSD10@TS3.TEALE.CA.GOV) writes
-
- > I am trying to create a comma delimited flat file from SAS on an MVS
- > machine. I know that I could put a ',' between each variable but I
- > have 600 variables in 27 tables. I was wondering whether there is a
- > shortcut? Any suggestions would be greatly appreciated.
-
- Try the following technique:
- data _null_;
- set;
- put (_NUMERIC_ ) (best12. ',')
- (_CHARACTER_) (',' $12.);
- run;
-
- See page 464 of the Version 6 Language Reference regarding "format
- groups". Any unneeded specifications are disregarded; i.e. there is
- only one comma between numeric and character because the numeric
- section stops as soon as the last numeric value is printed.
-
- _NUMERIC_ and _CHARACTER_ are automatic variables lists referring to
- all variables of the specified type.
-
- P.S. it appears that including literals in format lists is illegal in
- 6.04.
-