Forum Discussion

Geethanjali's avatar
Geethanjali
Occasional Contributor
4 years ago
Solved

Extracting Text from iseries (mainframe-green screen) applications

Hello 

 

Has anyone have experience in extracting specific text from Mainframe applications. I have already enabled Text Recognition through which am able to automate entering values. But am struggling to extract the values for specific fields displayed in the screen. The whole screen is taken up as an object.

 

Any thoughts on this will really help. 

 

Thanks 

S.Geethanjali

 

 

  • hi  

     

    I have resolved this issue. 

     

    I tried OCR, but that didnot help me much because it provided me a chunk of data from the screen and I felt it really difficult to extract the specific data. Not sure if it had more effective ways 

     

    The solution which worked out for me was 

    Used text recognition in order to recognise the AS400 window. 

    Used key strokes for keying in the data

    used the feature ( Edit - Send to scratch pad) option in AS400 after which I recogonised that scratch pad window to get the details displayed. Since the positions and length are fixed I used relative positioning and length to extract the data. 

    Tried for couple of screens, it has worked.Have to see how it progresses. 

     

7 Replies

  • BenoitB's avatar
    BenoitB
    Community Hero

    You must do OCR on specific region and specify to the ocr routine the font used.

    Size of as400 screen is fixed and fields position too.

    Use it to make template of each screen to manipulate.

    • Geethanjali's avatar
      Geethanjali
      Occasional Contributor

      Hello, Thanks very much for your reply.. are there methods to extract text with the give rowid and columnid from the mainframe screen ?

       

      I don't have Intelligent Quality add in installed. 

      Is there any other way to do it or do we only require OCR to be enabled ?

      Thanks very much

       

      Thanks 

      S.Geethanjali

      • BenoitB's avatar
        BenoitB
        Community Hero

        Without Intelligent Quality you can still have OCR

        Read more on this article (the deprecated one)

        https://support.smartbear.com/testcomplete/docs/testing-with/deprecated/ocr/required-plug-ins.html

        But since the new ocr appeared it seems that the old OCR was lowered in quailty (this is my personal feeling) so it doesn't works as well as in the past.

         

        But you can also use regions checkpoint (so using image fragment).

        Here as the interface is very stable and pixels colors are well defined it could be a good alternative.

        So build a library of Regions corresponding to your main fields ...

        Or even more touchy but sexier, built on the fly the image fragment from the desired text.. -> Create a bitmap object with background color the same as your terminal background color, use Win32Api to write on this bitmap with the same font/color as the terminal .. and you'll have way to avoid building a large library of Regions ...

         

        sonya_m  This could be a very intersting technical challenge

        function CreateRegionFromString(MyString, FontObject, Background (color or other bitmap)) {

          return a bitmap that can be directly used with Region.Check

        }