Creating an import using CICS

Using the enterprise service discovery wizard, you create an import based on a CICS® application. You are taken step by step through the generation of the import.

Prerequisite: You should have access to a CICS server and a COBOL program. In this example, a module already existed though you could alternately create the module in the final page of the wizard.
You will follow the pattern you see in these steps when you create an import component for CICS and IMS™. You can find a similar step-by-step example but with multiple outputs in the samples section.
  1. Right-click your module and from the pop-up menu select New > Enterprise Service Discovery. The Select an Enterprise Service Resource Adapter page opens. If you have not imported the CICS ECI resource adapter into your workspace, click Import Resource Adapter. Add the resource adapter by specifying its path. All resource adapters that come with the product are found in this path: <installdir>\Resource Adapters. At this time, you may also select a particular name for the connector project, a specific target server, and specify that your selection be added to a particular EAR project. Deploying or not deploying the resource adapter in the module discusses why you might want to add and later deploy your resource adapter with a module. Click Finish. If asked to change perspectives, select No.
    Importing the resource adapter
  2. With your resource adapter added, return to the Select an Enterprise Service Resource Adapter page, select your resource adapter and click Next. You may occasionally need to wait a minute as your workspace is rebuilding in the background following the import. If you do not see your resource adapter, close the wizard, wait until the workspace has rebuilt, and then return to the enterprise service discovery wizard.
    Select CICS resource adapter
  3. The Resource Adapter Connection Properties page opens. You can choose between two types of managed connections. The differences are discussed in Using connection properties specified on a server or specifying them. If you select Use connection properties specified on server, specify the JNDI name and optionally the J2C Authentication Data Entry (the JAAS alias name) at the server you will be connecting to. If you select Use the following connection properties, then you will need to provide at a minimum the connection URL; that is, the name of the machine used as a gateway. Complete the information and click Next.
    Selecting connection properties
  4. The Add Operations page opens. It is initially empty.
    Add Operations page
  5. Click Add to define an operation and its interaction and connection specifications. The Add operation wizard opens. In our example, we are getting department information, so we will call our operation getDepartmentInfo. You will need to specify an input and an output for your operation. Begin by selecting New to the right of the Input type field.
    Add operation page
  6. The Data Import wizard requests the type of mapping you want and the source file. Select the mapping you want for the Choose mapping field, in our case COBOL To Business Object. Click Browse beside the COBOL file field and navigate to your COBOL file. Click Next.
    Importing the data
  7. The Importer page opens where you specify the data structure you will use. Platform and code page are already completed for you, but you can change them. Clicking Show Advanced reveals other fields you can change such as floating-point format. Click Apply beside the Data structures field. The wizard analyzes the data structures in the COBOL file and returns them to the pane. Select the one you want. In our example, we selected DFHCOMMAREA. Click Next.
    Specifying the data structures
  8. The Saving Properties page opens specifying the names, styles and folder for the properties. Note that you can choose to change or create a new module at this point. Remember, at this point nothing has been generated. The name will be the data structure name if you do not change it. For example, we changed the well-known DFHCOMMAREA to DepartmentInfo, since the structure contains department information. Specifying a folder is recommended since otherwise all generated files will be put in the root module folder, which will make them difficult to manage. Generation style lets you specify a variation of generated names, as indicated by the hover help. Click Finish to complete the specification of your operation.
    Saving operation properties
  9. The sequence returns to the Add operation wizard page. At this point you can also specify your output type in a similar way to the input type. In our case, we will select the Use the same type for output as used for input, which means the input type will be used as the output type also. Click Finish.
    Operation with input and output defined
  10. The Add Operations page opens. You could at this point add some more operations. For this example, we will only use one. The InteractionSpec class is shown as well as the properties for your operation, which you can change. The Function name field specifies the program on the CICS server to execute. It must be completed. You may also specify a the maximum length of the COMMAREA length. Clicking Show Advanced provides other properties you may want to specify yourself, such as the timeout value. Click Next.
    Saving your operations
  11. The Generate Artifacts page opens. You can change or create a new module. You can specify a folder to contain the generated files. You must enter a name in the Name field, in our case DepartmentInfoService. At this point you can deploy the resource adapter with the module if you wish. Deploying or not deploying the resource adapter in the module discusses why you might want to deploy your resource adapter. Click Finish.
    Saving properties of the import component
  12. Your service is created and added to the module. Select your business object beneath Data Types. The relationship of this business object to others appears in the references view. Right-click a business object. From the pop-up menu select Open With > Business Object Editor. It opens in the editor. Selecting an item from the business object results in seeing lower level information in the properties view. Business objects from data structures provides more details on the properties view of business objects created by the wizard.
  13. Right-click your interface beneath Interfaces. From the pop-up menu, select Open With > Interface Editor. The interface opens in the interface editor. The relationship between the interface and the service is shown in the references view.
  14. Right-click the name of service you created, from the pop-up menu select Open. The assembly editor opens with an import component icon. EIS indicates that it is created from an application on an EIS system.
    Import component
  15. Select the import component. In the properties view, more details are provided. You can add or change the names and description provided. Select Details. More details are specified including the interface name, preferred interaction style - synchronous, asynchronous, or any - and the operations. The Qualifiers tab may let you add a qualifier to the interface. A qualifier is a quality of service (QoS) addition you may be able to add to the interface; for example, a security level. However, it is determined by the creation of the service whether one or more are present and if you are permitted to add any yourself. The Event Monitor tab lets you monitor events at run time using the Common Event Infrastructure (CEI) property. For example, you might want to monitor how many times a transaction involving this service occurred. Event monitoring can be helpful in fine tuning an application. For example, if you monitored the transactions occurring it might point to a bottleneck at run time.
    Properties of an import component
  16. Select the Binding tab. The type of binding, the resource adapter, the managed connection factory class, data type and binding description are listed. The Connection section contains the managed connection factory class and its properties, the Connection Spec class and its properties. Authentication properties and Admin properties. The Resource Adapter section contains the resource adapter name and type. The Method Bindings section contains the contains the interaction information. You can set ECIInteractionSpec values such as TPNName and TranName. Binding information fields are discussed in detail in Data bindings, function selector and generated properties.
  17. If you wish to test your component using the WebSphere® test environment, see WebSphere test environment setup.
You have created a CICS service as an import component. You can find a similar step-by-step example but with multiple outputs in the samples section. Compare this example with creating an import component using a PeopleSoft system.
Related concepts
Relationship of imports and exports to inbound and outbound events
Related tasks
Creating an import using PeopleSoft
Creating an export using PeopleSoft
Creating an import using IMS
Creating an import to retrieve undelivered IMS transaction output

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.