BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
arodriguez
Lapis Lazuli | Level 10

Hi everyone,

I'm trying to do some autovalidation of macros. My problem is that there are macros that export the result

in the SAS OUTPUT.

How can I read  the SAS OUTPUT to check if it works?

Thanks for the help,

Antonio

1 ACCEPTED SOLUTION

Accepted Solutions
arodriguez
Lapis Lazuli | Level 10

Ok, I gonna redirect the output with proc printto to later import to a dataset of the information, and doing this, then I can use the proc compare to ensure

that the outputis like I want.

View solution in original post

4 REPLIES 4
LinusH
Tourmaline | Level 20

Why do you want to validate macros, and how?

Please describe your requirement in more detail.

Data never sleeps
arodriguez
Lapis Lazuli | Level 10

To validate macros that have an output, I have a kind of template with the expected output, then I use

the proc compare to ensure that the output is correct. But I have a few macros that have output in SAS

Output, and I don't know how acced to the output to know if it have the correct format automatable way.

LinusH
Tourmaline | Level 20

Still don't get the overall picture for this, are you testing the source data that is used to produce the results by the macro, or the macro itself?

If the later, it usually is sufficient to to this in manual manner.

Not knowing anything about the macros them self, on way is to test if you could redirect the output to data set using ODS.

Or, you could develop a subroutine (macro), that handles macro output in a centralized way...?

Data never sleeps
arodriguez
Lapis Lazuli | Level 10

Ok, I gonna redirect the output with proc printto to later import to a dataset of the information, and doing this, then I can use the proc compare to ensure

that the outputis like I want.

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