BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Can anyone tell me
what is flag, where it is used and how it is used
thanks
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
This question is probably not an ODS or Base Reporting procedure (PRINT, REPORT, TABULATE) question.

Generally, speaking, a column or field called "FLAG" is meant to signal some condition. Usually in a program. Imagine that I use the file SASHELP.CLASS and I want to answer some question (do any names start with 'A'). I might have this:
[pre]
data countA;
set sashelp.class;
if substr(name,1,1) = 'A' then flag = 'y';
run;

proc print data=countA;
where flag = 'y';
run;
[/pre]

Of course this is a silly example, because there are other ways to print a list of students whose names start with 'A'. But the point is that the use of FLAG as a variable or field is specific to the kind of program that FLAG appears in. There is an instance, where an SQL procedure view will create a column called "FLAGS" -- (and a few other places) as described here:
http://support.sas.com/kb/19/578.html
http://support.sas.com/kb/5/346.html
But you did not say this question was related to SQL or PROC CONTENTS.

Your best bet for help with this question is to contact SAS Technical Support. To send a question to Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 1020 views
  • 0 likes
  • 2 in conversation