home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!DMRHRZ11.BITNET!SCHICK
- Message-ID: <SAS-L%92081414131775@AWIIMC12.IMC.UNIVIE.AC.AT>
- Newsgroups: bit.listserv.sas-l
- Date: Fri, 14 Aug 1992 10:15:39 CET
- Reply-To: Arnold Schick <SCHICK@DMRHRZ11.BITNET>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Arnold Schick <SCHICK@DMRHRZ11.BITNET>
- Subject: Re: Convert and merge
- Comments: To: HOGE@CUA.BITNET
- In-Reply-To: Your message of Thu, 13 Aug 1992 12:27:00 EDT
- Lines: 78
-
- On Thu, 13 Aug 1992 12:27:00 EDT Fenggang Yang <HOGE@CUA.BITNET> wrote:
- >
- >Hello, Everyone,
- >
- >I'm new to this list, and very new in SAS.
- >
-
- All beginners are welcome ! And at a time has begun everyone.
-
- >1. I need to read a portable sas data file and save it to a SAS DATA FILE.
- > This is a huge file. I actually need 1/4 of the variables only.
- > How can I save this subset of data file in this step?
- >
-
- With the WHERE clause within a SAS datastep read SAS only those values
- into that variables, which are named in this statement.
-
- i.e. filename file_in 'see operation.dependent:filename\convention';
- data one;
- where v_nam_01 v_nam_03 v_nam_09-v_nam29 v_nam34-v_nam43 ;
- infile file_in;
- input v_nam_01-v_nam99 ;
- run;
-
- SAS statements are described in SAS Language Guide, complete examples in
- Application Guide and some also in the RtFM (Readable Friendly Manuals)
- of the SAS language.
-
- >2. I need to convert CHARACTER variables into NUMERICAL variables while
- > re-code every value of '-' or '&' into missing. In SPSS, the command
- > is RECODE VARA (CONVERT) '-'=99 '&'=99 INTO VARB
- > Is there an equavalent command in SAS?
- >
-
- You are in luck, just at this time a SAS user asked the same.
- Bob Snyder answered yesterday, and the SAS user summarized to the
- list SAS-L.
-
- >3. I have another data set in SPSS system format. I need to 'merge'
- > or 'match' this file with the subset of the SAS DATA FILE. The
- > matching variable is IDC. How do I do this?
- >
-
- A sort of data by a variable can be done through procedure SORT. A system
- file from SPSS is to convert in ASCII format within from SPSS (formated
- output) and to read in SAS as shown above, where a SPSS system file can
- also be read on some platforms (e.g. CMS) from SAS.
- The sort is to do as shown here in ascending order of collating sequence
- from the smallest to largest character value:
-
- i.e. proc sort data=one out=result;
- by IDC;
- run;
-
- and the procedure PRINT can print it, but how ? Take a look at procedure
- description of procedure PRINT in the SAS Procedure Guide (description
- order of procedures is alphabetically, as a dictionary).
-
- >Some simple examples would be very helpful.
- >
- >
- >I'm scared and confused by the volumes of manuals of SAS. I tried many
- >times to figure out the ways to solve my problems, but the explanation
- >and examples are so difficult to be understood. Why don't the SAS
- >people write simple manuals like the SPSS people do? Many people
- >told me that SAS gives better statistical outputs. I guess I have
- >to learn this no matter how painful it will be.
- >
-
- All beginnings are painful.
-
- >Thank you for any help.
- >
- >Fenggang Yang
-
- Hope, I helped a bit.
-
- Arnold Schick University of Marburg/Germany
-