Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetString IBM3270 screen from PB 10.5 and Reflection 14

Status
Not open for further replies.

rtgreen79

Programmer
May 18, 2009
4
US
I am trying to convert my Powerbuilder application from using OLE Attachmate Extra to Reflection 14. I noticed that I cannot use the same script that I've used before. I've found equivalent functions that can replace my other functions. Unfortunately, I can't find anything to replace the GETSTRING(). IF lole_session.GetString(1,73,4) <> "FMSP" does not work. Can anyone assist? I've attached a brief code snipet below.
I get "Error calling external object function getstring" on the getstring() calls.

Code Snippet:
lole_session = CREATE uos_oleobject
IF lole_session.ConnectToObject(lstr_fms_fname) <> 0 THEN
fpub_got_error("COW0190059", "fpvt_access_fms", "")
return -1
END IF

IF NOT lole_session.IsAlive() THEN
//IF NOT lole_session.Visible THEN
// FMS session does not exist. Show message to the user that they need to login
fpub_got_error("COW0190053", "fpvt_access_fms", "")
lole_session.Visible = TRUE
Return -1
END IF
//lole_screen = lole_session.GetActiveSession()
//lole_screen = fpub_uos_oleobject(lole_session.Screen)

//Make sure user is on a valid menu
IF lole_session.GetString(1,73,4) <> "FMSP" AND &
lole_session.GetString(1,25,12) <> "NVi/TPX MENU" AND &
lole_session.GetString(1,26,22) <> "DMS/VS SECURITY SYSTEM" THEN
// Show message to the user that they need to login
fpub_got_error("COW0190060", "fpvt_access_fms", "")
Return -1
END IF

//Get to the main menu if not there
//IF lole_screen.GetString(1, 25, 12) <> "NVi/TPX MENU" THEN
IF lole_session.GetString(1, 25, 12) <> "NVi/TPX MENU" THEN
lole_session.TransmitTerminalKey(277)
lole_session.TransmitANSI( "cssf logoff")
lole_session.TransmitTerminalKey(289)
// lole_screen.SendKeys("<Clear>")
 
Sorry for bothering with the post. I discovered the GetDisplayText function for Reflection. It appears to work for me.

.GetDisplayText(1, 1, .DisplayColumns * .DisplayRows)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top