home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / bit / listserv / sasl / 5103 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.0 KB

  1. Path: sparky!uunet!paladin.american.edu!auvm!psuvm!drh4
  2. Organization: Penn State University
  3. Date: Thu, 19 Nov 1992 09:14:07 EST
  4. From: Daryl R. Hoffman <DRH4@psuvm.psu.edu>
  5. Message-ID: <92324.091407DRH4@psuvm.psu.edu>
  6. Newsgroups: bit.listserv.sas-l
  7. Subject: Re: Annoying PROC REPORT Behavior
  8. References:  <9211190133.AA08298@snuff.csd.scarolina.edu>
  9. Lines: 56
  10.  
  11. Not sure of your data, but I believe that the problem may be the way the
  12. data is ordered as it comes into the PROC REPORT.  I tried a simple test
  13. with a small amount of data.  The program below used a 'semester year' code
  14. and sorted on that.  Maybe this is the way you could go.
  15.  
  16.  
  17. --------------------------------
  18.  
  19. options pagesize=62 linesize=72;
  20.  
  21. data student;
  22.  
  23. length status $ 9;
  24.  
  25. input idno $ semyear status $ major $;
  26.  
  27. cards; 179580339 4 Senior Cmpsc 129580339 2 Sophomore Cmpsc 139580339 1
  28. Freshman Engl 149580339 4 Senior Cmpsc 159580339 3 Junior Math 169580339 1
  29. Freshman Chem ;
  30.  
  31. run;
  32.  
  33. proc sort data=student; by semyear;
  34.  
  35. run;
  36.  
  37. proc report data=student; columns idno semyear status major;
  38.  
  39. define semyear /display noprint; define status /display order=data across
  40. format=$10.; define idno /display format=$10.; define major /display
  41. format=$7.;
  42.  
  43. run;
  44.  
  45. Output below
  46. --------
  47.  
  48.  
  49. 1                             The SAS System
  50.  
  51.                                    STATUS
  52.    IDNO          Freshman   Sophomore      Junior      Senior  MAJOR
  53.    13958033             1           0           0           0  Engl
  54.    16958033             1           0           0           0  Chem
  55.    12958033             0           1           0           0  Cmpsc
  56.    15958033             0           0           1           0  Math
  57.    17958033             0           0           0           1  Cmpsc
  58.    14958033             0           0           0           1  Cmpsc
  59.  
  60.  
  61. Hope this helps.
  62.  
  63. Daryl R. Hoffman              The Pennsylvania State University
  64. Bitnet:   DRH4@PSUVM.BITNET   The Center for Academic Computing
  65. Internet: DRH4@PSUVM.PSU.EDU  Sr. Appl Prog/Anal, Resource Administration
  66. Office: (814) 865-0845        Fax: (814) 863-7049
  67.