INET_OI_XML function & bHideMessages (OpenInsight 32-bit)
At 02 NOV 2022 01:38:39PM Brant Layton wrote:
OI Version 9.2.1
The INET_OI_XML function has a 7th parameter named bHideMessages. When passed as 1, the final completion message is suppressed, but the progress bar is still displayed.
We are trying to use this function within in a program that is called via OERUN.exe. We were expecting the progress bar to be suppressed by the parameter as well. Since the progress bar isn't suppressed, the call to OERUN hangs, presumably because it is waiting on a UI connection.
*** Question: is this behavior different in a later version of OI? Is there another solution to getting XML out via OERUN, short of coding my own XML writer?
Any information is greatly appreciated!
Brant Layton
At 02 NOV 2022 02:51PM bob carten wrote:
Later versions of OI are better behaved.
At some point we added a function named SELECT_INTO which can also return XML from a list statement.
Below is an example which can use either function.
I ran it using oi 9.46, it did not put up any messages.
Function test_oerun xml(mode) /* oi 9.4 example of generating XML using OERUN pass a 1 to use INET_OI_XML pass a 2 to use SELECT_INTO call it from OERUN with a command like .\oerun.exe -p 8088 -a MYAPP - u MYUSER -p MYPASSWORD -r TEST_OERUN_XML -c "1" */ Declare Function inet_oi_xml, ucase, select_into cmd = "LIST PERSON LNAME FNAME CITY WITH CITY EQ 'BOSTON'" If mode = 1 then request = "cmd=":ucase(cmd) request:= "dosfile=c:\temp\person_":time():'.xml' xml = Inet_Oi_Xml(Request, cmd) End Else * Select into can return XML xml = Select_into(cmd, 'XML') End Return xml
At 02 NOV 2022 06:43PM Brant Layton wrote:
Just re-asking, Bob…
You didn't use the bHideMessages parameter.
You say that it didn't put up any messages, but did it show a progress bar?
Thanks!
Brant Layton
At 02 NOV 2022 08:06PM bob carten wrote:
Yeah, no messages even though I did not use the flag.
At some point in the last 22 years, one of us at RTI commented out where it looked at bHideMessages. Instead, it suppresses the interactive message if the request parameter is non null.
The snippet below is from the source.
Interactive_flag = '' if request else Interactive_flag = 1 *If bHideMessages Then Interactive_flag = 0