The IWAYIVP sample program tests the adapter installation and populates the COMMAREA with a "CONGRATULATIONS!!!" message. This program takes arbitrary input and returns a fixed string as output.
On Windows, the IWAYIVP sample program is located in:
C:\Program Files\iWay61\etc\samples\cics\iwayivp
The following supporting files are provided:
The text versions of these source code files are included below for your review:
iwayivp.c
/* * iwayivp - This installation verification program populates * the commarea with the 'Congratulations!!!' message. * * uses: iwayivp_in.cbl (input record) * iwayivp_out.cbl (output record) * iwayivp.xml (input document) */ #include <stdio.h> int main () { char *commarea; EXEC CICS ADDRESS EIB(dfheiptr); EXEC CICS ADDRESS COMMAREA(commarea); strcpy(commarea, "Congratulations!!!"); EXEC CICS RETURN; }
iwayivp.cobol
**************************************************************** * IWAYIVP - THIS INSTALLATION VERIFICATION PROGRAM POPULATES * * THE COMMAREA WITH THE 'CONGRATULATIONS!!!' MESSAGE. * * * * USES: IWAYIVP_IN.CBL (INPUT RECORD) * * IWAYIVP_OUT.CBL (OUTPUT RECORD) * * IWAYIVP.XML (INPUT DOCUMENT) * * * **************************************************************** IDENTIFICATION DIVISION. PROGRAM-ID. IWAYIVP. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-AREA PIC X(50) VALUE 'CONGRATULATIONS!!!'. LINKAGE SECTION. 01 DFHCOMMAREA PIC X(50). PROCEDURE DIVISION. EXEC CICS HANDLE ABEND LABEL (030-ABEND) END-EXEC. MOVE WS-AREA TO DFHCOMMAREA. EXEC CICS RETURN END-EXEC. GOBACK. 030-ABEND. MOVE 'PROGRAM ERROR HAS OCCURRED!' TO WS-AREA. MOVE WS-AREA TO DFHCOMMAREA. EXEC CICS RETURN END-EXEC. GOBACK.
iWay Software |