BookmarkSubscribeRSS Feed
Ankur32
Obsidian | Level 7

Hello All'

 

can you please help me to write a macro program in SAS to create the dataset as shown in attached examples.

 

thanks in advance..!!

 

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Read the guidance below the post a question button, and the pop up window (I believe its there now) as to how to post a question to get good answers.  Start by posting test data in the form of a datastep, then show what the output should look like.  Avoid attaching files as these are a security risk and I wouldn't download them.  Clearly show logic between the two.

As I can't see your required output and have no idea on your input dataset I cant say anything other than ask why a macro program is needed?  Write simple Base SAS code first, then if need be macro-tize it, in almost no cases is there a need to use Macro as Base is a fully functional language.

Reeza
Super User

1. This is homework, so at least give it a shot. If you're taking this class I assume you need it at some point so learning it may be worthwhile.

 

2. Post what you've tried and we'll be happy to help you work through it.

 

3. Don't use attachments right now, post it directly into the forum - given the security issues right now, no one should be downloading an xlsx or docx files.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 618 views
  • 0 likes
  • 3 in conversation