Convert Utility

Storing HTML in the Server
The Convert utility stores HTML from a PDS member or sequential dataset into a VSAM file. The VSAM file will be used as a resource database for the DragonFly server. This allows you to create HTML using mainframe utilities only. We use ISPF/PDF.

Retrieving HTML from the Server
This utility runs in reverse and can extract HTML from the servers resource database and place it in a PDS. The record length for the PDS or sequential dataset must be 80. FB 80, 3600 is recommended.

This is a snapshot of the JCL found in the sample library.

//CONVERT  JOB ,'TYSON',
// CLASS=A,REGION=4M,MSGCLASS=K,NOTIFY=P390
//******************************************************************
//* CONVERT: This program converts a source web page that you create
//* using spf edit to the vsam resource dataset used by DRAGON the
//* http server.  You can edit a page in the resource dataset by
//* first converting it using a fromvsam parameter, making the changes
//* and then using the program again with the tovsam parameter to
//* activate it.  The program reads only the ASCII record from the
//* VSAM library but writes both EBCDIC and ASCII to it.
//*
//* Limitations:  This version of CONVERT is set to a maximum object
//*               size of about 6.5 megabytes.  While we think this
//*               is reasonable it can be altered, by contacting us,
//*               to whatever size you wish up to your maximum allowable
//*               region size.
//*               Resource names can be up to 44 characters in length.
//*
//* Parms:
//* TOVSAM   - converts html from SOURCE DD to RESOURCE DD for server
//* FROMVSAM - converts html from RESOURCE DD to SOURCE DD for editing
//* REPLACE  - Replace existing VSAM object with new object - overwrite
//* FIXED    - non-parsable HTML will be created with 72 char recs
//* ASIS     - Do not change ASCII to or from EBCDIC and no CRLF adds
//* DELETE   - only delete the resource URL from the VSAM database
//******************************************************************
//TOVSAM   EXEC PGM=CONVERT,PARM='/TOVSAM,index.htm,REPLACE'
//STEPLIB  DD DISP=SHR,DSN=TYSON.DRAGON14.LOAD
//RESOURCE DD DISP=SHR,DSN=TYSON.DRAGON14.RESOURCE
//SOURCE   DD DISP=SHR,DSN=TYSON.DRAGON14.HTML(INDEX)
//SYSPRINT DD SYSOUT=*
//******************************************************************
//* examples of the parameters
//******************************************************************
//
//*RVSAM   EXEC PGM=CONVERT,PARM='/FROMVSAM,logon'
//*OVSAM   EXEC PGM=CONVERT,PARM='/TOVSAM,IPsetup.htm,REPLACE'
//*RVSAM   EXEC PGM=CONVERT,PARM='/FROMVSAM,logon,FIXED'
//TOVSAM   EXEC PGM=CONVERT,PARM='/TOVSAM,index2.htm,REPLACE'
//FRVSAM   EXEC PGM=CONVERT,PARM='/FROMVSAM,index.htm'
//TOVSAM   EXEC PGM=CONVERT,PARM='/TOVSAM,index3.htm'
//TOVSAM   EXEC PGM=CONVERT,PARM='/TOVSAM,index3.htm,ASIS'
//*ELETE   EXEC PGM=CONVERT,PARM='/DELETE,tss.txt'
 

Note that some HTML captured from another http server cannot be easily parsed into a 72 character dataset. In this case the FIXED parameter is used to chop the lines into 72 character segments. The convert utility will warn you if the HTML has a structure that cannot be parsed. You can then repeat the operation with the FIXED parameter. Data obtained in this manner may require some minor formatting.

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