PROGRAM entry (distribution and target zone)

The PROGRAM entry describes a program element (a pre-built load module or a program object). Program elements may exist in distribution or target libraries. A PROGRAM entry is created the first time you install a SYSMOD that contains a ++PROGRAM MCS for a program element that does not yet have a PROGRAM entry.

SMP/E records the function and service level of the program element in the entry. Once a PROGRAM entry exists, it is updated as subsequent SYSMODs that affect the program element are installed.

Subentries

These are the subentries for the PROGRAM entry as they appear in the LIST output:
name
is the name of the program element represented by the entry. It can contain from 1 to 8 alphanumeric characters and $, #, @, or hex C0.
ALIAS
specifies a list of alias names for the element.

The UCL operand is ALIAS(name).

Each alias name can contain from 1 to 8 alphanumeric characters.

DISTLIB
specifies the ddname of the distribution library for the program element.
The UCL operand is DISTLIB(ddname).
  • The ddname can contain from 1 to 8 alphanumeric characters.
  • The DISTLIB subentry is required. Without it, SMP/E cannot process any changes for the program element.
FMID
specifies the functional owner of this program element. The functional owner is the last function SYSMOD that replaced this element.

The UCL operand is FMID(sysmod_id).

The SYSMOD ID must contain 7 alphanumeric characters.

LASTUPD
identifies the cause of the last change to this PROGRAM entry.
The UCL operand is LASTUPD(value). This subentry can contain one of the following values:
UCLIN
indicates that the change was made as a result of UCLIN processing.
sysmod_id
indicates that the change was made during the installation of the indicated SYSMOD.

The SYSMOD ID must contain 7 alphanumeric characters.

LASTUPD TYPE
indicates how the entry was last changed.
The UCL operand is LASTUPDTYPE(value). This subentry may contain one of the following values:
ADD
The entry was added.
UPD
The entry was updated.
RMID
identifies the last SYSMOD that replaced this program element. Any subsequent SYSMOD that modifies this program element must have a defined relationship (such as PRE or SUP) with this SYSMOD.
The UCL operand is RMID(sysmod_id).
  • The SYSMOD ID must contain 7 alphanumeric characters.
  • If RMID is not specified but FMID is, SMP/E sets the RMID value to the specified FMID.
SYSLIB
specifies the ddname of the target library for the program element.
The UCL operand is SYSLIB(ddname).
  • You can specify only one SYSLIB value.
  • The ddname can contain from 1 to 8 alphanumeric characters.

LIST Examples

To list all the PROGRAM entries in a particular zone, you can use the following commands:
SET      BDY(TGT1)          /* Set to requested zone.   */.
LIST     PROGRAM            /* List all PROGRAM entries.*/.
To list specific PROGRAM entries, you can use these commands:
SET      BDY(TGT1)          /* Set to requested zone.   */.
LIST     PROGRAM(PGM1       /* List only these two      */
             PGM2)          /* entries.                 */.
The format of the LIST output for each PROGRAM entry is the same for both of these commands. The only difference is the number of PROGRAM entries listed. Figure 1 is an example of LIST output for PROGRAM entries.
Figure 1. PROGRAM entry: sample LIST output
PAGE nnnn  - NOW SET TO zzzzzz ZONE nnnnnnn  DATE mm/dd/yy TIME hh:mm:ss SMP/E 36.nn SMPLIST OUTPUT

TGT1          PROGRAM ENTRIES


  NAME

PGM1      LASTUPD         = MYPROG1 TYPE=ADD
          LIBRARIES       = DISTLIB=ADSTLIB   SYSLIB=SPGMLIB
          FMID            = MYPROG1
          RMID            = MYPROG1

PGM2      LASTUPD         = PGMPTF1 TYPE=ADD
          LIBRARIES       = DISTLIB=ADSTLIB   SYSLIB=SPGMLIB
          FMID            = MYPROG1
          RMID            = PGMPTF1
By specifying the FORFMID operand, you can reduce the number of PROGRAM entries listed. When FORFMID is specified, SMP/E lists a PROGRAM entry only if its FMID matches one of the FMIDs specified on the FORFMID operand. For example, to list PROGRAM entries whose FMIDs are defined in FMIDSET ABC or else are MYPROG1, you can use these commands:
SET      BDY(TGT1)          /* Set to target zone.      */.
LIST     PROGRAM            /* List all PROGRAM entries */
         FORFMID(ABC        /* for the ABC FMIDSET      */
                 MYPROG1)   /* and FMID MYPROG1.        */.
You can use the LIST command to find out the names of all SYSMODs that have modified program elements. To include the names of these SYSMODs in the LIST output, you can use the XREF operand, as shown in these commands:
SET      BDY(TGT1)          /* Set to requested zone.   */.
LIST     PROGRAM            /* List all PROGRAM entries */
         XREF               /* and related SYSMODs.     */.
Note:
  1. You can use XREF in either mass mode or select mode.
  2. SMP/E obtains the data included for the XREF operand by checking for entries for this program element in all the SYSMOD entries. Because this data is not contained in the PROGRAM entry itself, you cannot use UCLIN to change it in the PROGRAM entry.
Figure 2 is an example of the LIST output produced when the XREF operand is used.
Figure 2. PROGRAM entry: sample LIST output when XREF is specified
PAGE nnnn  - NOW SET TO zzzzzz ZONE nnnnnnn  DATE mm/dd/yy TIME hh:mm:ss SMP/E 36.nn SMPLIST OUTPUT

TGT1          PROGRAM ENTRIES


  NAME

PGM1      LASTUPD         = MYPROG1 TYPE=ADD
          LIBRARIES       = DISTLIB=ADSTLIB   SYSLIB=SPGMLIB
          FMID            = MYPROG1
          RMID            = MYPROG1
          SYSMOD HISTORY  = SYSMOD   TYPE      DATE   MCS     --STATUS--
                            MYPROG1  FUNCTION 07.100  PROGRAM   APP    ACC

PGM2      LASTUPD         = PGMPTF1 TYPE=ADD
          LIBRARIES       = DISTLIB=ADSTLIB   SYSLIB=SPGMLIB
          FMID            = MYPROG1
          RMID            = PGMPTF1
          SYSMOD HISTORY  = SYSMOD   TYPE      DATE   MCS     --STATUS--
                            PGMPTF1  PTF      07.150  PROGRAM   APP    ACC

UNLOAD Examples

To dump the PROGRAM entries in UCL format, you can use the UNLOAD command. To unload all the PROGRAM entries in a particular zone, you can use the following commands:
SET      BDY(TGT1)          /* Set to requested zone.     */.
UNLOAD   PROGRAM            /* Unload all PROGRAM entries.*/.
To unload specific PROGRAM entries, you can use these commands:
SET      BDY(TGT1)          /* Set to requested zone.     */.
UNLOAD   PROGRAM(PGM1       /* Unload only these two      */
            PGM2)           /* entries.                   */.
The format of the UNLOAD output for each PROGRAM entry is the same for both of these commands. The only difference is the number of PROGRAM entries listed. Figure 3 is an example of UNLOAD output for PROGRAM entries.
Figure 3. PROGRAM entry: sample UNLOAD output
UCLIN .
REP       PROGRAM         ( PGM1     )
          LASTUPD         ( MYPROG1  )
          LASTUPDTYPE     ( ADD )
          DISTLIB         ( ADSTLIB  )
          SYSLIB          ( SPGMLIB  )
          FMID            ( MYPROG1 )
          RMID            ( MYPROG1 )
                          .
REP       PROGRAM         ( PGM2     )
          LASTUPD         ( PGMPTF1  )
          LASTUPDTYPE     ( ADD )
          DISTLIB         ( ADSTLIB  )
          SYSLIB          ( SPGMLIB  )
          FMID            ( MYPROG1 )
          RMID            ( PGMPTF1 )
                          .
ENDUCL.
By specifying the FORFMID operand, you can reduce the number of PROGRAM entries unloaded. When FORFMID is specified, SMP/E unloads a PROGRAM entry only if its FMID matches one of the FMIDs specified on the FORFMID operand. For example, to unload PROGRAM entries whose FMIDs are either defined in FMIDSET ABC or are MYPROG1, you can use these commands:
SET      BDY(TGT1)          /* Set to target zone.        */.
UNLOAD   PROGRAM            /* Unload all PROGRAM entries */
         FORFMID(ABC        /* for the ABC FMIDSET        */
                 MYPROG1)   /* and FMID MYPROG1.          */.

UCLIN Examples

You can use the ADD, REP, and DEL UCL statements to change subentries in the PROGRAM entry. After the UCLIN changes are made, the PROGRAM entry must contain at least the following subentries:
  • DISTLIB
  • FMID
  • RMID

Otherwise, there is not enough information in the entry to process the program element. If any of these subentries are missing, SMP/E does not make the requested UCL updates to the entry, and the entry remains as it was before the UCL command.