How to display spool files in a browser?

Posted on 2004-12-01
Last Modified: 2008-01-09
Dear Experts,

My company's product creates reports (spool files) at our customers' AS/400 sites.  We supply a brower-based GUI to create the reports, but we don't currently have a way for users to view the resulting reports, without going to green screen.

We'd like to find a way to show the report in the GUI, which is HTML/ASP-based.  However, we're open to doing it in a separate pop-up window, driven by other technology.  

Is there a way to do this using existing AS/400 tools?  Is there good third-party software to do it?

Thanks a lot, Experts!

Question by:BrianMc1958
    LVL 13

    Assisted Solution

    I have written some VB applications that display AS400 spool files in a text box or list box.

    I'm sure that same type of logic could be applied to ASP.

    If you had iSeries Access and ADO (msado15.dll) on your web server, you could call a program on the AS400 that copies a spool file into a physical file and then read the file and populate your web page.

    Obviously, there are more details, but it could be done by the summary above.

    Couple of questions - you would need some sort of mechanism to select which spool file you want. Maybe populate a table with spool files from a specific output queue and then click on the one you wish to view in your browser.

    The program called on the AS400 would probably be written using APIs, which isn't the easiest thing to do, and would have to be registered as a stored procedure. At least this is the way I would tackle it.

    LVL 14

    Assisted Solution

    I am just looking at some V5R3 enhancements.
    In qusrtool there is an IBM supplied command -

    Transform AFP to ASCII data stream (TRNAFP) tool
    This tool uses the QWPZTAFP print API.

    Could this be used?

    My understanding is that there is source (sorry we are not on V5R3 so some one else will need to publish source)

    LVL 1

    Assisted Solution

    just copy the spool file to a physical file and then copy it to a folder on the root as an html file and link to it.  This keeps it simple
    LVL 26

    Accepted Solution

    There are also a couple shareware tools and some products that will create PDFs. For a browser, this might be as good as it gets.

    One other possibility is the browser/spooled file utility that Webfacing uses. I'd have to dig up details from one of our web developers, but IBM has had a spooled file utility for browsers since maybe V5R1. Not pretty; somewhat like the OpsNav spooled file viewer function, perhaps not even as pretty but it "works". Unless these are destined for customers, maybe "pretty" isn't a requirement. It's not a Webfacing utility; it's a function available outside of Webfacing but Webfacing can be configured to use it and that's where I've seen it.

    [Note that displaying Windows spooled files in a browser isn't easy either (though I'd love hearing how it could be done). It at least seems possible on iSeries.]


    Author Comment

    Thank you, Experts.  We'll need to look into your suggestions some more here.  Thanks for your help!


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    OfficeMate Freezes on login or does not load after login credentials are input.
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now