This document covers the following topics:
This scenario uses the tools IDL Extractor for COBOL and Integration Server Wrapper of the Designer.
Extract the interface of the COBOL server program. | |
Generate connection and adapter services in Integration Server. | |
Execute the call from Integration Server to the COBOL server program. |
This scenario makes the following important assumptions:
You have a working COBOL Large Buffer server. For illustration and examples on such a server, see CICS with DFHCOMMAREA
Large Buffer Interface.
You have access to the related COBOL sources and copybooks as files on your local machine. The minimum requirement is the
DATA DIVISION
of the interface. More info
You have an Integration Server with EntireX Adapter installed.
To call the COBOL server program at runtime using the EntireX CICS Socket Listener connection method, you need to install the CICS Socket Listener within your CICS region: see Preparing for CICS Socket Listener. For configuration, see Connection Parameters for CICS Socket Listener Connections.
Follow the instructions for extracting COBOL, see Using the IDL Extractor for COBOL - Overview and choose Scenario I: Create New IDL and Server Mapping Files if this is your first extraction. Learn how to invoke the IDL Extractor for COBOL, create a COBOL Extractor Environment and about the possibilities to select the COBOL source.
The extraction process creates the following EntireX metafiles:
IDL file. A Software AG IDL file contains definitions of the interface between client and server. See Software AG IDL File in the IDL Editor documentation.
Server mapping file (optional). The mapping file is a Designer file with extension .cvm that contains COBOL-specific mapping information. See Server Mapping Files for COBOL in the Designer documentation.
The following COBOL server is used to illustrate the features of the IDL Extractor for COBOL. Imagine an existing COBOL server
called EMPLOYEE
.
It implements the access logic for a LIST
and DETAILS
function to a database view EMPLOYEE
:
Two approaches for extracting the COBOL server are described below:
Fast-track
Learn how EntireX helps you to connect the COBOL Server with quick results.
User-defined Mapping
The following features are among those available with a user-defined mapping:
Shape the interface to your COBOL server
You can minimize the interface by suppressing COBOL server fields or by providing constant values.
Renaming interfaces allows you to specify a readable long name.
These two features together - constants and renaming of interfaces - are most powerful when multiple interfaces are implemented
in a single COBOL server.
Each function of the COBOL server triggered by an operation code or function code can be modelled as a separate IS service.
Select alternative mappings
You can select alternative mappings for COBOL data items (REDEFINE
s, tables etc.) to enable scenarios with COBOL servers where data exchange is not fully described by the LINKAGE SECTION
COBOL data items.
These approaches are described under Fast-track Method and Modern Method below.
To extract the COBOL Server
Swich to the EntireX perspective.
Call the IDL Extractor for COBOL.
Set the correct interface type as described under Step 4: Define the Extraction Settings and Start Extraction under Scenario I: Create New IDL and Server Mapping Files in the IDL Extractor for COBOL documentation.
Set the correct value for checkbox Input Message same as Output Message.
Check the checkbox if the COBOL data structure of the CICS input message is the same as the structure of the CICS output message, that is, there is one COBOL layout for both directions.
Clear the checkbox if the COBOL data structure of the CICS input message is different to the structure of the CICS output message, that is, the output overlays the input, which means there is a second COBOL layout for the reply.
For our example, check the check box, because the COBOL layout for input is the same as the COBOL layout for output.
Press
to enter the COBOL Mapping Editor.The purpose of the COBOL Mapping Editor is to map COBOL data items to IDL (Interface Definition Language) parameters. It consists of three main areas:
The upper window pane is the COBOL program source.
The window pane on the left-hand side is the COBOL interface, consisting of COBOL data items representing the parameters in your COBOL server program.
The window pane on the right-hand side is the IDL interface consisting of IDL parameters.
What you select depends on check-box Input Message same as Output Message:
If there is a single COBOL data structure of the CICS message for input and output - check box Input Message same as Output Message is checked - you select a single COBOL data structure in the COBOL Mapping Editor. This structure is used for COBOL input as well as for COBOL output. For more information in this case see Mapping Editor User Interface in the IDL Extractor for COBOL documentation.
If there is a second COBOL data structure for the CICS output message - check box Input Message same as Output Message is cleared - you will select two COBOL data structures in the COBOL Mapping Editor. One is used for COBOL input and the other is for COBOL output. For more information in this case see Mapping Editor User Interface in the IDL Extractor for COBOL documentation.
COBOL extraction is a two-step process:
First, select the COBOL parameters using the
and from the context menu on the COBOL data items in the upper window pane (COBOL source); in many situations the COBOL interface is detected by the Mapping Editor directly and you can omit this step.Then map the COBOL parameters to IDL directions using the
buttons. COBOL parameters do not have directions, they are always INOUT. This step can be left out for a quick test in non-production scenarios; for real production it is recommended to set IDL directions to reduce data transfer. You also have the option to assign a meaningful name to an IDL parameter if the original COBOL data item is not self-explanatory.For our example:
Set EMPLOYEE-ID
as IDL direction (see screenshot in previous step).
For EMPLOYEES-DETAILS
and EMPLOYEES
perform the similar .
Use the function IDL Interface pane
to rename COBOL parameter EMPLOYEES-ID
to IDL parameter ID
. Do the same for EMPLOYEE-DETAILS
: Rename to EMPLOYEE
.
Press
. The default extraction settings ensure you get useful results. The outcome is a Software AG IDL file (interface definition language), a Designer file with extension .idl:If required, a server mapping file with the same name as the IDL file but the extension .cvm may be generated too, for technical
reasons.
This file must always be stored together with the concomitant IDL file. For more information, see Server Mapping Files for COBOL in the Designer documentation.
By default, the interface name EMPLOYEE
is taken from the COBOL server program name.
EntireX allows you to extract all implemented interfaces of the COBOL server separately.
Instead of a large EMPLOYEE
interface, separate interfaces getListOfEmployees
and getDetailsOfEmployee
are extracted.
Each interface contains required parameters; obsolete parameters for an interface are suppressed, improving its usability.
To extract a COBOL server with a user-defined mapping
Shape EMPLOYEE
to getDetailsOfEmployee
:
Mark the OPERATION
field in the COBOL Interface pane and press the button.
In the pop-up window, select OPERATION-DETAILS
(red markers). The OPERATION-DETAILS
value originates from COBOL level-88 data item (blue markers).
If there is no COBOL level-88 enumeration type in the COBOL program defined, you can enter the function code manually
in the pop-up window.
By default the IDL interface gets the same name as your COBOL server: EMPLOYEE
.
Use the button from the toolbar of the COBOL Mapping Editor and change the IDL interface name to getDetailsOfEmployee
(blue markers).
This name is used as the IS service name later.
Continue shaping, making getDetailsOfEmployee
easier to use:
Use the context menu of the redefinition of the DETAIL
field in the COBOL Interface pane, FILLER REDEFINES DETAIL
and choose (blue markers). A redefinition is a secondary layout (field types) of the same memory area.
The redefinition contains more specific information (ANNUAL-SALARY
, VACATION
, etc.) than character buffer DETAIL
.
This is the reason why it is more useful in your interface.
Use the context menu of FILLER_1
in the IDL interface pane and rename FILLER_1
to DETAILS
(green markers) for a readable IS service field name later.
The DETAILS
function in the COBOL server does not make use of the EMPLOYEES
field.
Therefore you can leave it out of the interface: use the context menu of the EMPLOYEES
field in the COBOL Interface pane and choose (red markers).
Shape EMPLOYEE
to getListOfEmployees
Function:
The COBOL Mapping Editor allows you to define multiple IDL interfaces to the same COBOL server:
You create the additional IDL interface using the toolbar button getDetailsOfEmployee1
is created. The previously extracted getDetailsOfEmployee
interface still exists in the first tab.
Once you reactivate the first tab, you will see the interface of getDetailsOfEmployee
again.
Use the
button from the toolbar of the COBOL Mapping Editor and change the IDL interface name to (blue markers). This name is used as the IS service name later.For the LIST
function you need the OPERATION-LIST
value in the OPERATION
field: Mark the OPERATION
field in the COBOL Interface pane and press the button.
In the pop-up window, select OPERATION-LIST
(similar to Step 1. above Shape EMPLOYEE
to getDetailsOfEmployee
; red markers).
Use the context menu of the EMPLOYEES
field in the COBOL Interface pane, EMPLOYEES OCCURS 1 TO 99
and choose (Similar to Step 2. above Continue shaping, making getDetailsOfEmployee
easier to use; blue markers).
Because the EMPLOYEE
and EMPLOYEE-DETAIL
fields are not used in the COBOL server LIST
function, you leave them out in the IDL interface: use the context menu of EMPLOYEE-DETAIL
field in the COBOL Interface pane and choose (similar to Step 2. above Continue shaping, making getDetailsOfEmployee
easier to use; red markers). Do the same for the EMPLOYEE-ID
field.
Press Server Mapping Files for COBOL. The Software AG IDL File describes the interfaces from the client point of view, while the server mapping file contains the mapping to the real COBOL server. Both of these files must be kept together and in sync, otherwise a call to the COBOL server may fail.
to retrieve the extraction result in the form of a Software AG IDL file. At the same time, a server mapping file for COBOL (Designer file with extension .cvm) is created. SeeTo summarize: We created two IDL interfaces.
In the IDL file, these resulted in two IDL programs: getListOfEmployees
and getDetailsOfEmployee
.
Both IDL programs were given readable names (Steps 1 and 3). Meaningful fields were kept, while superfluous fields were
suppressed (Steps 1 and 3).
The program getDetailsOfEmployee
contains the redefined fields of parameter DETAILS
(see below) mapped during extraction (Step 1).
Note:
At runtime, the RPC client generated with the extracted interface will send data for the redesigned interfaces, while your
COBOL server still expects EMPLOYEE
data.
The EntireX runtime transforms the incoming data stream from the RPC client, using the server mapping file.
The following table highlights the differences when shaping an interface with a user-defined mapping compared with a fast-path extraction.
Interface Shaping with User-defined Mapping | Fast-path Extraction | |
---|---|---|
General | User-defined interface with dedicated mapping. For our example, the interfaces are small and tidy and more self-explanatory
with long, readable interface names. They are easier to use with the hidden OPERATION field and the suppressed COBOL fields, which are not needed.
|
Automatic, quick result extraction with COBOL-like interfaces on IS. For our example, the IS interface EMPLOYEE matches exactly 1:1, field by field.
|
IS service(s) | Multiple small and handy IS services; each OPERATION code is mapped to a separate IS service.
|
One big IS service. |
IS service name | Readable long name. | Short Subprogram name; up to 8 characters. |
IS fields | Usage of | and reduces the message length. This keeps focus on relevant data items and keeps the client's interface clean. It may also improve performance.The IS fields and COBOL server parameters match 1:1. As COBOL layout descriptions are sometimes used for many different purposes, irrelevant data items appear and clutter up the IS interface. |
OPERATION parameter
|
Suppressed: the OPERATION parameter does not exist in the IS service as an IS field.
|
The OPERATION parameter exists in the IS service as an IS field and needs to be filled-in by the client endpoint.
|
OPERATION code
|
The OPERATION code is provided internally by EntireX runtime in the OPERATION field.
|
The OPERATION code needs to be specified in the IS service in the OPERATION field by the client endpoint.
|
REDEFINE parameters
|
Either the parameter that is redefined or one of its redefinitions is available as an IS field. | Only the parameter that is redefined is available as an IS field. Redefinitions of the parameter are not available as IS fields. |
A user-defined mapping enables you also to define alternative mappings for COBOL data items (REDEFINE
s, tables etc.).
These enable scenarios with COBOL servers where data exchange is not fully described by the LINKAGE SECTION
COBOL data items.
For more information refer to the IDL Extractor for COBOL documentation:
Mapping Editor IDL Interface Mapping Functions if check-box Input Message same as Output Message was checked.
Mapping Editor IDL Interface Mapping Functions if check-box Input Message same as Output Message was cleared.
The following pictures use the extraction results described under Extracting a COBOL Server - Modern Method with User-defined Mapping.
To test the extraction results (optional)
You can test the results of the extraction operation and the COBOL server back end, using the EntireX IDL Tester. From the context menu of the IDL file in the Designer, choose
.Select getDetailsOfEmployee.
Note that the broker and server parameters contain the explicit route to call the server program, and you can optionally ping the connection from this client. With the
> dialog, you can set:User and Password for broker authentication
RPC User ID and RPC Password for server authentication
See EntireX IDL Tester in the Designer documentation.
Check the Integration Server log, the EntireX Adapter log or the RPC logs. Applies to all connection methods.
This section describes your first steps to create a new Integration Server connection. This is described in more detail under Using the Integration Server Wrapper, for example working with existing Integration Server connections. This section covers the following topics:
To start the Integration Server Wrapper wizard
In the context menu of a Software AG IDL file, choose
.This starts the wizard with a list of existing Integration Server Wrapper connections.
Note:
If the selected IDL file is not valid because of a syntax error,
an error dialog comes up and the wizard does not start.
Continue with Step 2: Create a New Integration Server Connection.
To create a new Integration Server connection
Define the new Integration Server connection on the wizard page.
Notes:
Choose
and continue with Step 3: Select the Connection Type.To create a new connection
Select a connection type from the drop down list. Connection types are described under EntireX Adapter Connections in the EntireX Adapter documentation and Introduction to the Integration Server Wrapper.
Note:
The list of connection types is filtered: connection types that require a license are only shown if a corresponding license
file is available.
Reliable RPC connections are only shown if all IDL programs contain only IN parameters.
Also, if a server mapping file is available, only those connection types that support the interface type specified in
the server mapping file are shown.
Click
and continue with Step 4: Define Adapter Services for a CICS Socket Listener Connection.To create a connection and related adapter services
Select a package for the created objects.
Define a folder name. If the folder does not exist, it will be created.
Define a connection name.
Define the parameters of the connection type. For details, see the EntireX and your webMethods Integration Server Applications.
As a result, the folder will contain the connection and the adapter services (one for each IDL program). The name of a service is the same as the respective IDL program.
The default settings for the adapter services are:
the Default package; if not available, the first package
the IDL library name for the Folder Name
the IDL library name with the suffix "Connection" for the Connection Name
Note:
When creating a connection, a package dependency is added such
that the selected package depends on webMethods EntireX
(the package WmEntireX
) with the version currently used.
From the Service Development perspective, refresh the package where the connection service was written, select the adapter service and use the service test to Run Service. This invokes the adapter service through the connector service.
In case of error or unexpected results:
Check the Integration Server log, the EntireX Adapter log or the RPC logs.
Use the IDL Tester as described under Task 1 above.