home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!COMPUSERVE.COM!76350.1604
- Message-ID: <921119144132_76350.1604_EHJ25-1@CompuServe.COM>
- Newsgroups: bit.listserv.sas-l
- Date: Thu, 19 Nov 1992 09:41:33 EST
- Reply-To: Andy Norton <76350.1604@COMPUSERVE.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Andy Norton <76350.1604@COMPUSERVE.COM>
- Subject: Annoying PROC REPORT Behavior
- Lines: 48
-
- ----------------------------------------------------------------------
- CONTENT: Response
- SUMMARY: Use ORDER=DATA on DEFINE statement
- REL/PLTF: 6.07.01/CMS, 6.04/PC-DOS
- E-ADDR: 76350.1604@compuserve.com
- NAME: Andy Norton
- ADDRESS: Trilogy Consulting, 5228 Lovers Lane, Kalamazoo MI 49002 USA
- PHONE: (616) 344-2191
- ----------------------------------------------------------------------
-
-
-
- > I am trying to use PROC REPORT in SAS 6.07 under MVS/XA and things
- > are working just fine except for one minor problem. It seems that
- > REPORT alphabetizes the formatted values of an ACROSS variable. I
- > guess in most cases this isn't a problem, but in my case it is. My
- > formats are student classes (e.g. Freshman, Sophomore, Junior,
- > Senior, etc.), and these just don't look right alphabetized (e.g.
- > F J Se So).
-
- I assume that you have internal values that define the desired sort
- order:
- proc format;
- value CLASS
- 1 = 'Freshman'
- 2 = 'Sophomore'
- 3 = 'Junior'
- 4 = 'Senior';
- Other SAS procedures order values using the INTERNAL value, by
- default.
-
- PROC REPORT orders ACROSS, GROUP, and ORDER columns using the FORMATTED
- value by default. This was a mistake on the developer's part, who
- misrecalled the default behavior.
-
- Page 272, SAS Technical Report P-222, "Changes and Enhancements to Base
- SAS Software, Release 6.07", describes the ORDER= option of the DEFINE
- statement:
- ORDER = DATA | FORMATTED | FREQ | INTERNAL
-
- This option was not documented in the PROC REPORT manual, but I think
- it also worked in 6.06. So simply say:
- DEFINE CLASS / ACROSS ORDER=INTERNAL;
- Note that you can use both the ORDER usage specification and ORDER
- option (it looks funny, but makes sense to SAS):
- DEFINE CLASS /ORDER ORDER=INTERNAL;
-
- Andy
-