Creating a COBOL call stub Java class
If you want to call a COBOL module from a Java™ batch plain old Java object (POJO) in the batch environment, you must first create a COBOL call stub Java class.
Procedure
- Install the COBOL call stub generator.
The COBOL call stub generator tool compressed file can be found in the <was-home>/lib directory of your batch installation. Extract the file anywhere on your workstation.
支援的配置: The COBOL call stub generator tool requires Java 1.6.sptcfg
- Create a COBOL call stub generator properties file for your system. Read the Creating a call stub generator configuration file topic for more information.
- Use the COBOL call stub generator tool to create a COBOL
call stub Java class; for example:
$ cd COBOLCallStubGenerator $ java –jar lib/COBOLCallStubGenerator.jar testcases/Sample01.cbl \ -configFile csg.properties –callStubPackage com.ibm.ws.batch.ilc.sample \ -callStubClass Sample
The COBOL call stub generator tool can also be invoked from within Rational® Application Developer. Read the Generating COBOL call stubs topic for more information about the tool.
The generated code is written to the src directory of the Rational Application Developer workspace and project directory you specify on the WorkSpace and EclipseProjectName properties in the csg.properties file, which is found in the COBOL call stub generator install directory (/COBOLCallStubGenerator).
The COBOL call stub generator tool then writes Sample.java to the following directory:
and any data binding classes for the linkage section variable used on the PROCEDURE statement to the following directory:${WorkSpace}/${EclipseProjectName}/src/com/ibm/ws/batch/ilc/sample
${WorkSpace}/${EclipseProjectName}/src/com/ibm/ws/batch/ilc/sample/parameters


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tgrid_generate_javacall_stubs
檔名:tgrid_generate_javacall_stubs.html