BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8
In my code there are some if then else statement resulting in sas_output=0 or sas_output =1, could sas_output be just a random variable or it has specific meaning?
2 REPLIES 2
Quentin
Super User

SAS_OUTPUT is a user-created variable, so it has no meaning in the SAS language.  To understand the meaning, you'll have to review the rest of the program(s) and see how it is used.

 

Since it's a 0/1 variable, it's likely that 0 means no and 1 means yes.  And from the name, perhaps it's an on/off switch for the program to switch the generation of output reports (or output datasets) on or off.  

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
SASKiwi
PROC Star

This question is a good reminder to not create variable names that look like they might be system variables to avoid confusion. I have a personal convention of using a suffix of Ind(icator) or Flag for binary or yes/no variables. In this case that would mean variable names of Output_Ind or Output_Flag. I also highly recommend using mixed case as that indicates word boundaries and enhances meaning.

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
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
  • 1262 views
  • 0 likes
  • 3 in conversation