Skip to main content

I have a program that connects and reads Presentation Space content with the EHLLAPI library. I don't want to capture hidden text like password so I called set session parameters with "NODISPLAY" flag but I got invalid parameter error. I tried other flags (EAB,XLATE,DISPLAY,...) successfully. I see both IBM standard document and Attachmate document mention that the EHLLAPI support "NODISPLAY" flag.

Can anyone help me to capture non-display characters as null?


#Rumba
#ehllapi
#NODISPLAY

I have a program that connects and reads Presentation Space content with the EHLLAPI library. I don't want to capture hidden text like password so I called set session parameters with "NODISPLAY" flag but I got invalid parameter error. I tried other flags (EAB,XLATE,DISPLAY,...) successfully. I see both IBM standard document and Attachmate document mention that the EHLLAPI support "NODISPLAY" flag.

Can anyone help me to capture non-display characters as null?


#Rumba
#ehllapi
#NODISPLAY

Hi Thiet, I hope this helps you.   To provide some context around this it was a problem I came across often about 10 years ago and it caused all sorts of issues with the automation I was developing.  I was just using the function exposed by EHLLAPI of WD_CopyPSToString and assuming that what it read in was visible on the screen and in the vast majority of the cases that was true.  But given that it is a massive application and 100's of different developers have worked on it in some cases text was just "hidden" and it read it in and applied logic as though it was visible.

So the answer that was applied by my team was to use the EHLLAPI function of WD_QueryFieldAttribute to check every position that is read in so effectively every character and then check if it "is visible" and then applying the correct logic.  This does add a bit of overhead but there were some screens and text that it needed to be applied to and not all the time so the "readscreen" function had it as a conditional option.

Here is the VBA code that also runs in .NET that just sits in the background in our library and I never think about again

'Check whether a position is visible
Public Function isVisible(ByVal nPosition As Long) As Boolean

    ' currently only used by me.ReadScreen
    
    Dim nRetValue As Integer
    Dim nAttribute As Integer
    Dim nMask As Integer
    nRetValue = WD_QueryFieldAttribute(mPID, nAttribute, nPosition)
    
    nMask = Val("&H40") ' check protection bit 1
    nMask = nMask And nAttribute
    
    If nMask <> 0 Then
        isVisible = True
    Else
        isVisible = False
    End If
End Function

BTW just had a look again and here is the reference for this www.ibm.com/.../6.0


I have a program that connects and reads Presentation Space content with the EHLLAPI library. I don't want to capture hidden text like password so I called set session parameters with "NODISPLAY" flag but I got invalid parameter error. I tried other flags (EAB,XLATE,DISPLAY,...) successfully. I see both IBM standard document and Attachmate document mention that the EHLLAPI support "NODISPLAY" flag.

Can anyone help me to capture non-display characters as null?


#Rumba
#ehllapi
#NODISPLAY

Thank Norman Close  so much, I understood your idea.