Version 9.5 SP1
 —  EntireX COBOL Wrapper  —

Using the COBOL Wrapper in Command-line Mode

Commands are available to generate a COBOL RPC client or COBOL RPC server from a specified IDL file.

This document covers the following topics:

See also Server Mapping Deployment in Command-line Mode.


Command-line Options

This section provides the command-line options for the following tasks:

See Using the EntireX Workbench in Command-line Mode for the general command-line syntax.

Generate a COBOL RPC Client from IDL File

To generate a COBOL RPC client from the specified IDL file, use the following command with options in table below:

-cobol:client
Option Description
-comm The RPC communication area. Valid values: EXTERNAL, LINKAGE, COPYBOOK. See RPC Communication Area for more information.
EXTERNAL External Clause
LINKAGE Linkage Section
COPYBOOK Copybook

For possible combinations with -target and –interface option, see below.

-folder Folder where the COBOL files will be stored.
-help Display this usage message.
-interface Interface type, either DFHCOMMAREA or LINKAGE.

For possible combinations with -target and –comm option, see below.

-literal Enclose string literals in quotes or apostrophes. Valid values: QUOTE, APOST. See Characters Used for String Literals for more information.
-target Target operating system and environment, one of BATCH_ZOS, BATCH_VSE, BATCH_BS2000, BATCH_I5OS, CICS_ZOS, CICS_VSE, IMS_MPP, IMS_BMP, IDMS_ZOS, MICROFOCUS_WINDOWS or MICROFOCUS_UNIX. See Client Interface Types for more information. For possible combinations with the -interface and -comm option.
-target -interface -comm Usage for
CICS_ZOS DFHCOMMAREA LINKAGE CICS with DFHCOMMAREA calling convention for z/OS.
LINKAGE LINKAGE EXTERNAL COPYBOOK CICS with standard linkage calling convention for z/OS.
CICS_VSE DFHCOMMAREA LINKAGE CICS with DFHCOMMAREA calling convention for z/VSE.
LINKAGE LINKAGE EXTERNAL CICS with standard linkage calling convention for z/VSE.
BATCH_VSE LINKAGE LINKAGE EXTERNAL Batch with standard linkage calling convention for z/VSE.
BATCH_BS2000 LINKAGE LINKAGE EXTERNAL Batch with standard linkage calling convention for BS2000/OSD.
BATCH_I5OS LINKAGE LINKAGE EXTERNAL Batch with standard linkage calling convention for IBM i.
BATCH_ZOS LINKAGE LINKAGE EXTERNAL Batch with standard linkage calling convention for z/OS.
IMS_BMP LINKAGE LINKAGE EXTERNAL COPYBOOK IMS BMP with standard linkage calling convention for z/OS.
IMS_MPP LINKAGE LINKAGE EXTERNAL COPYBOOK IMS MPP with standard linkage calling convention for z/OS.
IDMS_ZOS LINKAGE LINKAGE EXTERNAL COPYBOOK IDMS_ZOS with standard linkage calling convention for z/OS.
MICROFOCUS_WINDOWS LINKAGE LINKAGE EXTERNAL COPYBOOK Micro Focus with standard calling convention for Windows.
MICROFOCUS_UNIX LINKAGE LINKAGE EXTERNAL COPYBOOK Micro Focus with standard calling convention for various UNIX operating systems.
-copybooklevel Define the begining level for COBOL data items in generated copybooks, see Starting COBOL Level for Data Items in Generated Copybooks. Valid values: 1-49.
-rpcservice Option to generate the generic RPC service module COBSRVI. See Generate Generic RPC Service for Module COBSRVI. Valid values:
TRUE - Generate generic RPC service module.
FALSE - Do not generate the generic RPC service module.

Generate a COBOL RPC Server from IDL File

To generate a COBOL RPC server from the specified IDL file, use the following command with options in table below:

-cobol:server
Option Description
-channel A CICS channel name can be provided for the interface type 'CICS with Channel Container calling convention'. See Using the COBOL Wrapper for CICS with Channel Container Calling Convention (z/OS). See also Channel Name.
-folder Folder where the COBOL files will be stored.
-help Display this usage message.
-interface Interface type, one of DFHCOMMAREA, DFHLBUFFER, DFHCHANNEL or LINKAGE. See table below for possible combinations.
-literal Enclose string literals in quotes or apostrophes. See Characters Used for String Literals.
-target Target operating system and environment. For possible combinations with option -interface, see below and also Server Interface Types.
-target -interface Usage for
CICS_ZOS DFHCOMMAREA CICS with DFHCOMMAREA calling convention for z/OS.
DFHLBUFFER CICS with DFHCOMMAREA large buffer interface for z/OS.
DFHCHANNEL CICS with Channel Container calling convention for z/OS.
CICS_VSE DFHCOMMAREA CICS with DFHCOMMAREA calling convention for z/VSE.
DFHLBUFFER CICS with DFHCOMMAREA large buffer interface for z/VSE.
BATCH_VSE LINKAGE Batch with standard linkage calling convention for z/VSE.
BATCH_BS2000 LINKAGE Batch with standard linkage calling convention for BS2000/OSD.
BATCH_I5OS LINKAGE Batch with standard linkage calling convention for IBM i.
BATCH_ZOS LINKAGE Batch with standard linkage calling convention for z/OS.
IMS_BMP LINKAGE IMS BMP with standard linkage calling convention for z/OS. This target may require a PSBLIST. See below.
MICROFOCUS_WINDOWS LINKAGE Micro Focus with standard linkage calling convention for Windows.
MICROFOCUS_UNIX LINKAGE Micro Focus with standard linkage calling convention for various UNIX operating systems.
-psblist An IMS PSB list containing IMS PCB pointers can be provided for the server interface type IMS BMP with standard linkage calling convention. See Using the COBOL Wrapper for IMS BMP (z/OS) for scenarios on PCB pointer usage. See also IMS PSB List.

Top of page

Example Generating an RPC Client

<workbench> -cobol:client /Demo/example.idl -target CICS_ZOS

where <workbench> is a placeholder for the actual Workbench starter as described under Using the EntireX Workbench in Command-line Mode.

The name of the IDL file includes the project name. In the example, the project Demo is used. If the IDL file name describes a file inside the Eclipse workspace, the name is case-sensitive.

If the first part of the IDL file name is not a project name in the current workspace, the IDL file name is used as a relative (based on the IDL file) or absolute file name in the file system. Thus, the IDL files do not need to be part of an Eclipse project.

If you do not specify a folder (option -folder), the generated COBOL source files (client interface objects and the client declarations) will be stored in parallel to the IDL file, in the generated subfolders client and include, e.g. Demo/client and Demo/include.

Top of page

Example Generating an RPC Server

<workbench> -cobol:server /Demo/example.idl -target CICS_ZOS

where <workbench> is a placeholder for the actual Workbench starter as described under Using the EntireX Workbench in Command-line Mode.

The generated COBOL source files (server (skeletons))

Top of page

Further Examples

Windows

Example 1

<workbench> -cobol:client C:\Temp\example.idl -folder src -target CICS_ZOS

Uses the IDL file C:\Temp\example.idl and generates the COBOL source files to the subfolder src of the IDL file. Slashes and backslashes are permitted in the file name. Output to standard output:

Using workspace file:\C:\myWorkspace\.
Run COBOL client wrapper with C:/Temp/example.idl and target CICS_ZOS.
Processing IDL file C:/Temp/example.idl
Store COBOL Source (1/2): C:\Temp\src/include/CALC
Store COBOL Source (2/2): C:\Temp\src/client/CALC
Exit value: 0

Example 2

<workbench> -cobol:client C:\Temp\*idl -folder C:\Temp\src -target CICS_ZOS

Generates COBOL source files for all IDL files in C:\Temp.

Example 3

<workbench> -cobol:client /Demo/example.idl -target CICS_ZOS

Uses the IDL file /Demo/example.idl and generates the COBOL source files in parallel to the IDL file, here to the project /Demo.

Example 4

<workbench> -cobol:client -help

or

<workbench> -help -cobol:client

Both calls result in displaying a short help for the COBOL client wrapper.

Linux

Example 1

<workbench> -cobol:client /Demo/example.idl -folder src -target CICS_ZOS

If the project Demo exists in the workspace and example.idl exists in this project, this file is used. Otherwise, /Demo/example.idl is used from file system. The generated output will be stored in /Demo/src, the subfolder of /Demo.

Example 2

<workbench> -cobol:client /Demo/*.idl -folder src -target CICS_ZOS

Generates COBOL client interface objects for all IDL files in project Demo (or in folder /Demo if the project does not exist). The generated files are in /Demo/src.

Example 3

<workbench> -cobol:client -help

or

<workbench> -help -cobol:client

Both calls result in displaying a short help for the COBOL client wrapper.

Top of page