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

which date function advances a date, time or datetime value by a given interval? : Sas programming

1039


What is the use of function Proc summary?

1272


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1780


describe how to adjust the performance of data integrator? : Sas-di

1001


What is PROC in SAS?

1045


which date functions advances a date time or date/time value by a given interval? : Sas programming

941


What is the difference between %put and symbolgen? : sas-macro

1231


Name types of category in which SAS Informats are placed?

1141


it will become easy if uuu provide website linkssss and list of consultanciessssss

1969


What does the RUN statement do?

1298


How do you use the do loop if you don’t know how many times you should execute the do loop?

1254


how to debug and test the sas program? : Sas-administrator

1030


Describe 5 ways to do a “table lookup” in SAS?

1146


To what type of programms have you used scratch macros?

2560


Difference between informat and format?

1084