BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ari2495
Obsidian | Level 7
DATA name_&AAMM..nom;
 SET input;
where var=1; RUN;

Hi, this code above does not work. I suspect the problem is with the & somewhere. Can you help?

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

Saying "it does not work" is not enough information to help.  Do you get error messages in the log?  Can you post the full log from running this step? 

 

The & indicates that there is a macro variable named AAMM which is expected to exist.  So to understand this code, you would need to know the value of that macro variable, and how the value is assigned.  If you turn on the system option SYMBOLGEN:

options symbolgen ;

before running the step, the log will show the value the macro variable, which will help in debugging.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

View solution in original post

1 REPLY 1
Quentin
Super User

Saying "it does not work" is not enough information to help.  Do you get error messages in the log?  Can you post the full log from running this step? 

 

The & indicates that there is a macro variable named AAMM which is expected to exist.  So to understand this code, you would need to know the value of that macro variable, and how the value is assigned.  If you turn on the system option SYMBOLGEN:

options symbolgen ;

before running the step, the log will show the value the macro variable, which will help in debugging.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 414 views
  • 0 likes
  • 2 in conversation