OpenTP1 Version 7 Programming Reference COBOL Language

[Contents][Index][Back][Next]

Appendix A.2 How to create stubs of application programs that use both OpenTP1 remote procedure calls and XATMI-interfaced API functions

This section explains how to create the stubs of UAPs that are called from CBLDCRPC('CALL ') and call XATMI interface functions (TPCALL, etc). To create the UAP:

  1. Create an interface definition file.
    For the file to be created, specify the RPC and XATMI interface definitions (for the client). Suffix the file name with .def.
  2. Execute the stbmake command or tpstbmk command.
    Specify the required arguments for the stbmake command, and execute the command. Execution of the command creates the declaration files listed below. xxxxx indicates a character string of an interface definition file name from which .def is excluded.
    • OpenTP1 RPC stub source file (default file name: xxxxx_sstb.c)
    • XATMI stub source file (default file name: xxxxx_stbx.c)
    • XATMI stub header file (default file name: xxxxx_stbx.h)
    • XATMI stub copy file (the file name consists of the subtype name followed by .cbl)
    If the RPC interface definition and XATMI interface definition coexist, the XATMI stub source file, XATMI stub header file and XATMI stub copy file are created.
  3. Compile the stub source files and link them with a UAP.
    Compile the source files created in step 2. with the C compiler, and link them with a UAP.