Can someone tell me the behaviour of next_in_sequence() and innovation_number() in a multifile.
Suppose I have records 1,1,1,2,2,3,4,4 in a 4ways mfs file. Data in each partition is:
0th : 1,1,1
1st : 2,2
3rd : 3
4th : 4,4

What will be the sequence of these records if I pass next_in_sequence() and innovation_number() ?

Also how can I extract 3rd record from each of the 4 partitions of a 4way multifile through AbInitio? In unix we can use m_dump



Can someone tell me the behaviour of next_in_sequence() and innovation_number() in a multifile. Sup..

Answer / ram

AbInitio, next_in_sequence() function returns the next record in the sequence within a partition, while innovation_number() function returns the innovation number of the record, indicating its position in the sequence.Given the data you provided and assuming each record is numbered sequentially within each partition, the sequence of records when applying next_in_sequence() and innovation_number() would be:next_in_sequence(): 1, 1, 1, 2, 2, 3, 4, 4innovation_number(): 1, 2, 3, 1, 2, 1, 1, 2To extract the 3rd record from each of the 4 partitions of a 4-way multifile in AbInitio, you can use a combination of next_in_sequence() and conditional statements. Here's a basic outline of how you can achieve this:read_from_multifile(in = input_multifile) ->
begin
out :: output_table;
while(not end_of_file(input_multifile))
begin
record := next_in_sequence(input_multifile);
if innovation_number(input_multifile) = 3 then
out <- record;
end;
end;This script reads from the multifile and checks if the current record's innovation number is 3. If it is, the record is outputted to the output table. Repeat this process for all four partitions of the multifile.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ab Initio Interview Questions

What is the difference between dml expression and xfr expression?

0 Answers  


Describe how you would monitor and control database physical file size and growth?

3 Answers   IBM, Satyam,


Difference between output_index and output_indexes in reformat

0 Answers  


What is the purpose of having stored procedures in a data-based?

0 Answers  


What is conditional DML and Structured DML?

2 Answers   Accenture,






How might you quantitatively measure an improvement made to a query?

2 Answers  


If m loading a file of 1 million records.and the graph fails after loading 10,000 records. In this case if we use rollback command then what will happen?

4 Answers   IBM,


Suppose you find the term validation mentioned with a set of data, what does that simply represent?

0 Answers  


what is the difference between usersandbox,privatesandbox,publicsandbox,commonproject sandbox?

0 Answers  


What is data encoding?

0 Answers  


What is a rollup component?

0 Answers  


What is the difference between a DB config and a CFG file?

9 Answers   Wipro,


Categories