home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!LOBBY.TI.COM!RSNYDER
- X-Mailer: ELM [version 2.2 PL16]
- Message-ID: <9209110001.AA10963@ti.com>
- Newsgroups: bit.listserv.sas-l
- Date: Thu, 10 Sep 1992 19:01:17 CDT
- Reply-To: "R. Snyder" <rsnyder@LOBBY.TI.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: "R. Snyder" <rsnyder@LOBBY.TI.COM>
- Subject: Re: Creating a loooooong macro variable
- Comments: To: STROTHHM%SNYONEVA.BITNET@uga.cc.uga.edu
- Comments: cc: sas-l@uga.cc.uga.edu
- In-Reply-To: <9209102255.AA08460@ti.com>; from "Helen Strother" at Sep 10,
- 92 6:57 pm
- Lines: 49
-
- SUBJECT: Reply to Creating lo...ng macro variables
- SUMMARY: Concatenating macro variables in a data set
- REL/PLTF: 6.07/HP300
- E-ADDR: rsnyder@lobby.ti.com
- NAME: Bob Snyder
- COMPANY: Texas Instruments, Sherman, TX
- PHONE: (903) 868-5799
- FAX: (903) 868-7240
- >
- > Hi all,
- > I am running SAS 6.07 under VMS. I have a data set which contains two
- > variables which is related to a dataset containing responses to a political
- > questionnaire. The first data set looks like the following:
- >
- > VAR POSANS
- > 0001 001002003004005
- > 0002 001002003004005006007009
- >
- > VAR is the name of the variable in the questionnaire and POSANS are all the
- > possible answers to that variable. I won't go into why I need to do this, but
- > I have a macro which generates all the possible combinations of answers to any
- > two to five variables. Everything was working fine until I discovered that
- the
- > 200 length for character variables is too short to hold all the possible
- > answers to some of the variables. I create a macro variable to hold the
- values
- > What I was wondering is if some of the variables took up two or three
- > observations in the data set like:
- >
- > 0001 001002003004005006......
- > 0001 201202203204205.....
- >
- > could I still get all the possible answers from the two observations into the
- > same macro variable? Any ideas? By the way, if you're sick of reading my
- > macro questions, I am currently begging my boss to send me to the SAS macro
- > class. In the meantime, I only have SAS-L.
- >
- > As always, thanks in advance.
- >
- > Helen Strother STROTHHM@SNYONEVA
- >
- Helen,
-
- Try something like this, although inelegant, I think it will work.
-
- call symput( 'mvar', symget( 'mvar' )||cvar );
-
- Regards,
- Bob
-