Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Need Suggestions for Viewing IFS content from Browser
has no ratings.
Published: 09 Sep 2015
Revised: 12 Sep 2015 - 591 days ago
Last viewed on: 25 Apr 2017 (1278 views) 

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.

Need Suggestions for Viewing IFS content from Browser Published by: Bob Cozzi on 09 Sep 2015 view comments(6)

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.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: clbirk
Premium member *
Comment on: Need Suggestions for Viewing IFS content from Browser
Posted: 1 years 7 months 15 days 3 hours 58 minutes ago

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.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Need Suggestions for Viewing IFS content from Browser
Posted: 1 years 7 months 15 days 2 hours 3 minutes ago

It is the "dump to the User's PC" part that I'm trying to figure out. Thanks.

Posted by: tdaly
Premium member *
Comment on: Need Suggestions for Viewing IFS content from Browser
Posted: 1 years 7 months 15 days 1 hours 20 minutes ago
Edited: Fri, 11 Sep, 2015 at 14:06:52 (592 days ago)

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

 

Posted by: Ringer
Premium member *
Comment on: Need Suggestions for Viewing IFS content from Browser
Posted: 1 years 7 months 15 days 20 minutes ago

This works for me. Windows like backslashes. This fails with / slashes. 

STRPCO

STRPCCMD PCCMD('start \\Your400\folder\Test.html') PAUSE(*NO)

Ringer 

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Need Suggestions for Viewing IFS content from Browser
Posted: 1 years 7 months 14 days 22 hours 12 minutes ago

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..

 

Posted by: Ringer
Premium member *
Comment on: Need Suggestions for Viewing IFS content from Browser
Posted: 1 years 7 months 13 days 22 hours 41 minutes ago

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.