Input and Output Arrays setup instructions

Before you import the sample,

  1. Make sure that you have a clean workspace.
  2. You need to perform some setup work on the IMS server machine, where you want the InEqualsOut IMS program InEqualsOut.cbl. to execute. These steps are not covered; contact your IMS server administrator for setup and for connection information to your IMS server.

After you import the sample,

you need to configure the server and associate the sample with it using the following steps:

  1. To associate the sample with your IMS server, you need to change the connection information in Bean implementation class.
  2. Open up the InOutImpl.java in a java editor, change the following tag to use your IMS server connection information.
     /*
     * @j2c.managedConnectionFactory class="com.ibm.connector2.ims.ico.IMSManagedConnectionFactory"
     * @j2c.managedConnectionFactory-property name="HostName" value="csdmecxx.sss.ibm.com"
     * @j2c.managedConnectionFactory-property name="PortNumber" value="9999"
     * @j2c.managedConnectionFactory-property name="DataStoreName" value="IMS1"
     * @generated
     */
               
Testing the application using the TestInOut.java program

To directly invoke and run the TestInOut program, you will use the TestInOut.java file.

The TestInOut.java sample is only used as a reference. You may need to change the transaction code in the TestInOut.java file. Please find out from your IMS administrator. To make modification to the transaction code, locate the statement input.setWs__trcd("SKS7 "); and make modifications.

  1. Navigate to TestInOut.java under the project InOutArray and package sample.ims.
  2. Right click to invoke Run -> Run As Application.

You will see the following in the console:


Congratulations, you have completed the IMS transaction input and output messages containing arrays sample.

InEqualsOut.cbl    back to top
     IDENTIFICATION DIVISION.   
        program-id. pgm1.                                        
        ENVIRONMENT DIVISION.                                             
        CONFIGURATION SECTION.                                            
        DATA DIVISION. 

        LINKAGE SECTION.

       01  IN-OUT-MSG.
           05  WS-LL                      PIC S9(3) COMP VALUE +0.
           05  WS-ZZ                      PIC S9(3) COMP VALUE +0.
           05  WS-TRCD                    PIC X(5).          
           05  INDX                       PIC 99.
           05  WS-CUSTOMER     OCCURS 1 TO 8 TIMES 
               DEPENDING ON INDX.
               15  WS-CUST-NUMBER         PIC  X(5).
               15  WS-CUST-NAME           PIC  X(20).
           05  WS-FUNC-CODE               PIC  X(6).

        PROCEDURE DIVISION.           
   
back to top