ILE C/C++ Programmer's Guide


Creating an Export Service Program Using Binder Language

The Create C++ Module (CRTCPPMOD) command creates only one module at a time. You must use the CRTCPPMOD for each source stream file or source file member. The following example consists of two modules: SEARCH asnd WHERE.

Example:

To use binder language to create the service program described in Creating, Compiling, and Binding a Service Program, follow these steps:

  1. To create modules from all source files enter the following commands:
    CRTCPPMOD MODULE(MYLIB/SEARCH) SRCSTMF(search.cpp)
    CRTCPPMOD MODULE(MYLIB/WHERE) SRCSTMF(where.cpp)
     
    
    Note:
    The CRTCPPMOD command stops the compilation process afer the creation of the *MODULE object. The binder is not invoked.
  2. To create the corresponding binder language source file, enter the following command:
    RTVBNDSRC MODULE(MYLIB/SEARCH MYLIB/WHERE)
    	SRCFILE(MYLIB/QSRVSRC) SRCMBR(TWO)
    

    This command creates the binder language source file shown in Figure 13.

  3. To create service program SERVICE2, enter the following command:
    CRTSRVPGM SRVPGM(MYLIB/SERVICE2) MODULE(MYLIB/SEARCH MYLIB/WHERE)
          SRCFILE(MYLIB/QSRVSRC) SRCMBR(TWO)
    

Figure 13. Binder Language Source File Generated by the RTVBNDSRC Command


+--------------------------------------------------------------------------------+
| Columns . . . :    1  71           Browse                       MYLIB/QSRVSRC  |
| SEU==>   TWO                                                                   |
| FMT **  ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7  |
|        *************** Beginning of data ************************************* |
|0000.01 STRPGMEXP PGMLVL(*CURRENT)                                              |
|0000.02 /*********************************************************************/ |
|0000.03 /*   *MODULE      SEARCH       MYLIB        95/06/11  15:30:51*/        |
|0000.04 /*********************************************************************/ |
|0000.05   EXPORT SYMBOL("__ct__6SearchFPc")                                     |
|0000.06   EXPORT SYMBOL("__ct__6SearchFPUc")                                    |
|0000.07   EXPORT SYMBOL("__ct__6SearchFPUci")                                   |
|0000.08 /*********************************************************************/ |
|0000.09 /*   *MODULE      WHERE        MYLIB        95/06/11  15:30:51*/        |
|0000.10 /*********************************************************************/ |
|0000.11   EXPORT SYMBOL("where__6SearchFPUci")                                  |
|0000.12 ENDPGMEXP                                                               |
|        ****************** End of data **************************************** |
|                                                                                |
+--------------------------------------------------------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents ]