products/Sources/formale Sprachen/COBOL/verschiedene-Autoren/CICS/ca84/instgrap.htm |
 |
<html>
<head>
<title>"How to send graphics through the MVS CICS/ESA CWI"</title>
<body bgcolor="#FFFFFF">
<center>
<h1>The MVS CICS Web Interface Graphics Server.</h1>
</center>
<hr>
<p>
This page gives guidance on the <a href="#inst">Installation</a>
and <a href="#exec">Execution</a> of the CICS/ESA CWI OBJSERV
converter program. This program is a sample which will send graphic
images of <b>up to 32K</b> through the CWI system from the PDS pointed to
by your DFHHTML DD statement.
<p>
If installed, this sample will allow you to deliver graphics through the CWI using
the following URL: <b>http://your.CICS.system/objserv/graphic.gif</b><br>
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.
<p>
To use the OBJSERV sample you need to:
<dl> <dt> 1. Create a new PDS for both graphics and HTML.
<dt> 2. Move your existing HTML to this PDS and add some
graphic images.
<dt> 3. Upload OBJSERV.COB to your MVS or OS/390 and follow
the instructions below.
</dl>
<p>
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
<b>http://your.cics.system/objserv/graphic.gif</b> .
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.
<hr><p>
A number of methods of sending <b>binary data</b> via the CWI exist
one of which is to use the sample code found in the <b>OBJSERV</b>
converter program. This sample code is written using <b>COBOL</b>
and it assumes that binary images will be stored in the HTML Template PDS
along with HTML text files. Here's what to do:
<h2><a name="inst">Installation Notes</a></h2>
<dl>
<p><dt> Create a PDS with variable length records of up to 32K.
Point the DFHHTML DD statement in your CICS JCL to this PDS.
<p><dt> Copy or move any existing members of the HTML template file
from the old PDS to this new PDS.
<p><dt> 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 <b>BINARY</b> option when transferring the file
to MVS.
<p><dt> Compile and link edit the COBOL program OBJSERV using
your normal CICS compile procedures.
<p><dt> Update your CICS System Definition (CSD) dataset with the OBJSERV program definition, using the CSD
input file provided (CA84CSD).
<p><dt> 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.
<p>
<br>
<dl><table border=2><tr><td>
if wbra-converter-program = 'OBJSERV '
<dl><dt>move low-values to wbra-dfhcnv-key
<dt> move 'CWBA' to wbra-alias-tranid
<dt> move low-values to wbra-server-program
<dt> move URP-OK to wbra-response
<dt> move 0 to wbra-reason
<dt> EXEC CICS RETURN END-EXEC.
</dl></td></tr></table></dl><br>
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.
<p><dt> 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).
</dl><hr>
<h2><a name="exec">Execution</a></h2>
<p>
If all the above works correctly you should now be able to point
your favourite web browser at the following URL:
<b>http://your.CICS.system/objserv/graphic.gif</b> 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.
<p>
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.
<p>
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.
<hr>
</body>
</html>
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.
|