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
Have you ever encountered an error called “depth not equal”?
What is publickey and private key?what is the use of this two keys?
Describe the evaluation of parameters order in ab initio?
How to execute the graph from start to end stages? Tell me and how to run graph in non-Abinitio system?
Can anyone give me an example of realtime start script in the graph?
What are the facts that can compromise data integrity?
I installed AbInito in my PC.In components there is no "select" component.How can i get that component?and How we can create user defined components?
What is the difference between check point and phase?
What is the use of the co> operating system in ab initio?
What are the operations that support avoiding duplicate record?
what is the use of catlog or catlogfile?
I am unable to connect sever database(oracle) from gde(db config file) local system.i set all these?
What do you mean by a transaction file?
What are the different types of parallelism used in abinitio?
How can you SORT an already partitioned (round-robin) data ? How to use in abinitio graph? 3. How internally partition by key decides which key to send in which partition ? How to use in abinitio graph? 4. What is PDL ? Give him a shell type parameter and ask him to convert it to PDL. How to use in abinitio graph? 5. As shell type parameters are not supported by EME, then how you can use shell type parameter (If you don't want to use PDL) without hampering lineage diagram ? How to use in abinitio graph? 6.How you can generate dml from a COBOL copy book ? How to use in abinitio graph? 7. How you can convert from ebcdic to packed decimal ? How to use in abinitio graph?