What is LOGICAL VARIABLES in SAS.And how it can be used..Can
anyone support..???
Answers were Sorted based on User's Feedback
Answer / sangeeta
Fitst. and Last. varibles used in data step are called
Logical Variables.
Is This Answer Correct ? | 26 Yes | 3 No |
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 |
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 |
How to write duplicate records into a separate dataset using sort?
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
how to debug and test the sas program? : Sas-administrator
What are the data types that sas contain?
what r the job openings SAS for fresher graduates !
If money were no object, what would you like to do?
What are the default statistics that proc means produce?
my problem is to export my report to xsl.i can do that.but the problem is my report has 3 headings first heading should be printed with the merging of (1-5)cells and heading 2 should be of merge(2-4)cells?how to do this condition?
Mention what are the data types does SAS contain?
what is the difference between the SAS v8 and SAS v9?
describe the interaction table in sas di? : Sas-di
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di