OpenTP1 Version 7 Programming Reference COBOL Language
UAPs used with the OpenTP1 require libraries for fulfilling inter-UAP service requests. One of these libraries is called a stub.
Of all UAPs used with OpenTP1, UAPs having service programs (SPP, MHP) require a stub. However, a stub is not required when all service functions are put in the UAP shared library from where they are dynamically loaded. The UAP shared library is a shared library created by linking the UAP object files compiled from UAP source files.
Note that neither UAPs that handle offline work nor SUPs require a stub because they do not have a service function.
Before creating a stub, create a file (RPC interface definition file) in which UAP service programs are defined. Execute the stbmake command with this file as the argument.
When the stbmake command is executed, a source file (C-language source file) for the stub is created. Compile this file with the C-language compiler and link it to the object file of the UAP.
When modifying the stub, create the UAP from scratch. Modify the RPC interface definition file, recreate the stub, and link it to the object file of the recompiled UAP.
The figure below shows the stub creation procedure.
Figure 1-7 Stub creation procedure
When creating a stub, create a file which defines program IDs to the SPP and MHP services. What is defined here is called the RPC interface definition. The file containing this definition is called the RPC interface definition file.
Create an RPC interface definition file for each executable file of the SPP or MHP.
Write the RPC interface definition in the following format:
entry "program-ID"["program-ID"...]; |
entry "sv01"; entry "sv02"; |
entry "sv01" "sv02"; |
The name of an RPC interface definition file must be appended with a suffix.def which indicates that the file is an RPC interface definition file. The RPC interface definition file may be placed under any directory that the stbmake command can search.
The name of an RPC interface definition file is up to 255 characters long. Note, however, that a lower upper limit is used under some OSs.
After the stbmake command is executed, stub source files are created under names different from those in the RPC interface definition file. Therefore, the RPC interface definition file will not be used when the OpenTP1 is active.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.