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


Please Help Members By Posting Answers For Below Questions

what is the difference between unique key and primary key? : Sas-di

592


What is a pdv and what are its functions?

598


How do you add a number to a macro variable? : sas-macro

543


Explain substr function?

572


what is transformation in sas data integration? : Sas-di

550






What are the new features included in the new version of SAS Programming Language?

733


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

551


What is the basic syntax style in SAS?

612


name the scheduler for scheduling job and explain the scheduler? : Sas-di

592


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

3058


What are the default statistics that proc means produce?

600


what versions of sas have you used (on which platforms)? : Sas programming

580


what is star schema? : Sas-di

640


Explain what is SAS informats?

620


Which command is used to perform sorting in sas program?

595