AB initio query

I/p col1||val1||col1||val2||col3||val3
o/p col1 col2 col3
val1 val2 val3
how to achieve this in AB initio

  
Showing Answers 1 - 2 of 2 Answers

Sneha

  • Jun 1st, 2023
 

REFORMAT(input column :F1)
let int C_FLAG = 0
out :: reformat(in)
begin
let int count = next_in_sequence();
if count%2 != 0;
C_FLAG = string_substring(in.F1,4,1);
end;
out.COL1 :: if((count%2 == 0) && C_FLAG == 1) in.F1;
out.COL2 :: if((count%2 == 0) && C_FLAG == 2) in.F1;
out.COL3 :: if((count%2 == 0) && C_FLAG == 3) in.F1;
end

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions