Example 1: Adding a new source to the system

A replacement for the source IFBSRC01 is in a partitioned data set referred to by the ddname REPLACE. The distribution library for the source is SYS1.IFBSRC; SYS1.AOS23 is the distribution library for the module, IFBSRC01, resulting from the assembly of the source, IFBSRC01.

Here is an example of a SYSMOD containing a ++SRC statement that causes SMP/E to install the source code, assemble it, and save the resulting module in the DLIBs:
++USERMOD(USR0001)          /* User modification        */.
++VER(Z038) FMID(FXY1040)   /* for user function in MVS.*/.
++SRC(IFBSRC01)             /* Replace source           */
            DISTLIB(IFBSRC) /* in this DLIB.            */
            DISTMOD(AOS23)  /* MOD goes in this DLIB.   */
            TXLIB(REPLACE)  /* Replacement SRC is here. */.
The following DD statements are required when the SYSMOD is applied:
//REPLACE  DD DSN=…
//SMPSTS   DD DSN=SYS1.SMPSTS,DISP=OLD
plus whatever other DD statements are required based on which load modules the assembled source is to be linked to. These load modules should be identified by JCLIN, either as a separate step or within the SYSMOD itself. Assuming the load module was composed of only this one module, the following ++JCLIN MCS can be added to the SYSMOD after the ++VER statement.
++JCLIN.                    /* JCLIN to get SRC linked. */
//JOB1     JOB 'accounting info',MSGLEVEL=(1,1)
//STEP1    EXEC PGM=IEBCOPY
//AOS23    DD DSN=SYS1.AOS23,DISP=SHR
//LPALIB   DD DSN=SYS1.LPALIB,DISP=SHR
//SYSIN    DD *
 COPY INDD=AOS23,OUTDD=LPALIB
 SELECT M=(IFBSRC01)
/*
In this case, you also need the following DD statement when the SYSMOD is applied:
//LPALIB   DD DSN=SYS1.LPALIB,DISP=OLD
The following DD statements are required when the SYSMOD is accepted:
//REPLACE  DD DSN=…
//IFBSRC   DD DSN=SYS1.IFBSRC,DISP=OLD
//AOS23    DD DSN=SYS1.ASO23,DISP=OLD