home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / bit / listserv / sasl / 3722 < prev    next >
Encoding:
Text File  |  1992-08-14  |  3.3 KB  |  92 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!DMRHRZ11.BITNET!SCHICK
  3. Message-ID: <SAS-L%92081414131775@AWIIMC12.IMC.UNIVIE.AC.AT>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Fri, 14 Aug 1992 10:15:39 CET
  6. Reply-To:     Arnold Schick <SCHICK@DMRHRZ11.BITNET>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         Arnold Schick <SCHICK@DMRHRZ11.BITNET>
  9. Subject:      Re: Convert and merge
  10. Comments: To: HOGE@CUA.BITNET
  11. In-Reply-To:  Your message of Thu, 13 Aug 1992 12:27:00 EDT
  12. Lines: 78
  13.  
  14. On Thu, 13 Aug 1992 12:27:00 EDT Fenggang Yang <HOGE@CUA.BITNET> wrote:
  15. >
  16. >Hello, Everyone,
  17. >
  18. >I'm new to this list, and very new in SAS.
  19. >
  20.  
  21. All beginners are welcome ! And at a time has begun everyone.
  22.  
  23. >1. I need to read a portable sas data file and save it to a SAS DATA FILE.
  24. >   This is a huge file.  I actually need 1/4 of the variables only.
  25. >   How can I save this subset of data file in this step?
  26. >
  27.  
  28. With the WHERE clause within a SAS datastep read SAS only those values
  29. into that variables, which are named in this statement.
  30.  
  31. i.e.         filename file_in 'see operation.dependent:filename\convention';
  32.              data one;
  33.                where v_nam_01 v_nam_03 v_nam_09-v_nam29 v_nam34-v_nam43 ;
  34.                infile file_in;
  35.                input v_nam_01-v_nam99 ;
  36.              run;
  37.  
  38. SAS statements are described in SAS Language Guide, complete examples in
  39. Application Guide and some also in the RtFM (Readable Friendly Manuals)
  40. of the SAS language.
  41.  
  42. >2. I need to convert CHARACTER variables into NUMERICAL variables while
  43. >   re-code every value of '-' or '&' into missing.  In SPSS, the command
  44. >   is    RECODE VARA (CONVERT) '-'=99 '&'=99 INTO VARB
  45. >   Is there an equavalent command in SAS?
  46. >
  47.  
  48. You are in luck, just at this time a SAS user asked the same.
  49. Bob Snyder answered yesterday, and the SAS user summarized to the
  50. list SAS-L.
  51.  
  52. >3. I have another data set in SPSS system format.  I need to 'merge'
  53. >   or 'match' this file with the subset of the SAS DATA FILE.  The
  54. >   matching variable is IDC.  How do I do this?
  55. >
  56.  
  57. A sort of data by a variable can be done through procedure SORT. A system
  58. file from SPSS is to convert in ASCII format within from SPSS (formated
  59. output) and to read in SAS as shown above, where a SPSS system file can
  60. also be read on some platforms (e.g. CMS) from SAS.
  61. The sort is to do as shown here in ascending order of collating sequence
  62. from the smallest to largest character value:
  63.  
  64. i.e.           proc sort data=one out=result;
  65.                  by IDC;
  66.                run;
  67.  
  68. and the procedure PRINT can print it, but how ? Take a look at procedure
  69. description of procedure PRINT in the SAS Procedure Guide (description
  70. order of procedures is alphabetically, as a dictionary).
  71.  
  72. >Some simple examples would be very helpful.
  73. >
  74. >
  75. >I'm scared and confused by the volumes of manuals of SAS.  I tried many
  76. >times to figure out the ways to solve my problems, but the explanation
  77. >and examples are so difficult to be understood.  Why don't the SAS
  78. >people write simple manuals like the SPSS people do?  Many people
  79. >told me that SAS gives better statistical outputs.  I guess I have
  80. >to learn this no matter how painful it will be.
  81. >
  82.  
  83. All beginnings are painful.
  84.  
  85. >Thank you for any help.
  86. >
  87. >Fenggang Yang
  88.  
  89. Hope, I helped a bit.
  90.  
  91. Arnold Schick  University of Marburg/Germany
  92.