home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!ukma!psuvax1!psuvm!cunyvm!edscc
- Organization: City University of New York/ University Computer Center
- Date: Wednesday, 22 Jul 1992 11:38:22 EDT
- From: <EDSCC@CUNYVM.BITNET>
- Message-ID: <92204.113822EDSCC@CUNYVM.BITNET>
- Newsgroups: bit.listserv.sas-l
- Subject: multiple identical id vars problem
- Lines: 33
-
- Hi,
- I'm an SPSSPC+ user who is learning to use SAS PC/DOS because I've
- been convinced SAS handles data better than SPSS.
- I'd like some help with what I'm told is an "easy" problem for SAS.
- I work with raw data files that have multiple observations of the
- identical id variable with different variables for each observation.
- An example of my raw data file follows:
-
- ID CODE TERM DATE
-
- (Where TERM = YYM and DATE = YYMMDD.)
-
- 002162706 292 901 900309
- 002162706 292 901 900403
- 002254401 299 891 890201
- 002254401 299 901 900303
- 002254401 276 901 900405
-
- I need to write a program that finds each identical id variable. When
- an identical id variable is encountered, I want to add only the variables
- associated with it to the first observation. I want to have a new file
- with one observation for each unique id variable. An example
- of what I'd like to have follows:
-
- ID CODE TERM DATE CODE2 TERM2 DATE2 CODE3 TERM3 DATE3
-
- 002162706 292 901 900309 299 901 900403
- 002254401 299 891 890201 299 901 900303 299 901 900405
-
- Can this be done? If it can, how?
-
- Thanks, in advance, for any help,
- Ed Silverman
-