ILE C/C++ Programmer's Guide

Compiling and Binding Programs and Service Programs

  1. Create service program COST from source file cost1.cpp, using the binder source member BND, located in source file QSRVSRC, in library MYLIB:
    CRTCPPMOD MODULE(MYLIB/COST1) SRCSTMF(cost1.cpp)
    CRTSRVPGM SRVPGM(MYLIB/COST) MODULE(MYLIB/COST1) SRCFILE(MYLIB/QSRVSRC)
    	SRCMBR(BND) DETAIL(*EXTENDED)
    
  2. Create program COSTDPT1 from source file costdpt1.cpp and service program COST, located in library MYLIB:
    CRTCPPMOD MODULE(MYLIB/COSTDPT1) SRCSTMF(costdpt1.cpp)
    CRTPGM PGM(MYLIB/COSTDPT1) MODULE(MYLIB/COSTDPT1) BNDSRVPGM(MYLIB/COST)
    
  3. Update service program COST to include module COST2, using the updated binder language source BNDUPD, located in source file QSRVSRC in library MYLIB:
    CRTCPPMOD MODULE(MYLIB/COST2) SRCSTMF(cost2.cpp)
    CRTSRVPGM SRVPGM(MYLIB/COST) MODULE(MYLIB/COST1 MYLIB/COST2)
    	SRCFILE(MYLIB/QSRVSRC) SRCMBR(BND) DETAIL(*EXTENDED)
    

    It is necessary to re-create the service program COST, using the two modules COST1 and COST2 and the updated version of the binder language BNDUPD, so that it supports the new cost2() function. Program COSTDPT1, which used COST before it was re-created, remains unchanged.

    In order to update service program COST, it is necessary to re-create it from the two modules COST1 and COST2, using the updated version of the binder language BNDUPD. The *EXTENDED option in the DETAIL parameter creates an extended output listing, so that you can look at the current and previous signature of COST.

  4. Create program COSTDPT2 from source file costdpt2:
    CRTCPPMOD MODULE(MYLIB/COSTDPT2) SRCSTMF(costdpt2.cpp)
    CRTPGM PGM(MYLIB/COSTDPT2) MODULE(MYLIB/COSTDPT2) BNDSRVPGM(MYLIB/COST)
     
    


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