Please, anyone, let me know the style or an example of using
'by='/'by' variable of a PDV(Program Data Vector)
Answer Posted / cutepa1
Thanks Rajesh, Here I got the appropriate answer for the
above question. A PDV has got such two variables like
'first.<BY-variable> and last.<BY-variable> apart from other
temporary variables. Here a BY-variable is the variable that
is mentioned in BY statement. a first.<var> returns 1 when a
first obs of that variable's datavalue is iterated or
contributed and returns 0 for the remaining other obs whose
datavalue of that specified variable in the BY-statement.
Respectively it returns 1 for when last obs is contributed
with the usage of last.<BY-variable> and returns 0 for the
rest of the observations.
Here I got an example
=======
data ex;
set emp; /* a source table retrived from Oracle emp */
by deptno; /* we can call 'deptno' as our BY-variable */
lead=first.deptno; /* new variable called lead that returns
the value either 1 or 0 basing on deptno*/
follow=last.deptno;
run;
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is the difference between unique key and primary key? : Sas-di
What is a pdv and what are its functions?
How do you add a number to a macro variable? : sas-macro
Explain substr function?
what is transformation in sas data integration? : Sas-di
What are the new features included in the new version of SAS Programming Language?
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
What is the basic syntax style in SAS?
name the scheduler for scheduling job and explain the scheduler? : Sas-di
Hi Jeevan/Akshara I have tried to contact SASI Vats for latest Advanced SAS Programming Certification Dumps (A00-212) but have not got any response. I would highly and gratefully appreciate your assistance in this regard. If you guys have access to this, would you be kind enough to forward it to me ? I would abide by all the terms you have for this. Please, note my email id: upretigopi@yahoo.com Preti Sharma
What are the default statistics that proc means produce?
what versions of sas have you used (on which platforms)? : Sas programming
what is star schema? : Sas-di
Explain what is SAS informats?
Which command is used to perform sorting in sas program?