BookmarkSubscribeRSS Feed
turcay
Lapis Lazuli | Level 10

@Cynthia_sas,

 

Thank you very much. My real purpose was prevent this situation by using macro variables but as you said, it doesn't seem possible.

 

Thank you,

 

 

Cynthia_sas
Diamond | Level 26
Hi:
I didn't say it wasn't possible. I said you had to have working code for ALL possible types of HAVE files that you need to create. Without working code for ALL possible combinations, you do not know what macro variables or macro conditional logic to code. Given that amount of work, that is why Reeza and others have suggested that you use PROC SQL or some other process to get the data for your report structured the way you want and then use a much simpler PROC REPORT. Probably putting the work in to generate all the possible different combinations of PROC REPORT for ALL your HAVE file scenarios is ultimately the way to go but what if down the road you end up with HAVE6, HAVE7 and HAVE8, 3 new scenarios you didn't previously envision? You'll have to decide which approach is the best approach for the long term.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 16 replies
  • 3166 views
  • 3 likes
  • 4 in conversation