Answered Questions

  • How to achieve the below scenario in abinitio

    Input file has below contents: Ball Run 1 1 2 1 3 1 4 1 5 1 6 1 1 0 2 1 3 1 4 1 5 1 6 1 1 1 2 1 3 1 4 1 5 1 6 0 Required Output : 1 6 2 5 3 5

    UNKNOWN User

    • Oct 23rd, 2024

    Use rollup with key change function
    (in1.ball==6 && in2.ball==1)
    This will cover if the 6th ball is a extra ball

    Shubham Kandpal

    • Jun 22nd, 2024

    Use key change and rollup , this code is 100% working

    Code
    1. let decimal(x01) over=0;
    2.  
    3. out::key_change(in1,in2)=
    4. begin
    5. out::in2.ball%6 ==1;
    6. end;
    7.  
    8. out::rollup(in)=
    9. begin
    10. over=over+1;
    11. out.ball :: over;
    12. out.run :: sum(in.run);
    13. end;