In this section: |
The IWTEST05 sample program generates a new random balance the first time it is called. ADD and SUB may be used in the comment field to modify the balance.
The IWTEST05 sample program and related program files are located in the following directory:
<iway_home>\etc\samples\ims\iwtest05
where:
Is the location on your system where iWay Service Manager is installed.
The following subdirectories are included for the IWTEST05 sample program:
The document subdirectory contains the following XML input documents for the adapter.
The following is the structure of the IWTEST05ADD0.XML input document:
<?xml version="1.0" encoding="UTF-8" ?> <IMS> <Transaction location="IMS/Transactions/IWTEST05"> <IW01MI> <Segment> <TCODE>IWTEST05 </TCODE> <WHATEVER>WHATEVER </WHATEVER> <BCODE>11</BCODE> <NAME>MUSS</NAME> <COMM>add</COMM> <BALANCE>0</BALANCE> </Segment> </IW01MI> </Transaction> </IMS>
The following is the structure of the IWTEST05ADD100.XML input document:
<?xml version="1.0" encoding="UTF-8" ?> <IMS> <Transaction location="IMS/Transactions/IWTEST05"> <IW01MI> <Segment> <TCODE>IWTEST05 </TCODE> <WHATEVER>WHATEVER </WHATEVER> <BCODE>11</BCODE> <NAME>MUSS</NAME> <COMM>add</COMM> <BALANCE>100</BALANCE> </Segment> </IW01MI> </Transaction> </IMS>
The following is the structure of the IWTEST05END.XML input document:
<?xml version="1.0" encoding="UTF-8" ?> <IMS> <Transaction location="IMS/Transactions/IWTEST05"> <IW01MI> <Segment> <TCODE>IWTEST05 </TCODE> <WHATEVER>WHATEVER </WHATEVER> <BCODE>11</BCODE> <NAME>MUSS</NAME> <COMM>end</COMM> </Segment> </IW01MI> </Transaction> </IMS>
The following is the structure of the IWTEST05SUB100.XML input document:
<?xml version="1.0" encoding="UTF-8" ?> <IMS> <Transaction location="IMS/Transactions/IWTEST05"> <IW01MI> <Segment> <TCODE>IWTEST05 </TCODE> <WHATEVER>WHATEVER </WHATEVER> <BCODE>11</BCODE> <NAME>MUSS</NAME> <COMM>sub</COMM> <BALANCE>100</BALANCE> </Segment> </IW01MI> </Transaction> </IMS>
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.
The following is the structure of the IW01MI.XML input document:
<?xml version="1.0" encoding="UTF-8" ?> <MSG name="IW01MI" opt="1" type="INPUT" next="IW01MO"> <SEG> <MFLD name="TCODE" Length="9" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill=" " InputMFSDocumentUsage="Required"/> <MFLD name="WHATEVER" Length="10" iwaySuppress="no" iwayFieldType="alpha" attribute="no" fill=" " /> <MFLD name="PFKEYIND" Length="1" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill=" " /> <MFLD name="CSRPOS" Length="4" iwayFieldType="cursor" default="7,2" InputMFSDocumentUsage="Forbidden" /> <MFLD name="BCODE" Length="12" iwaySuppress="no" iwayFieldType="alpha" justification="right" attribute="yes" fill="0" InputMFSDocumentUsage="Optional" />
<MFLD name="USERID" Length="8" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill="U" /> <MFLD name="LTERM" Length="8" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill="P" /> <MFLD name="NAME" Length="38" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="yes" fill="S" /> <MFLD name="ACCT" Length="12" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="yes" fill="#" /> <MFLD name="BALANCE" Length="12" iwaySuppress="no" iwayFieldType="alpha" justification="right" attribute="no" fill="0" /> <MFLD name="COMM" Length="42" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="yes" fill=" " /> </SEG> </MSG>
The following is the structure of the IW01MO.XML output document:
<?xml version="1.0" encoding="UTF-8" ?> <MSG name="IW01MO" opt="1" type="OUTPUT" next="IW01MI"> <SEG> <MFLD name="TCODE" Length="9" iwaySuppress="no" iwayFieldType="alpha" attribute="no" fill=" " /> <MFLD name="WHATEVER" Length="10" iwaySuppress="no" iwayFieldType="alpha" attribute="no" fill=" " /> <MFLD name="PFKEYIND" Length="1" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill=" " /> <MFLD name="CSRPOS" Length="4" iwayFieldType="cursor" OutputMFSDocumentUsage="IfNotDefault" default="1,2" /> <MFLD name="BCODE" Length="12" iwaySuppress="no" iwayFieldType="alpha" justification="right" attribute="yes" fill="0" />
<MFLD name="USERID" Length="8" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill=" " /> <MFLD name="LTERM" Length="8" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill=" " OutputMFSDocumentUsage="Never" /> <MFLD name="NAME" Length="38" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="yes" fill="Z" /> <MFLD name="ACCT" Length="12" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="yes" fill=" " /> <MFLD name="BALANCE" Length="12" iwaySuppress="no" iwayFieldType="alpha" justification="right" attribute="no" fill="0" /> <MFLD name="COMM" Length="42" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="yes" fill=" " /> <!-- To test mismatch error <MFLD name="MISMATCH" Length="42" iwaySuppress="no" iwayFieldType="alpha" justification="left" attribute="no" fill=" " /> --> </SEG> </MSG>
The src subdirectory contains the following IMS components that are required to run the IWTEST05 sample program:
iWay Software |