Answered Questions

  • Print Position of Char

    How to print the position of the char in a given word I have a input like: Column_name: Indicator YNNYYN NNNYYN YYYYYN NNNNNN REQUIRED O/P: Where the Y is present in a given string, i want position of the string with CONCATENATE of P Letter. o/p: P1 P4 P5 P4 P5 P1 P2 P3 P4 P5

    shivank b

    • Apr 4th, 2021

    The simplest solution would be using reformat with below function.
    out.data :: string_concat("P",(decimal(1))string_index(in.column_name,"Y"))

    Regards,
    Shivank B

    RR

    • Jan 22nd, 2021

    How do you define the output format of Reformat here?

  • Record to Column

    I have a record like below: avi,mahi,virat,mahi,avi,virat,mahi,virat,avi Output should be: avi1 mahi1 virat1 mahi2 avi2 virat3 mahi3 virat4 avi3 Please suggest how can I achieve this.

    Sandeep

    • Mar 25th, 2018

    Use scan component using check sort attribute as false(maintain order-false)
    then use name as key and for sequence number use count(in.name)

  • Fetch Next Record Data

    How can we fetch next record data for a particular field in ab initio? i/p id sal 101 500 102 800 103 900 105 200 o/p id sal Pre_sal 101 500 0 102 800 500 103 900 800 105 200 900

    Sai

    • May 14th, 2018

    use scan component we have to achieve this scenario and the parameter key is "NULL({})"and find the below explanation.Here i am taking the 2 temporary variables as a,b. type temporary_type = record ...