BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ilearnsas
Obsidian | Level 7

 

Hi, I am trying to call a sas macro within the excel sheet name using proc import. I tried below. But &yr is not resolving. Please help. Thanks! 

 

%let yr=%sysfunc(intnx(day,%sysfunc(today()),0,B),year.);
%put &yr;

 


proc import datafile=innfile out=data
dbms=xls replace;
sheet="1PMMS&yr.";
getnames=no;
datarow=8;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Please re-run the code with the following as the first line

 

options mprint symbolgen mlogic;

 

Show us the SAS log for this step, both the code and any ERROR messages. Please click on the {i} icon and paste the log into this window that appears ... do not skip this step.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Please re-run the code with the following as the first line

 

options mprint symbolgen mlogic;

 

Show us the SAS log for this step, both the code and any ERROR messages. Please click on the {i} icon and paste the log into this window that appears ... do not skip this step.

--
Paige Miller
ilearnsas
Obsidian | Level 7

I re ran the same with options statement and it worked just fine. Not sure what the issue was. Thank you! Appreciate it. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 830 views
  • 1 like
  • 2 in conversation