The CICS Web Interface Data Access program


This page gives guidance on the Installation and Execution of the CICS Transaction Server for OS/390 CWI FINDADDR program. This program is a sample program, written in PL/I (an alternative COBOL version, called FA#COBOL is also included with this SupportPac), to access and return data from a 'company database' (in this case, CICS's FILEA file), through the CWI system.

When installed, this sample program will allow the user to submit a query from a FORM (only asks for a name), on a Web page. When the FORM is POSTed, the CWI program receives the HTTP request, extracts the name, then searches FILEA for the name's corresponding address. If the address is found the Web user will receive an answer to his query, otherwise an appropriate message will be delivered to the Web user (eg Address not found, Error reading FILEA, ...). The Web user will have the FORM redisplayed with this message. This sample program is accessed from the following URL format: http://your.CICS.system:your.port/cics/cwba/findaddr

To use the FINDADDR sample you need to:
1. Create new PDS(s) to store the graphics file and HTML
2. Upload GFNDADDR.GIF and DTFIND.HTM to your MVS or OS/390 and follow the instructions below.
3. Ensure FILEA has been created and is defined to CICS

These instructions explain how to use the sample FINDADDR PLI (or COBOL) program. It will serve a FORM (maybe, with a message to the Web user), from a URL such as http://your.CICS.system:your.port/cics/cwba/findaddr.


Here's what to do:

Installation Notes

1. Create a PDS (eg ISHORE.TEMPLATE.GRAPHICS) with variable length records of up to 32K (eg Record format: VB, Record length: 32700, Block size: 32704) to store your graphics files. Add a DD statement to your CICS JCL to point to this PDS (eg //GRAPHICS DD DSN=ISHORE.TEMPLATE.GRAPHICS,DISP=SHR).
2. Copy or move GFNDADDR.GIF to this PDS, renaming it as GFNDADDR. This file should be transferred to this PDS using FTP, or any other file transfer method with which you are familiar, specifying the BINARY option when transferring it.
3. Create a PDS (eg ISHORE.TEMPLATE.HTML) with undefined length records (eg Record format: U, Record length: 0, Block size: 32760) to store your HTML files. Add a DD statement to your CICS JCL to point to this PDS (eg //MYHTML DD DSN=ISHORE.TEMPLATE.HTML,DISP=SHR).
4. Copy or move DTFIND.HTM to this PDS, renaming it as DTFIND. This file should be transferred to this PDS using FTP, or any other file transfer method with which you are familiar, specifying the ASCII option when transferring it.
5. Translate, compile and link-edit the FINDADDR PLI (or COBOL) program, using your normal CICS PLI (or COBOL) compile procedures, ensuring it is accessible by CICS through the DFHRPL DD statements in the CICS JCL.
6. Ensure you have created FILEA and CICS can access it via a FILEA DD statement in the CICS JCL. You could use similar JCL EXEC steps to the following, to create it (you will need to alter the STEPLIB & SYSIN DD statements on the LOADFILE step, to point to your installed CICS system):
//DEFINE    EXEC PGM=IDCAMS,REGION=1M
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
        DEFINE CLUSTER(NAME(ISHORE.CICS.FILEA) -
         REC(80) -
         VOLUME(SYSDAV) INDEXED) -
        DATA(NAME(ISHORE.CICS.FILEA.DATA) -
        RECSZ(80 80) -
        UNIQUE -
        KEYS(6 1)) -
       INDEX(NAME(ISHORE.CICS.FILEA.INDEX) -
         UNIQUE -
         SHR(2 3))
/*
//LOADFILE EXEC PGM=DFH£LDSP
//STEPLIB  DD DSN=CICS.INSTALL.SDFHLOAD,DISP=SHR
//FILEA    DD DSN=ISHORE.CICS.FILEA,DISP=SHR
//SYSOUT   DD SYSOUT=*
//SYSIN    DD DSN=CICS.INSTALL.SDFHSAMP(DFH£FAIN),DISP=SHR
7. Update your CICS System Definition (CSD) dataset with the FINDADDR program, GFNDADDR doctemplate, DTFIND doctemplate and FILEA file definitions, using the CSD input file provided; CA8C.CSD

Back to the top


Execution

If all the above works correctly you should now be able to point your favourite web browser to: http://your.CICS.system:your.port/cics/cwba/findaddr
and receive back a graphic and a FORM for the user to submit a name. If the address, for the name is found, it will be given to the user. Otherwise, if an error is detected with FILEA or the POSTed data an appropriate error message will be returned to the browser (eg File Not Found, Invalid Filename, ...).

For example, if you supply BRIAN HARDER as the name, you should receive NICE, FRANCE back from the CWI program. Only basic name comparison checks are performed with this program (eg case insensitivity). But, if you add too many spaces to the name, the address will not be found.

Back to the top