home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / bit / listserv / sasl / 3480 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.9 KB  |  48 lines

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