This page gives guidance on the Installation and Execution of the CICS Transaction Server for OS/390 CWI GRAPHIX converter program. This program is a sample program, written in COBOL, to serve graphic images of up to about 47K, through the CWI system, from the PDS pointed to by the appropriate CDO defined DOCTEMPLATE.
When installed, this sample will allow you to deliver graphics through the CWI using
the following URL format: http://your.CICS.system:your.port/graphix/pic.gif
where 'pic' is the DOCTEMPLATE defined by CDO in CICS and
'gif' is the name of the MIME file type to be used.
To use the GRAPHIX sample you need to:
1. Create new PDS to store your graphics files
2. Upload JLOGO.JPG and GFNDADDR.GIF to your MVS or OS/390 and follow the instructions below.
These instructions explain how to use the sample GRAPHIX COBOL program. When combined with a few changes to the CWI analyzer program, it will serve a graphic image through the CWI, from a URL such as http://your.CICS.system:your.port/graphix/pic.gif. Any binary data could be delivered to a browser using this program. However, the only supported file types at the moment are GIF and JPEG. An examination of the source code will reveal how easy it would be to handle other MIME file types. GRAPHIX is a CWI converter program. 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 GRAPHIX converter program, which
is written in COBOL and it assumes that binary images
have been defined as DOCTEMPLATES to CICS.
Here's what to do:
if wbra-converter-program = 'GRAPHIX ' 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 end-if.What this analyser code does is search for the GRAPHIX program, as a converter, then set up some default values before issuing an early return to CICS.
Reinstall the analyzer and ensure that your modified analyzer is the one being used by the CWI. This can be done by updating the URM in your TCPIPSERVICE (corresponding to your port number) with your new analyzer, closing your CICS TCPIP link (by CEMT SET TCPIP CLO), reinstalling your updated TCPIPSERVICE, and reopening your CICS TCPIP link (by CEMT SET TCPIP OPE).
If all the above works correctly you should now be able to point
your favourite web browser at either:
http://your.CICS.system:your.port/graphix/gfndaddr.gif or
http://your.CICS.system:your.port/graphix/jlogo.jpeg
and receive back the appropriate graphic.
Certain error checking is performed on the URL and appropriate error messages
will be returned to the browser if these conditions arise (eg File Not Found, Invalid Filename, ...).
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. Maybe, you could continue the naming convention used by this SupportPac, by starting all .gif filenames with the letter 'G' and all .jpg's with the letter 'J'. Alternatively, you could state that all graphics be of type jpg.
Similarly, you must ensure that your binary files do not exceed about 47K in length, as the CICS Web Interface does not support such large template files.