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 (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.
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.

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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