home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / bit / listserv / sasl / 4143 < prev    next >
Encoding:
Text File  |  1992-09-10  |  2.4 KB  |  66 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!LOBBY.TI.COM!RSNYDER
  3. X-Mailer: ELM [version 2.2 PL16]
  4. Message-ID: <9209110001.AA10963@ti.com>
  5. Newsgroups: bit.listserv.sas-l
  6. Date:         Thu, 10 Sep 1992 19:01:17 CDT
  7. Reply-To:     "R. Snyder" <rsnyder@LOBBY.TI.COM>
  8. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  9. From:         "R. Snyder" <rsnyder@LOBBY.TI.COM>
  10. Subject:      Re: Creating a loooooong macro variable
  11. Comments: To: STROTHHM%SNYONEVA.BITNET@uga.cc.uga.edu
  12. Comments: cc: sas-l@uga.cc.uga.edu
  13. In-Reply-To:  <9209102255.AA08460@ti.com>; from "Helen Strother" at Sep 10,
  14.               92 6:57 pm
  15. Lines: 49
  16.  
  17. SUBJECT:   Reply to Creating lo...ng macro variables
  18. SUMMARY:   Concatenating macro variables in a data set
  19. REL/PLTF:  6.07/HP300
  20. E-ADDR:    rsnyder@lobby.ti.com
  21. NAME:      Bob Snyder
  22. COMPANY:   Texas Instruments, Sherman, TX
  23. PHONE:     (903) 868-5799
  24. FAX:       (903) 868-7240
  25. >
  26. > Hi all,
  27. >         I am running SAS 6.07 under VMS.  I have a data set which contains two
  28. > variables which is related to a dataset containing responses to a political
  29. > questionnaire.  The first data set looks like the following:
  30. >
  31. > VAR             POSANS
  32. > 0001            001002003004005
  33. > 0002            001002003004005006007009
  34. >
  35. > VAR is the name of the variable in the questionnaire and POSANS are all the
  36. > possible answers to that variable.  I won't go into why I need to do this, but
  37. > I have a macro which generates all the possible combinations of answers to any
  38. > two to five variables.  Everything was working fine until I discovered that
  39.  the
  40. > 200 length for character variables is too short to hold all the possible
  41. > answers to some of the variables.  I create a macro variable to hold the
  42.  values
  43. > What I was wondering is if some of the variables took up two or three
  44. > observations in the data set like:
  45. >
  46. > 0001            001002003004005006......
  47. > 0001            201202203204205.....
  48. >
  49. > could I still get all the possible answers from the two observations into the
  50. > same macro variable?  Any ideas?  By the way, if you're sick of reading my
  51. > macro questions, I am currently begging my boss to send me to the SAS macro
  52. > class.  In the meantime, I only have SAS-L.
  53. >
  54. > As always, thanks in advance.
  55. >
  56. >                 Helen Strother  STROTHHM@SNYONEVA
  57. >
  58. Helen,
  59.  
  60. Try something like this, although inelegant, I think it will work.
  61.  
  62.   call symput( 'mvar', symget( 'mvar' )||cvar );
  63.  
  64. Regards,
  65. Bob
  66.