CRTCPPMOD MODULE(MYLIB/DUMMY) SRCSTMF(dummy.cpp) CRTSRVPGM SRVPGM(MYLIB/PRINT) MODULE(MYLIB/DUMMY) EXPORT(*ALL)
CRTCPPMOD MODULE(MYLIB/MYPROG) SRCSTMF(myprog.cpp) CRTPGM PGM(MYLIB/MYPROG) MODULE(MYLIB/MYPROG) BNDSRVPGM(MYLIB/PRINT) OPTION(*UNRSLVREF)
The option *UNRSLVREF ensures that the program binds to the service program, although there is no matching export for MYPROG's import void print(char *).
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.