Please, anyone, let me know the style or an example of using
'by='/'by' variable of a PDV(Program Data Vector)

Answers were Sorted based on User's Feedback



Please, anyone, let me know the style or an example of using 'by='/'by' variabl..

Answer / rajesh

list of 'by' variables tell SAS how data is stored in
source dataset or how it is to be represented in
output/output dataset.

PDV is used to write the observations in output dataset and
it does not get impected from any BY variable as data in
SAS always read sequencely. If BY vaialbes are there then
it just ensures that source dataset is sorted on list of BY
variables. It does not impact other thing.

Is This Answer Correct ?    2 Yes 0 No

Please, anyone, let me know the style or an example of using 'by='/'by' variabl..

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

Please, anyone, let me know the style or an example of using 'by='/'by' variabl..

Answer / gajari rao

pls some one try to answer this question my friend is
waiting for your answer.

All the best pavan mandadi

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SAS Interview Questions

What are all the problems you faced while validating tables and reports?

0 Answers   Accenture, Quintiles,


I use NOCUM/NOPERCENT option in the tables statement like this Proc freq data = deepak; tables x y /nocum nopercent; run; Here I get nopercent and nocum in the output only for variables x and y. How do i do it for all variables? Deepak

1 Answers  


describe about metadata object? : Sas-di

0 Answers  


What do you understand by the term Normal Distribution?

0 Answers  


What is the purpose of _error_?

1 Answers   Quintiles,






how could you generate test data with no input data? : Sas programming

0 Answers  


Mention what are the data types does SAS contain?

0 Answers  


Does anybody has SAS Platform Administration certification dumps. pls send to hariithepalli@gmail.com

0 Answers  


Tell e how how dealt with..

0 Answers   Wipro,


What has been your most common programming mistake?

4 Answers   Wipro,


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

2 Answers  


What is a pdv and what are its functions?

0 Answers  


Categories