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
What are the kinds of layouts does ab initio supports?
Explain what is de-partition in abinitio?
Give one reason when you need to consider multiple data processing?
How do you improve the performance of a graph?
Pdl with an example?
Mention some ways for improving performance of a graph?
What is brodcasting and replicate?
Difference between output_index and output_indexes in reformat
explain the environment varaibles with example?
What do you understand by overflow errors?
What are the fundamental blocks of co> operating system of ab initio?
What are the facts that can compromise data integrity?
What are the functions of the replicate and dedup component?
Mention what the difference between “look-up” file and “look is up” in abinitio?
Explain batch processing in ab initio?