I was just recently exposed to %NRSTR, so I am not familiar enough to answer my own question. I used to have a macro that would ask for two stratification labels (STRATLAB1 and STRATLAB2) as well as a group label (GROUPLAB). My tratification labels used to be FR(++) and FR(+) with a group label being "FR(++) vs. FR(+)". Our company has now changed the naming convention to be FR(100%) in place of FR(++) and FR(10-90%) in place of FR(+). My macro call used to look like this (This is very simplified. My actual macro actually receives up to 25 parameters.): %efficacyreport(stratlab1=%str(FR(++)), stratlab2=%str(FR(+)), grouplab1=%nrstr(FR(++) vs. FR(+))); Now, I am trying to run it like this, which is giving me errors: %efficacyreport(stratlab1=%nrstr(FR(100%)), stratlab2=%nrstr(FR(10-90%)), grouplab1=%nrstr(FR(100%) vs. FR(10-90%))); Can someone tell me if I have a syntax error? I assume it is the % within the %NRSTR that is causing the problem becuase when I call the macro, the SAS log will not do anything (no errors, no warnings, no notes), and I cannot run other code. If I run ); four times, then it spits out errors: ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT. The code inside the macro that is causing this macro looks like this (nothing wrong syntactically): data efficacy; set &efficacydata.; strata=&strata.; survtime=&survtime.; censorflag=&censorflag.; run; where &efficacydata, &strata, &survtime, and &censorflag are input parameters with the macro. The error message has the semi-colons underlined with a 22, and then gives me the ERROR 22-322 message. I am sure that is has something to do with my % signs within the %NRSTR function. This is why I have to submit ); four times to close the macro call. Any thoughts?
... View more