What is LOGICAL VARIABLES in SAS.And how it can be used..Can
anyone support..???

Answers were Sorted based on User's Feedback



What is LOGICAL VARIABLES in SAS.And how it can be used..Can anyone support..???..

Answer / sangeeta

Fitst. and Last. varibles used in data step are called
Logical Variables.

Is This Answer Correct ?    26 Yes 3 No

What is LOGICAL VARIABLES in SAS.And how it can be used..Can anyone support..???..

Answer / nagaraju

Fitst. and Last. varibles are logical variables and returns
1 & 0 values.
These are mailnly used to give the first and last
occurances from the table.

ex: employee table having (1-100 employees) -- uses

if we give first.empid=1 then it gives only first employee
details
if we give first.empid=0 then it gives remaining employee
details except first one

in the same way

if we give last.empid=1 then it gives last employee details
if we give last.empid=0 then it gives remaining employee
details except last one
hope this is clear

Is This Answer Correct ?    22 Yes 3 No

What is LOGICAL VARIABLES in SAS.And how it can be used..Can anyone support..???..

Answer / xxx

Yes I agree with the above answers,
first.obs and last.obs are also specifies the occurrence of the data. If we mention like
first.obs=1 and last.obs=1;
it will eliminate the duplicates also.

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More SAS Interview Questions

what is the effect of the options statement errors=1? : Sas programming

0 Answers  


What is run-group processing?

0 Answers  


wat has been most common programming mistake?

3 Answers  


How you can read the variables that you need?

0 Answers  


What does a PROC TRANSPOSE do?

8 Answers   Accenture,






What is difference between N and n????

2 Answers   Sciformix,


how does sas handle missing values in a merge? : Sas programming

0 Answers  


Did you used proc lifetest? when?

2 Answers   Accenture, Parexel, Quintiles,


How we will Developing new reports Using Data step programming and Macros ?

4 Answers  


How do you test for missing values?

0 Answers   Quintiles,


Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT SAS Training in Data Management at InfoSchool Bangalore

1 Answers  


How do you add a prefix to some or all variables in a dataset using a SAS macro?

2 Answers  


Categories