IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Find Row number in which string is Available - Screen

  • 1.  Find Row number in which string is Available - Screen

    Posted Sun March 03, 2013 01:19 PM

    Hi All,

    We have a string “ABC TEST”, we need to find in which row in the mainframe screen the string is available ?

    This is for Step in Applinx Path

    Regards,
    Vamsi Krishna.V


    #webMethods
    #ApplinX
    #Mainframe-Integration


  • 2.  RE: Find Row number in which string is Available - Screen

    Posted Mon March 04, 2013 04:04 AM

    Hi Vamsi

    I suggest you use the following logic:
    New object screenline(array)
    New object foundline
    Map Get Screen Buffer(Only Window) to screenline(+)
    For each foreach_item in screenline where is (StrIn(foreach_item, StrLn(foreach_item),case sensitive)=”ABC TEST”

    • Map foreach_index to foundline

    Note that if the text “ABC TEST” exists in more lines on the screen you will only get the last occurrence line number in foundline.

    Best regards

    Bjarne Sørensen


    #Mainframe-Integration
    #webMethods
    #ApplinX


  • 3.  RE: Find Row number in which string is Available - Screen

    Posted Mon March 04, 2013 09:56 AM

    Hi Vamsi,

    Although Bjarne’s solution is correct and should work for you, we recommend working with identified fields, in this case - multiple fields.
    We don’t have all the information, but if you expect the string to be in one (or more?) instances of a multiple field and you just need to find out in which - there are easier ways.
    We have an expression in the path procedure “Find Field Index”, please see attached screenshots (FindFieldIndex.png & FindFieldIndex_2.png). So, if you have a multiple field you can use this expression instead of looping over the whole screenbuffer to find it.
    Of course, if the string can be anywhere on screen, and there’s no way of mapping it into a field, then Bjarne’s solution is the only way to go.

    Hope this helps. Let us know :slight_smile:

    Regards,
    Gadi

    FindFieldIndex_2.png


    #webMethods
    #ApplinX
    #Mainframe-Integration