Browser Utility


Storing HTML in the Server
The Browser utility can be used to store HTML from another Web Server into the DragonFly resource file. This file is a VSAM dataset. The utility can update the file "live" or you can set the options on the VSAM file to restrict update while the server is running.

Storing Graphics such as GIFs
The Browser utility can be also be used to store any object from the Web in a VSAM file. This can be done to capture a graphic, a Java applet avi or mpeg. If you wish the object stored as ASCII only, then you must specify one of the currently supported graphics suffixes such as gif. A non graphic suffix will cause the object to be stored in both ASCII and EBCDIC formats.

Extracting information from the Web.
If the purpose of running the Browser is to extract a static page from the Web, the TRACE option should be used to print the data both in ASCII and EBCDIC to the SYSPRINT DD. The file allocated to this DD can then be read in subsequent steps of a job for extraction. Here is a snapshot of the JCL found in the sample library. We recommend using the CAPTURE method to a VSAM file and extraction from there.

The following is the sample JCL for the browser.

//BROWSER  JOB ,'DRAGONFLY',
// CLASS=A,REGION=4M,MSGCLASS=K,NOTIFY=IBMUSER
//*******************************************************************
//* BROWSER: Sample batch program to extract a web page from the net.
//* Options include TRACE, CAPTURE to a VSAM file (keylen 44) or
//* flat file via DRIVER DD or SYSOUT via DRIVER DD
//*
//* All CAPTUREs are stored in both ASCII and EBCDIC format in the
//* file except graphics.  The current graphics files recognized are
//* gif,tif,tiff,jpg,jpeg.  Other binary hence ASCII only files are
//* suffixed by avi,mov,mpg,mpeg,mid,wav,
//* and Java applets suffixed by class.  All file types can be stored
//* but are stored in both ASCII and EBCDIC if not listed above.
//*
//* This program displays a web page or image non-graphically.
//*
//* Host name resolve is available with this version of the browser.
//* IE Virtual domain names are supported and staging servers are not
//* required.
//*
//* USAGE:   SYSIN|URL|BROWSE|CAPTURE|HEADER,║REPLACE╗,║TRACE╗,║ASCII╗
//*
//* SYSIN   - All subsequent parameters will be read from SYSIN DD
//*           rather than from the program parameter field.
//*
//* URL     - ipaddress,port,document name of page you wish to retrieve
//*           EX - 10.10.10.10:80/index.htm
//*           The port is optional.
//*
//* BROWSE  - display the WEB page in SYSPRINT only.  Do not save in
//*           VSAM resource dataset.
//*
//* CAPTURE - Save the WEB page in the VSAM resource dataset as HTML
//*           that can be displayed on DRAGONFLYSERVER.
//*           NOTE: This parm overrides browse.
//*
//* HEADER  - Request the Web Server to return header info only.
//*
//* TRACE   - Detailed trace information about headers etc are displayed
//*           as received from the web server in both EBCDIC and ASCII.
//*           Logic flow and results are displayed in SYSPRINT.
//*           If a Web Server does not respond as expected, you will
//*           be able to find out why with this parameter.
//*
//* REPLACE - Pertains to CAPTURE parameter only.  Will replace the
//*           Web Page in the DragonFly resource file if it exists.
//*           This parameter is ignored if the page does not exist.
//*
//* ASCII   - Causes the data to be displayed in ASCII for Browse mode.
//*
//*******************************************************************
//BROWSER  EXEC PGM=BROWSER,PARM='/SYSIN'
//STEPLIB  DD DISP=SHR,DSN=TYSON.DRAGON14.LOAD
//RESOURCE DD DISP=SHR,DSN=TYSON.DRAGON14.RESOURCE
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
www.dragonflyserver.com/dragon8.jpg,BROWSE,TRACE
//
//*
//* Other sample sysin and parm specifications.
//*
216.183.14.203/1D4-7.jpg,BROWSE,TRACE

216.183.14.203/help/cgi.htm,CAPTURE=cgi.htm,REPLACE,TRACE

www.bluemountain.com/eng3gifs/karen/horoscope/bdmusic1/hbbgsound.mid, CAPTURE=happybd.mid

www.yahoo.com/index.html,HEADER,TRACE

www.bills.com/LIC/images/shim.gif, BROWSE,ASCII

//*PARM='/216.183.14.203:91/index.htm,BROWSE,TRACE' //*PARM='/24.66.14.90/help/futures.htm,CAPTURE=futures.htm,REPLACE'

Note that the address for the page can be specified in the parm statment or the SYSIN DD. Only a single operation can be performed per execution of this job. The REPLACE operation allows you to overwrite a previously stored object in the resource file.

This program can also be executed from a TSO command prompt.

© 1998-2002 Tyson Systems Inc. All rights reserved. Terms of Use.