cancel
Showing results for 
Search instead for 
Did you mean: 

Spying Mainframe (IBM terminal) : Read Stage - Capturing Unseen Information

Anonymous
Not applicable
Hey guys Running into a very very strange issue and would really appreciate any guidance on the matter. Current I using BluePrism to work with an IBM mainframe terminal application. I have been able to spy elements successfully (based off of X + Y grid coordinates). Additionally I am able to use the spied elements in conjunction with the read stage, in order to read characters off the terminal screen. This works well and I was able to double check that the values which were read, were indeed accurate. However, the problem occurs when trying to use the read stage with a spied element that does not contain any text (is blank). When such a blank black area ( aka without any white coloured characters) is read, the read stage returns a value that is not simply blank or similar, rather it outputs characters that are not visible on the screen and have been possibly cached from a prior iteration. I was able to retest by re-spying said fields (verifying them via the highlight function in application modeler) , but the problem persists even then. Has anyone else encountered instances where a blank area of the IBM terminal was "misread" by the read stage , and that unrelated characters were output into a data item stage ? Very odd and fundamentally breaks the read capability if it is incorrectly "reads" blank areas and outputs data/characters that are clearly not visible on the screen anywhere?? Thank you in advance
4 REPLIES 4

GaneshRaj
Level 2
We are facing this issue as well. Don't have any solution as yet for this. Have put a loop around it to read if the field returns a character, then we loop around 3 times and try to read the same field again and again. In worst case scenario (all 3 times, the value being read incorrectly) The case ends up being an exception, it happens very sporadically in our case and cannot be replicated in lower environments while running in debug mode. So we don't have enough information when we raise with blue prism support as well for them to investigate this further. Happens once in a while in our production environment alone. BTW, we are on the latest version of blueprism V5.0.30

Denis__Dennehy
Level 15
Yes - I have seen this issue before. The problem is how the mainframe application has been coded, for some reason rather than blanking the field (by printing "" "") when there is no value which would be the correct thing to do (I started out as a Mainframe developer many, many years ago) the developer who coded the app has chosen to black out the text so it is still there but not visible. So the hllapi interface is correctly returning a text value, the text is there but visually hidden (it is black in colour). Our product team investigated this in 2012 to see if there was something we could do to recognise text that had been hidden using colour, but found that for all but one of the mainframe APIs/Hllapi interfaces implemented by mainframe emulator vendors - they were not returning any colour information in their API. and even for the one emulator that does there were problems with how it had been implemented. This means there the only way to recognise the colour of text in a mainframe emulator would be to use Surface Automation in the field area to see if it is all black in that region - not an easy solution but the only option available if you have this problem. Ganeshraj - your issue sounds different because it is not consistent. For your example it potentially sounds like an issue with your intelligent wait stage logic in the emulator. I would recommed reaching out to any mentor/DEM/Trusted Advisor contact you have either in Blue Prism or in a Partner organisation.

Anonymous
Not applicable
Hey Ganeshraj Thank you for the reply. Based on some of the other replies in the thread, this seems to be an issue with there being text on the screen (but the text is black in colour, so it is not visible on the black terminal screen). One of the ways as suggested in this thread, is to use surface automation , and the second is only read blocks that contain the data youre interested in -- while doing an additional regex check possibly. In our case, we would consistently read the same values (all the times we attempted), so we made our spied elements tighter (x and y coordinates) and did regex checking to make sure if the data item was a ""ghost "" data item

Anonymous
Not applicable
Hey Denis, Thank you very much for the detailed response..! After doing some testing I do believe you are right on the money about everything. It is an API limitation , and the actual IBM terminal application returns characters that are black (same colour as terminal background). One thing that I am going to test is actually changing the background colour inside the application, so that the text in the background (that was previously hidden because the bg was black) becomes visible. Additionally , good idea to use the OCR capability via region mode , however what I experienced is that the application modeler only models off of one application type ( so it can either be a mainframe app or a ""region"" mode type app), is this correct? And so in order to not lose the elements I had spied before under the mainframe application model , if I convert to region mode , would I have to create a new business object instead of modifying the current one? Thank fully the ""ghost"" text was in a different format than the actual data items, so I was able to use regex and simple ""InStr"" to get around the ghost text 🙂 But would be interested to know what the best way to combine to application models would be (for future scenarios , if the format of the data items is not sufficiently different) , and if its a best practice to use 1 Business object per application model. The only possible problem I could see with that if those two business objects are not called from the same process, then each would need to be able to attach to the actual application... and that could get messy , especially with the IBM mainframe application, as from my testing so far , it does not allow attaching -- its only auto attached after launching.