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:
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:
if wbra-converter-program = 'OBJSERV '
|
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.