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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

624


I have a dataset concat having variable a b & c. How to rename a b to e & f?

580


How do you use the do loop if you don’t know how many times you should execute the do loop?

751


how many types of prompts are there? : Sas-bi

549


What is the command used to find missing values?

590






it will become easy if uuu provide website linkssss and list of consultanciessssss

1526


For what purposes have you used sas macros? : sas-macro

537


Explain the purpose of retain statement.

601


Differentiate between format and informat? : sas-grid-administration

577


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

1660


What do the PUT and INPUT functions do?

773


Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com

1577


what are validation tools that are used in sas? : Sas-administrator

591


Explain the use of proc print and proc contents?

556


Can you explain the process of calendar?

640