Example 4: Deleting a function without replacing it (dummy delete)

Assume you no longer need a particular function, and you want to delete it from your system. First, you must make sure that no other functions depend on the function you want to delete. Once you have done this, you need to define a dummy function SYSMOD that deletes the function you want to delete. You then receive, apply, and accept the dummy function, and run UCLIN to delete the SYSMOD entries for the deleted function and for the dummy function.

For example, assume you are ready to delete function MYFUNC1 using dummy function DELFUNC. MYFUNC1 is applicable to SREL Z038 and is installed in target zone TGT1 and distribution zone DLIB1. Here is an example of the dummy function:
++FUNCTION(DELFUNC)     /* Any valid unique SYSMOD ID.   */.
++VER(Z038)             /* For SREL Z038 (MVS products). */
     DELETE(MYFUNC1)    /* Deletes MYFUNC1.              */.
These are the commands you use to receive and install the dummy function, and to delete the SYSMOD entries for the dummy function and the deleted function:
SET     BDY(GLOBAL)      /* Set to global zone.       */.
RECEIVE S(DELFUNC)       /* Receive the function.     */.
SET     BDY(TGT1)        /* Set to applicable target. */.
APPLY   S(DELFUNC)       /* Apply to delete old       */
                         /* function.                 */.
SET     BDY(DLIB1)       /* Set to applicable DLIB.   */.
ACCEPT  S(DELFUNC)       /* Accept to delete old      */
                         /* function.                 */.
SET     BDY(TGT1)        /* Set to applicable target. */.
UCLIN.
DEL     SYSMOD(DELFUNC)  /* Delete SYSMOD entries for */.
DEL     SYSMOD(MYFUNC1)  /* dummy and old function.   */.
ENDUCL.
SET     BDY(DLIB1)       /* Set to applicable DLIB.   */.
UCLIN.
DEL     SYSMOD(DELFUNC)  /* Delete SYSMOD entries for */.
DEL     SYSMOD(MYFUNC1)  /* dummy and old function.   */.
ENDUCL                   /*                           */.

When you accept the dummy function, SMP/E automatically deletes the associated SYSMOD entry from the global zone and the MCS entry from the SMPPTS.

To complete the cleanup, you should also use the REJECT command to delete any SYSMODs and HOLDDATA applicable to the dummy function and the old function. In addition, you should delete the FMIDs from the GLOBALZONE entry to prevent SMP/E from receiving any SYSMODs or HOLDDATA applicable to either of those functions. Here are examples of the commands you can use to do this.
SET    BDY(GLOBAL)       /* Set to global zone.       */.
REJECT HOLDDATA NOFMID   /* Reject SYSMODs, HOLDDATA  */
       PRODUCT           /* PRODUCT information       */
       DELETEFMID        /* for the deleted functions.*/
       (DELFUNC MYFUNC1) /* Delete the FMIDs from the */
                         /* GLOBALZONE entry.         */.
Note: If you delete a function that used totally copied libraries, there will be DLIB entries left in the zone after the deletion, which may cause problems if this function is later reinstalled. You should run UCLIN to delete the leftover DLIB entries to ensure that SMP/E will create new DLIB entries that point to the proper libraries when a new copy of the function is installed.