Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
We have this great SQL tool SQL Query File that runs SQL SELECT statements and outputs the results to many formats.
We include a web browser (HTML) based interface, but what I would like to do is try to create a tool that allows users to run SQL statements with OUTPUT(*HTML) and then evoke the Client PC's Web browser with that HTML content loaded into it. I think this would be very cool and helpful.
I know how to launch the browser from the Green Screen using STRPCCMD, however I can't for the life of me figure out how to pump the generate HTML content into that browser session. I know we can't just link to the IFS file because that requires HTTP server configuration settings.
So I'm looking for creative suggestions to try out.
Thanks.
You could dump the information to the user's pc in a temp file that then you call that file and it would open up the browser.
It is the "dump to the User's PC" part that I'm trying to figure out. Thanks.
Maybe something like this:
chgvar &cmd value(browser.exe "file:///computer:/ifsdir/subdir/test.html")
strpccmd &cmd
You'll have to dink around with the quotes and the path but you get the idea.
The "computer" in the path is the IBM/i
This works for me. Windows like backslashes. This fails with / slashes.
STRPCO
STRPCCMD PCCMD('start \\Your400\folder\Test.html') PAUSE(*NO)
Ringer
I'm thinking that only works if you have a folder shortcut on your Windows desktop. Right? For example, I have my COZZI home directly linked on my desktop.
"C:\Program Files\IBM\Client Access\cwbunnav.exe" "/s=192.168.238.21 /o=\\UNY0192.168.238.21AS45File SystemsFSF8Integrated File SystemIntegratedFileSystem0RootFileSystem0homeFolder3cozziFolder3 /r=1"
To me, I doubt this would work.
Ringer, are you suggesting a host name and a link will work? I'll have to play with that..
Bob, it may be a bit more complicated than that. The base IFS folder probably needs to be a netserver shared folder to be visible, which is not a big deal. And the user's Windows user ID and password may need to be exactly the same as the IBM i user and password, so login happens automagically, else a pop up sign on window may appear. Just FYI. I've been down this road before.