The MVS CICS Web Interface Graphics Server.


This page gives guidance on the Installation and Execution of the CICS/ESA CWI OBJSERV converter program. This program is a sample which will send graphic images of up to 32K through the CWI system from the PDS pointed to by your DFHHTML DD statement.

If installed, this sample will allow you to deliver graphics through the CWI using the following URL: http://your.CICS.system/objserv/graphic.gif
where 'graphic' is the name of a member set in the HTML template PDS and '.gif' is the name of the MIME file type to be used.

To use the OBJSERV sample you need to:

1. Create a new PDS for both graphics and HTML.
2. Move your existing HTML to this PDS and add some graphic images.
3. Upload OBJSERV.COB to your MVS or OS/390 and follow the instructions below.

These instructions explain how to use a sample COBOL program that when combined with a few changes to the CWI analyzer program, serves a graphic image through the CWI from a URL such as http://your.cics.system/objserv/graphic.gif . Any binary data could be delivered to a browser using this program though the only supported file types at the moment are GIF and JPEG, an examination of the source code will reveal how simple a procedure it would be to handle other MIME file types. OBJSERV is a CWI converter only, no application logic program is invoked as all processing is done within the DECODE section of the converter.


A number of methods of sending binary data via the CWI exist one of which is to use the sample code found in the OBJSERV converter program. This sample code is written using COBOL and it assumes that binary images will be stored in the HTML Template PDS along with HTML text files. Here's what to do:

Installation Notes

Create a PDS with variable length records of up to 32K. Point the DFHHTML DD statement in your CICS JCL to this PDS.

Copy or move any existing members of the HTML template file from the old PDS to this new PDS.

A graphic file should be transferred to a member of the PDS using FTP or file transfer method with which you are familiar. Be sure to specify the BINARY option when transferring the file to MVS.

Compile and link edit the COBOL program OBJSERV using your normal CICS compile procedures.

Update your CICS System Definition (CSD) dataset with the OBJSERV program definition, using the CSD input file provided (CA84CSD).

Add the following COBOL code to the COBOL analyzer (DFHWBAOX) or write equivalent code in your preferred analyzer language. It should appear after the URL has been scanned for the converter program name but before the URL has been scanned for the alias tranid.


if wbra-converter-program = 'OBJSERV '
move low-values to wbra-dfhcnv-key
move 'CWBA' to wbra-alias-tranid
move low-values to wbra-server-program
move URP-OK to wbra-response
move 0 to wbra-reason
EXEC CICS RETURN END-EXEC.

What this analyser code does is search for the OBJSERV program as a converter name and then sets up some default values before issuing an early return to CICS. The line referring to wbra-dfhcnv-key ensures that no EBCDIC to ASCII conversions are applied to the binary data.

Reinstall the analyzer and ensure that your modified analyzer is the one being used by the CWI. This can be done using option 2 from the CWBC transaction and setting the converter name to your new converter. Press enter twice to save this change then disable and reenable the CWI (option 1 from CWBC).

Execution

If all the above works correctly you should now be able to point your favourite web browser at the following URL: http://your.CICS.system/objserv/graphic.gif and receive back that graphic. If a Jpeg is required use the extension .jpg or .jpeg, if the graphic dosen't exist or is too big an HTTP 404 error code is returned.

Since MVS doesn't support the concept of filetypes you may find it easier to manage graphical files if you use a naming convention of some type. For example, you could start all .gif file names with the letter 'G' and all .jpg's with the letter 'J'. This isn't a necessity to using the sample however. Alternatively you could state that all graphics be of type jpg, for example.

Similarly you must ensure that your binary files do not exceed 32K in length as the CICS Web Interface does not currently support >32K files.