home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / bit / listserv / sasl / 5105 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.2 KB  |  60 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!COMPUSERVE.COM!76350.1604
  3. Message-ID: <921119144132_76350.1604_EHJ25-1@CompuServe.COM>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Thu, 19 Nov 1992 09:41:33 EST
  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:      Annoying PROC REPORT Behavior
  10. Lines: 48
  11.  
  12. ----------------------------------------------------------------------
  13. CONTENT:   Response
  14. SUMMARY:   Use ORDER=DATA on DEFINE statement
  15. REL/PLTF:  6.07.01/CMS, 6.04/PC-DOS
  16. E-ADDR:    76350.1604@compuserve.com
  17. NAME:      Andy Norton
  18. ADDRESS:   Trilogy Consulting, 5228 Lovers Lane, Kalamazoo MI 49002 USA
  19. PHONE:     (616) 344-2191
  20. ----------------------------------------------------------------------
  21.  
  22.  
  23.  
  24. > I am trying to use PROC REPORT in SAS 6.07 under MVS/XA and things
  25. > are working just fine except for one minor problem.  It seems that
  26. > REPORT alphabetizes the formatted values of an ACROSS variable.  I
  27. > guess in most cases this isn't a problem, but in my case it is.  My
  28. > formats are student classes (e.g. Freshman, Sophomore, Junior,
  29. > Senior, etc.), and these just don't look right alphabetized (e.g.
  30. >  F J Se So).
  31.  
  32. I assume that you have internal values that define the desired sort
  33. order:
  34.    proc format;
  35.      value CLASS
  36.        1 = 'Freshman'
  37.        2 = 'Sophomore'
  38.        3 = 'Junior'
  39.        4 = 'Senior';
  40. Other SAS procedures order values using the INTERNAL value, by
  41. default.
  42.  
  43. PROC REPORT orders ACROSS, GROUP, and ORDER columns using the FORMATTED
  44. value by default.  This was a mistake on the developer's part, who
  45. misrecalled the default behavior.
  46.  
  47. Page 272, SAS Technical Report P-222, "Changes and Enhancements to Base
  48. SAS Software, Release 6.07", describes the ORDER= option of the DEFINE
  49. statement:
  50.   ORDER = DATA | FORMATTED | FREQ | INTERNAL
  51.  
  52. This option was not documented in the PROC REPORT manual, but I think
  53. it also worked in 6.06.  So simply say:
  54.   DEFINE CLASS / ACROSS ORDER=INTERNAL;
  55. Note that you can use both the ORDER usage specification and ORDER
  56. option (it looks funny, but makes sense to SAS):
  57.   DEFINE CLASS /ORDER ORDER=INTERNAL;
  58.  
  59. Andy
  60.