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.
//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=SHR7. 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
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.