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...

How can you find the 2nd Highest salary in a file department wise in abinitio?

Answer Posted / murali krishna udayagiri

Yes Vital is correct. This can be acheived using SCAN
component with only one variable.

1.Input_file
2.Sort with in group (dno asc,sal desc)
3.scan
###############################################
type temporary_type=record
integer(4) temp1;end;
temp :: initialize(in) =
begin
temp.temp1::0;
end;

out :: scan(temp, in) =
begin
out.temp1 :: temp.temp1 + 1;
end;

out :: finalize(temp, in) =
begin
out.sal:: in.sal;
out.dno :: in.dno;
out.temp1 :: temp.temp1;
end;
out :: output_select(out) =
begin
out::out.temp1 == 2;
end;
###############################################
4.Output_file

Thanks,
Murali Udayagiri
Mail id: udayagiri.murali@gmail.com

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens when we provide null key to sort, merge and pbks in Abinitio ?

1585


What you can store, manage and reuse centrally in ab initio enterprise meta>environment (eme)?

1182


How do you truncate a table?

1119


What would be the next step after collecting the data?

1142


How to process records in batches like 1-20 records in first execution and 21-40 records in second run.. so on

904


What do you understand by overflow errors?

1155


Have you used the rollup component? Describe how?

1072


What is the return type of lookup_not_loaded() ? Does it return 0 or 1 to signify true or false or does it return index ...can someone please explain.

1306


What kind of layouts does abinitio support?

1195


What is the importance of eme in abinitio?

1077


How to create a repository in abinitio for stand-alone system(local nt)?

1058


Explain what is sandbox?

1018


What is brodcasting and replicate?

1156


What is the difference between dml expression and xfr expression?

1036


What is a partition and what are the different types of partition components in abinitio?

1206