imtkmake command

Enables you to create and deploy a COBOL program-based service interface, and generate a client to access the deployed service running on an enterprise server.


imtkmake -defmap          service=service-name
imtkmake -generate        service=service-name
imtkmake -query
imtkmake -queryAppServerList
imtkmake -queryEJBDefaults
imtkmake -deploy          type=service-type
imtkmake -showlog         deploydir=deployment-directory
imtkmake -genclient       service=service-name
imtkmake -genclientwsdl   clientwsdl=wsdl-filename
imtkmake -genclientjson   clientjson=json-filename
imtkmake -validate
imtkmake -help


Create a service interface using default mappings based on the COBOL program specified in the src= parameter.
Generate deployment files based on the parameters set, and generate a COBOL archive (.car) file containing the generated files for deployment to the enterprise server.
List the enterprise servers available for deployment.
List the available J2EE 1.4 application servers by default. Specify the j2eeversion parameter to see application servers supported for other J2EE versions.
Sets all EJB generation options to defaults.
Deploy the .car file created with -generate parameter to the enterprise server. Execute imtkmake with the -deploy parameter from the servicename.deploy directory.
Display the contents of the deployment log (deploylog.txt file).
Generate a client from the service interface, according to the specified type, such as EJB or Web Services.
Note: When specifying J2EEversion, the values 1.5 and 5 are equivalent, and the values 1.6 and 6 are also equivalent.
Generate a COBOL client from WSDL.
Generate a COBOL client from JSON Schema.
Validate the service interface.
Display information about imtkmake functions and parameters.
The full filename of the output archive file, which can be a .jar, .war, or .ear file.
The path to the application files for the application running on the enterprise server.
This is the name and version of the J2EE application server for which an EJB is generated and to which an EJB is deployed. This defines the deployment descriptors that are generated.

This is mandatory when generating EJBs and EJB clients. In other words, mandatory when using the -generate or -genclient functions with type set to EJB. The values must be within quotes since they contain spaces. For example:

  • "JBoss 5.1.0"
  • "WebSphere 7.0"

Note that this parameter must come after the other parameters.

See -queryAppServerList for how to list the available servers.

The base path used in the URI of the service.
For EJB generation, the name of the bean to generate. Defaults to service-name.
The path to and name of the .car file to deploy. By default, this file is named and is in the service.deploy directory. carname= is not required when you generate and deploy on the same command line.
For EJB generation, the classpath of the J2EE implementation classes on the J2EE application server. This is case sensitive. This is different for each J2EE application server and is the path to the following .jar files:
  • JBoss's jboss-j2ee.jar and servlet-api.jar
  • WebSphere's j2ee.jar
  • WebLogic's weblogic.jar
The directory in which to generate the client program. With the -genclientwsdl or -genclientjson function, defaults to the WSDL or JSON Schema file directory; otherwise defaults to the directory where the service is deployed.
For REST services, the name of the JSON Schema file from which to generate the client program.
The name of the WSDL file to generate the client program from which to generate it.
The default array size to use for unbounded arrays.
The default string size to use for unbounded strings.
The URL of the deploylog.txt file. This URL is displayed by the -deploy function.
The directives required for the program to compile correctly. Use a comma between directives.
The type of server on which the EJB runs - local or remote.
For EJB generation, the name of the EJB to generate. Defaults to service-nameEJB.
Enable EJB version 3 support.
The name of a file containing the run-time configuration settings to be applied when the deployed service is run. The file extension must be .rtc.
For Web Services generation, the name of a user exit program to handle the exit points in the MFRHSOAP request handler.
The name of a file containing a list of additional files that need to be included in a .car file. Each file name must be on a new line.
An additional file that needs to be included in a .car file. You can specify multiple additional files.
The J2EE version.
For EJB generation, the name of the .jar file to create. Defaults to service-name.jar.
The path to the javac.exe file.
For Web Services generation, EJB generation and client generation, the service namespace. Web Services generation and client generation defaults to EJB generation defaults to service-name .
For EJB generation, the name of the package of Java classes to contain the bean. This is case-sensitive. Defaults to com.mypackage.service-name.
The password to enable a service interface to be deployed to a secure server. This is required only when MFDS is configured to require it.
The setting for the associated SEP (Service Execution Process) attribute. SEP attributes are only meaningful when transactional=yes.
The destination of the deployment files. server-name is the enterprise server to which you want to deploy the service, and deployer-name is the name of a deployment service on that enterprise server. If you do not supply this parameter, the function lists the servers available for deployment and prompts you to choose one.
The name of the host machine that is running the enterprise server for the J2SE Java bean.
The port number of the enterprise server listener for the J2SE Java bean
The name of the service for mapping or generation.
For EJB generation, the type of EJB to generate. Defaults to stateless.
The name of a file containing the set properties for this service interface.
The program use for creating default mappings.
style={doclit | rpcenc}
The style to use for WSDL generation. The default is doclit.
Specifies whether the service is application-managed or transaction-managed. The default is application.
For EJB generation, whether or not the EJB service executes in a transactional context. When set to yes, session=stateful by default.
Transaction attribute used for EJB default mapping. Can be one of the following:
  • notSupported
  • mandatory
  • never
  • required
  • requiresNew
The type of mapping to perform or type of client to generate (see defmapgenclient and generate above), where service-type can be one of the following:
  • EJB
  • J2SEbean
  • WebService
  • REST
For Web Services and client generation, the IP address of the service. This is added to the WSDL document or JSON Schema.
The username that enables a service interface to be deployed to a secure server. This is required only when MFDS is configured to require it.
The service version used in the URI of the service.


  • Execute imtkmake from an Enterprise Developer command prompt in the directory that contains your COBOL program file.
  • This command performs several functions. You must execute the following against the same program in the this order:
    • -defmap
    • -generate
    • -query (optional)
    • -deploy
    • -showlog (optional)
    • -genclient and/or -genwsdl (optional)
  • You can combine some functions on the same command line:
    • -defmap and -generate together, to create a service interface with default mappings and generate deployment files to be deployed at a later time.
    • -generate and -deploy together, to generate deployment files for an existing service interface, deploy them to an enterprise server.
    • -defmap, -generate, and -deploy together to perform all three functions.
    Note: When you combine two or more functions on the same command line, you do not need to repeat parameters that are common.
  • You can combine the use of the command line functions with the use of the Service Interfaces feature. For example, you might create the service interface and customize it. You could then use the command line to deploy the service interface.
  • If you use the Service Interfaces feature to specify mapping properties for the service interface using the Mapping Properties dialog box, Enterprise Developer creates an XML file to hold the settings. You can specify this XML file to the -generate function using the settings=properties-filename parameter. The mapping properties XML file contains values for the optional parameters associated with the -generate function. If you specify any of those parameters on the command line, these override the values contained in the mapping properties XML file.
  • You can use () as delimiters around parameters rather than = before them, for example, src(book.cbl) instead of src=book.cbl.
  • When you deploy a service interface using imtkmake -deploy, imtkmake looks in the following places in the following order to find items to deploy, and uses the first instance of each deployable item found:
    • MFDS. If the deployment items are in MFDS, any configuration settings in the [destination] section are used. For example:
         listener=Web Services and J2EE
    • MFDS. If the deployment itemsare in MFDS, but there aren't any configuration settings, imtkmake uses the enterprise server that owns the service.


The following command creates a service interface with default mapping for the program book.cbl:

imtkmake -defmap src=book.cbl service=wmapserv 

The following command generates a Web service for the wmapserv service interface:

imtkmake -generate service=wmapserv

The following command generates an EJB for the JMapServ service interface:

imtkmake -generate service=JMapServ
                   appserver="WebLogic 10.3.5"

The following command generates a Web service for the wmapserv service interface and deploys it to the enterprise server ESDEMO. The additional data file data-files-path\bookfile.dat (Windows) or data-files-path/bookfile.dat (UNIX) is deployed:

On Windows platforms:

imtkmake -generate service=wmapserv type=webservice
         -deploy server=ESDEMO,Deployer data-files-path\bookfile.dat

On UNIX platforms:

imtkmake -generate service=wmapserv type=webservice
         -deploy server=ESDEMO,Deployer data-files-path/bookfile.dat

The following command deploys a Web service that has already been generated in to the enterprise server ESDEMO:

imtkmake -deploy 

This submit is a successful deployment, as indicated by the 202 return code, and the presence of the URL in the response message.

The following command displays the deploylog.txt file from the URL

imtkmake -showlog deploydir=

The following command creates a COBOL client program for the service wmapserv:

imtkmake -genclient type=webservice 

The following command creates a COBOL client program for the REST service service1 using the base path /servicesApp/ and version 1.0:

imtkmake -genclient service=service1 type=rest 

The following command creates a COBOL client program for the service wmapserv using the service's WSDL file:

On Windows platforms:

imtkmake -genclientwsdl clientwsdl=wmapserv.wsdl 

On UNIX platforms:

imtkmake -genclientwsdl clientwsdl=$PWD/wmapserv.wsdl 

The following command creates an EJB service interface with default mapping using the requiresNew transaction attribute:

imtkmake -defmap type=ejb 

The following command generates the required files for the REST service service1 using the base path /servicesApp/ and version 1.0:

imtkmake -generate type=rest

The following command creates a COBOL client program for the wmapserv service using its JSON Schema file:

imtkmake -genclientjson clientjson=wmapserv.json