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.  

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: 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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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

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
  • 193 views
  • 0 likes
  • 3 in conversation