The following example shows:
The example
Example:
CRTSRVPGM SRVPGM(MYLIB/SP1) MODULE(MYLIB/M2) SRCFILE(MYLIB/QSRVSRC) SRCMBR(BNDLANG1) OPTION(*UNRSLVREF)
Because the *UNRSLVREF option is specified, service program SP1 is created even though the import request for func2() is not resolved.
CRTSRVPGM SRVPGM(MYLIB/SP2) MODULE(MYLIB/M3) SRCFILE(MYLIB/QSRVSRC) SRCMBR(BNDLANG2) BNDSRVPGM(MYLIB/SP1)
Because service program SP1 now exists, the binder resolves all the import requests required, and service program SP2 is created successfully.
CRTSRVPGM SRVPGM(MYLIB/SP1) MODULE(MYLIB/M2) SRCFILE(MYLIB/QSRVSRC) SRCMBR(BNDLANG1) BNDSRVPGM(MYLIB/SP2)
Although service program SP1 does exist, the import request for func2() is not resolved. Therefore, the re-creation of service program SP1 is required. Because service program SP2 now exists, the binder resolves all import requests required and, service program SP1 is created successfully.
CRTPGM PGM(MYLIB/A) MODULE(MYLIB/M1) BNDSRVPGM(MYLIB/SP1 MYLIB/SP2)
Because service programs SP1 and SP2 do exist, the binder creates the program A.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.