home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!news.encore.com!csar!foxtail!sdd.hp.com!zaphod.mps.ohio-state.edu!darwin.sura.net!europa.asd.contel.com!paladin.american.edu!auvm!AMAIL.AMDAHL.COM!REILING.LEE
- Message-ID: <m0mmtDz-0000brC@juts.ccc.amdahl.com>
- Newsgroups: bit.listserv.sas-l
- Date: Wed, 4 Nov 1992 14:17:00 PT
- Reply-To: reiling.lee@AMAIL.AMDAHL.COM
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: reiling.lee@AMAIL.AMDAHL.COM
- Subject: Data Reshaping ?
- Comments: To: ny922195%pacevm.bitnet@juts.ccc.amdahl.com
- Comments: cc: sas-l%ohstvma.acs.ohio-state.edu@juts.ccc.amdahl.com
- Lines: 30
-
- quick answer for you... GOOD LUCK!
-
-
- data data1;
- infile cards;
- input depno dept $ yr v1-v5;
- array v_ v1-v5;
- do over v_;
- v = v_;
- output;
- end;
- keep depno dept yr v;
- cards;
- 121 MIS 80 10 11 12 13 14
- 121 MIS 81 15 16 17 18 19
- 121 MIS 82 20 21 22 23 24
- 144 COMM 80 41 42 43 44 45
- 144 COMM 81 46 47 48 49 50
- 144 COMM 82 51 52 53 54 55
- run;
-
- proc print;
-
- proc transpose data=data1 prefix=v;
- by depno dept;
- var v;
- run;
-
- proc print;
- run;
-