One of the report output options in CA VISION:Builder or CA VISION:Two is to output a report as an HTML document. CA VISION:Builder uses HTML templates to define the layout and appearance of the report content, when it is displayed as a document by a web browser. A default HTML template is delivered with CA VISION:Builder to use in generating HTML documents. These templates include HTML style specifications, such as background color, text color, font, alignment, and so on, that the browser uses when displaying the content of the document. Therefore, a template representing a specific appearance is known as a style.
You can customize the default style delivered with CA VISION:Builder as you prefer, and create up to 99 other styles to use for different reports prepared as HTML documents. You can specify the style number for a report by including the STYLE keyword on the FORMAT command. A sample FORMAT command with these keywords follows:
FORMAT METHOD HTML, STYLE 5, DDNAME HTMLOUT1
HTML -- Specifies that the selected data is to be formatted as an HTML document suitable for viewing with a browser. The DDNAME keyword is required when HTML is specified and the dataset associated with the DD name must either be a partitioned dataset (PDS) or a hierarchical file system (HFS) file.
STYLE number -- Specifies the HTML template to be used in preparing the HTML document from the selected data. The template number may be a value from 1 through 99. If this keyword is omitted, the default template will be used. At execution time, the HTML templates for each style used in an application must be present in a library. This library is identified with the M4HTBASE ddname. See the CA VISION:Builder Environment Guide for OS/390 for information regarding the creation of HTML templates.
DDNAME ddname -- In single-step application runs using one or more alternate report output methods, you must include JCL statements that define the destination for each alternate output. If HTML is used as the method for any alternate output, you must add a JCL statement that identifies the location of the HTML templates used to prepare the HTML output. A message identifying the destination for each alternate output and any messages generated by the alternate output method are directed to M4LIST. Note that a single CA VISION:Builder application program may generate multiple reports using alternate report output methods in any combination along with print-formatted reports, up to a total of 255 such outputs.
Example with the JCL needed for the HTML output method:
//jobname JOB ...
//JOBLIB DD DSN=your.builder.loadlib,DISP=SHR
//STEPHTML EXEC PGM=MARKIV,REGION=2M
//M4INPUT DD *
FILE MASTER INPUT, NAME . . .
REPORT . . .
FORMAT METHOD HTML, STYLE 5, DDNAME HTMLOUT1
//M4LIB DD DSN=your.m4lib,DISP=SHR
//M4LIST DD SYSOUT=*
//M4OLD DD DSN=old.master.file,DISP=SHR
//M4REPO DD UNIT=SYSDA,SPACE=(CYL,(n,n))
//SYSOUT DD SYSOUT=*
//* ADDITIONAL JCL STATEMENTS REQUIRED FOR HTML OUTPUT
//HTMLOUT1 DD DSN=html.document.output,DISP=(NEW,CATLG),
//M4HTBASE DD DSN=your.html.style.template.library,DISP=SHR
//* OPTIONAL JCL STATEMENTS FOR HTML OUTPUT
//M4WORK1 DD UNIT=SYSDA,SPACE=(CYL,(n,n)) HTML
//M4OPTS DD DSN=your.builder.worklib(M4OPTNS),DISP=SHR
The HTMLOUT1 statement is an example of one that would be required for HTML output. This statement must define a partitioned data set and the DDNAME must be identical to the name specified with the DDNAME keyword on the FORMAT METHOD HTML statement. CA VISION:Builder creates up to 4 members in the data set.
The M4HTBASE statement identifies the data set containing the HTML template members required for the styles used by this application. This data set must be a partitioned data set containing the required members.
The M4WORK1 statement defines a work data set used by the HTML output method. If the statement is omitted, CA VISION:Builder dynamically allocates the data set as necessary, with a space allocation of (CYL,(1,1)) and a unit name of SYSDA.
The M4OPTS statement identifies an optional input stream containing CA VISION:Builder run time parameters and/or options. If this statement is omitted, the default parameters and options are used. The acceptable parameters are:
- UNITNAME - Defines the DASD Pool Name for dynamic dataset allocation. The default name is SYSDA.
- URLFILE - Defines the type of URL to create for HTML document file references. Acceptable values are HFS or MVS. Use MVS or HFS if the document will be served up by WebSphere running under z/OS or OS/390. Use HFS if the document will be served up by a web server running on another platform.
- FILESIZE - Defines the file size limit for the files or members containing the body frame of an HTML document. Data for large reports will be segmented into files or members not exceeding the specified size. The default size is 500 K.