ODS Proc Report Macro Variables

Accepted Solution Solved
Reply
Regular Contributor
Posts: 222
Accepted Solution

ODS Proc Report Macro Variables


Hi.....I was wondering if it is possible to include or reference a macro variable when using ods tagsets.excelXP since the variable year_month1 will change from month to month. I have included part of the code below and hope this helps in explain what I am referring to....thanks in advance.

proc report data=EDS_REQUESTS nowd

     style(header)={background=grey font_face=Arial

           font_size=10pt borderwidth=1px bordercolor=black just=center}

     style(column)={background=white font_face=Arial font_size=8pt borderwidth=1px

           bordercolor=black just=center};

column LOAD_DATE OPERATOR_ID EDS_Requests_by_PHIN_&year_month1;

     define LOAD_DATE / display 'Load Date';

     define OPERATOR_ID / display 'Operator ID';

     define EDS_Requests_by_PHIN_&year_month1 / display 'EDS Requests by PHIN &year_month1';


Accepted Solutions
Solution
‎01-14-2014 10:58 AM
Super User
Posts: 17,887

Re: ODS Proc Report Macro Variables

You need double quotes versus single quotes for your macro variable to resolve.

View solution in original post


All Replies
Solution
‎01-14-2014 10:58 AM
Super User
Posts: 17,887

Re: ODS Proc Report Macro Variables

You need double quotes versus single quotes for your macro variable to resolve.

Super User
Posts: 10,526

Re: ODS Proc Report Macro Variables

And likely need a period after the &year refereence, otherwise the macro resolver is looking for a variable named &year_month1.

Use: EDS_Requests_by_PHIN_&year._month1 assuming you are using a macro variable Year not Year_month1.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 210 views
  • 3 likes
  • 3 in conversation