Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 data integration? : Sas-di

1126


How will you generate test data with no input data?

1183


what do you mean by data staging area? : Sas-di

1152


Explain the main difference between the sas procedures and functions? : Sas-administrator

1081


How do you connect the desktop application to metadata server? : sas-grid-administration

1110


what is the difference between nodup and nodupkey options? : Sas programming

1201


what is the Population you used in your project, is it ITT or PP?

2749


What are the uses of sas?

1279


How are numeric and character missing values represented internally?

1669


Of all your work, where have you been the most successful?

4673


Describe what are the different levels of administrative users in sas? : sas-grid-administration

1044


what is the function of catx syntax? : Sas-administrator

1109


what is star schema? : Sas-di

1142


What is the differnce between SDTM 3.1.2 to 3.1.1 version

5080


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

1081