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

Answer Posted / ravi

we can do this with scan comp
exp::i/p folloed by sort folloed by scan and o/p
ip record
id,dept_name,sal
in sort keep key fields as (dept_name,sal descending)
 now in scan write this T/f in parametres

type temporary_type
record
decimal("")secno;
end;
temp::initialize(in)=
begin
temt.secno::0;
end;
temp::scan(temp,in)=
out::finalize(temp,in)=
begin
out.in::in.id;
out.ddept_name::in.dept_name;
out.secno::temp.secno;
out.sal::in.sal;
end;
out::out_select(out)=
begin
out::out.secno==2
end;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the project environment(for each project the environment is same or different to different project)?

1653


What is a deadlock and how it occurs?

669


How to execute the graph from start to end stages? Tell me and how to run graph in non-Abinitio system?

725


When using multiple dml statements to perform a single unit of work, is it preferable to use implicit or explicit transactions, and why?

667


What are the different forms of output that can be obtained after processing of data?

770






can we perform checkin and checkout through sandbox?

719


Explain how abinitio eme is segregated?

948


explain the environment varaibles with example?

631


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

838


Describe the grant/revoke ddl facility and how it is implemented?

700


Explain what is the architecture of abinitio?

674


What are the features of ab initio?

628


Explain what is de-partition in abinitio?

834


Have you used the rollup component? Describe how?

633


How can you export a component’s internal parameters ?

1932