home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!auvm!psuvm!drh4
- Organization: Penn State University
- Date: Thu, 19 Nov 1992 09:14:07 EST
- From: Daryl R. Hoffman <DRH4@psuvm.psu.edu>
- Message-ID: <92324.091407DRH4@psuvm.psu.edu>
- Newsgroups: bit.listserv.sas-l
- Subject: Re: Annoying PROC REPORT Behavior
- References: <9211190133.AA08298@snuff.csd.scarolina.edu>
- Lines: 56
-
- Not sure of your data, but I believe that the problem may be the way the
- data is ordered as it comes into the PROC REPORT. I tried a simple test
- with a small amount of data. The program below used a 'semester year' code
- and sorted on that. Maybe this is the way you could go.
-
-
- --------------------------------
-
- options pagesize=62 linesize=72;
-
- data student;
-
- length status $ 9;
-
- input idno $ semyear status $ major $;
-
- cards; 179580339 4 Senior Cmpsc 129580339 2 Sophomore Cmpsc 139580339 1
- Freshman Engl 149580339 4 Senior Cmpsc 159580339 3 Junior Math 169580339 1
- Freshman Chem ;
-
- run;
-
- proc sort data=student; by semyear;
-
- run;
-
- proc report data=student; columns idno semyear status major;
-
- define semyear /display noprint; define status /display order=data across
- format=$10.; define idno /display format=$10.; define major /display
- format=$7.;
-
- run;
-
- Output below
- --------
-
-
- 1 The SAS System
-
- STATUS
- IDNO Freshman Sophomore Junior Senior MAJOR
- 13958033 1 0 0 0 Engl
- 16958033 1 0 0 0 Chem
- 12958033 0 1 0 0 Cmpsc
- 15958033 0 0 1 0 Math
- 17958033 0 0 0 1 Cmpsc
- 14958033 0 0 0 1 Cmpsc
-
-
- Hope this helps.
-
- Daryl R. Hoffman The Pennsylvania State University
- Bitnet: DRH4@PSUVM.BITNET The Center for Academic Computing
- Internet: DRH4@PSUVM.PSU.EDU Sr. Appl Prog/Anal, Resource Administration
- Office: (814) 865-0845 Fax: (814) 863-7049
-