LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Oct 2008 20:59:44 -0400
Reply-To:     Cornel Lencar <clencar@INTERCHANGE.UBC.CA>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Cornel Lencar <clencar@INTERCHANGE.UBC.CA>
Subject:      tricky programming problem

I have the following code with PROC TPHREG:

PROC TPHREG DATA=COHORT; CLASS SEX(REF='F') AGE_ACS_CLS(REF=FIRST) QAIPPE(REF=LAST) AVRQ1(REF=FIRST) AVRQ2(REF=FIRST) AVRQ3(REF=FIRST) AVRQ4(REF=FIRST) AVRQ5(REF=FIRST) AVRQ6(REF=FIRST) AVRQ7(REF=FIRST) AVRQ8(REF=FIRST) AVRQ9(REF=FIRST) AVRQ10(REF=FIRST) AVRQ11(REF=FIRST) AVRQ12(REF=FIRST) AVRQ13(REF=FIRST) AVRQ14(REF=FIRST) AVRQ15 (REF=FIRST) AVRQ16(REF=FIRST) AVRQ17(REF=FIRST) AVRQ18(REF=FIRST) AVRQ19(REF=FIRST) AVRQ20(REF=FIRST) AVRQ21 (REF=FIRST) AVRQ22(REF=FIRST) AVRQ23(REF=FIRST) AVRQ24(REF=FIRST) AVRQ25(REF=FIRST) AVRQ26(REF=FIRST) AVRQ27 (REF=FIRST) AVRQ28(REF=FIRST) AVRQ29(REF=FIRST) AVRQ30(REF=FIRST) AVRQ31(REF=FIRST) AVRQ32(REF=FIRST) AVRQ33 (REF=FIRST) AVRQ34(REF=FIRST) AVRQ35(REF=FIRST) AVRQ36(REF=FIRST) AVRQ37(REF=FIRST) AVRQ38(REF=FIRST) AVRQ39 (REF=FIRST) AVRQ40(REF=FIRST) AVRQ41(REF=FIRST) AVRQ42(REF=FIRST) AVRQ43(REF=FIRST) AVRQ44(REF=FIRST) AVRQ45 (REF=FIRST) AVRQ46(REF=FIRST) AVRQ47(REF=FIRST) AVRQ48(REF=FIRST);

MODEL TIME_ACS*ACS2_1999(0) = SEX AGE_ACS_CLS QAIPPE &AVR/ RL; ARRAY AVRQ[48] AVRQ1-AVRQ48; do i=1 to TIME_ACS; %LET AVR=VNAME(AVRQ(I)); END; RUN;

Basically what I am trying to do is to change the macro variable &AVR into AVRQ1 when TIME_ACS=1, into AVRQ2 when TIME_ACS=2 and so on.

Obviously my code is not working. What can I do to make it work, if of course, is possible.

Cheers,

Cornel


Back to: Top of message | Previous page | Main SAS-L page