IWTEST10 Sample Program

Topics:

The IWTEST10 sample program accesses a database (IWSTDB). Three database operations are used (add, delete, and get), (key, description), key length = 16, and data length = 34.

Note: When accessing this transaction via the CRM Gateway, the security type must be IDENTIFY. This security type is required since it is related to RACF and UNIX System Services.

Sample Program Location and Directory Structure

Topics:

The IWTEST10 sample program and related program files are located in the following directory:

<iway_home>\etc\samples\ims\iwtest10

where:

<iway_home>

Is the location on your system where iWay Service Manager is installed.

The following subdirectories are included for the IWTEST01 sample program:

  • document
  • mfs
  • src

Document Subdirectory

Reference:

The document subdirectory contains an XML input document for the adapter.

Reference: IWTEST10_IN.XML Input Document

The following is the structure of the IWTEST10_IN.XML input document:

<?xml version="1.0" encoding="UTF-8" ?>
<IMS>
  <Transaction location="IMS/Transactions/IWT10">
    <IW10MI>
      <Segment>
        <TCODE>IWT10</TCODE>
        <OP>add</OP>
        <NAME>burst</NAME>
        <COMM>inTears</COMM>
      </Segment>
    </IW10MI>
  </Transaction>
</IMS>

MFS Subdirectory

Reference:

The mfs subdirectory contains the MFS XML files, which describe the mapping of the input document to the data sent to IMS and the mapping of the incoming data from IMS to the output document. The adapter takes the input document, formats it according to the input MFS XML file, and sends it to IMS. It then takes the data IMS sends back, formats it according to the output MFS XML file, and passes the result to the caller. These descriptions are derived from the real IMS MFS definitions.

Reference: IW10MI.XML Input Document

The following is the structure of the IW10MI.XML input document:

<?xml version="1.0" encoding="UTF-8" ?>
<MSG name="IW10MI" opt="1" type="INPUT" next="IW10MO">
  <SEG>
    <MFLD name="TCODE" 
         Length="6"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="OP"
         Length="4"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="NAME"
         Length="16"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="COMM"
         Length="34"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="MSG"
         Length="50"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  </SEG>
</MSG>

Reference: IW10MO.XML Output Document

The following is the structure of the IW10MO.XML output document:

<?xml version="1.0" encoding="UTF-8" ?>
<MSG name="IW10MO" opt="1" type="OUTPUT" next="IW10MI">
  <SEG>
    <MFLD name="TCODE" 
         Length="8"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="OP"
         Length="4"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="NAME"
         Length="16"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="COMM"
         Length="34"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  <MFLD name="MSG"
         Length="50"
         iwaySuppress="no"
         iwayFieldType="alpha"
         justification="left"
         attribute="no"
         fill=" " />
  </SEG>
</MSG>

SRC Subdirectory

The src subdirectory contains the following IMS components that are required to run the IWTEST10 sample program:

  • iwdef10 contains the APPLCTN and the TRANSACT macro definitions for the IWTEST10 sample program and the following transactions that invoke it:
    • iwt10
    • iwt10a
    • iwt10d
    • iwt10g

    Note: Currently, using only transaction IWT10 is recommended.

  • iwmfs10 contains the ‘real’ MFS definitions used by the IWTEST10 sample program.
  • iwpsb10 contains the program definitions (psbgen) iwtest10. This program uses the iwstdb database, which must be defined separately.
  • iwstdb contains the database definitions (dbdgen) for the iwstdb database.
  • iwtest10.c is the program source code.