SVCUPDTE - Install a Type-3 SVC Routine



SVCUPDTE is an MVS utility program to define an SVC routine to the system as a type-3 SVC. Several options are available:

  • Installation can be temporary or permanent
  • The SVC routine may be loaded into common storage, as needed
  • Access to the new SVC routine may be restricted to jobs submitted by a particular user
  • An IGX00nnn module may be installed as a type-3 ESR

SVCUPDTE is free software, available in source-code format in the freeware section of this Web site.



The SVCUPDTE utility program runs in a batch job to define a user program as a type-3 SVC routine to the MVS system. The user program can be in common storage (PLPA, MLPA, DLPA), or in a system library (link-list), or in a private library (JOBLIB, STEPLIB). If the program is in a private library or in the link-list, SVCUPDTE loads it into the CSA, as it is an MVS requirement that all active SVC routines be resident in common storage, and be available to all address spaces.

SVCUPDTE is a sensitive program which must only be used by knowledgeable systems programmers. Incorrect use of SVCUPDTE may produce unpredictable results or system crashes. For this reason, SVCUPDTE only works if it is APF-authorised and its invoker has UPDATE authority to SYS1.PARMLIB. SVCUPDTE also issues ENQ to prevent simultaneous installation of the same SVC by different jobs.

The definition of an SVC routine can be permanent or temporary.

If the specified SVC routine is in common storage (PLPA, MLPA, DLPA) and a module with the same name also exists in the JOBLIB or STEPLIB, then SVCUPDTE temporarily installs the module in JOBLIB or STEPLIB and stays active until it is STOP'd or CANCEL'd. The installation can only be permanent if the specified SVC routine is NOT in the JOBLIB or STEPLIB. One way to work around such a conflict is to use an MVS facility called FETCHLIB, as shown in JCL example no 5 below.

To limit the impact of a temporary SVC installation to the MVS system and its users, SVCUPDTE provides two facilities which can be specified in the PARM.

  1. Automatic shut-down at a pre-defined time.
  2. Single User-id - when specified, SVCUPDTE screens all calls to the installed SVC and directs them to the new SVC routine when the job's owner is the specified user-id, and to the old SVC otherwise.


SVCUPDTE is controlled through options specified in the PARM field of the EXEC statement, which must contain two to five positional parameters:


  1. nnn is the SVC number you want to install; it must be specified as a 3-digit number.
  2. mmmmmmmm is the name of a load module (or alias) that you want to install as SVC nnn; it MUST come from an authorized library (STEPLIB or link-list). If the SVC number is 109, the load-module name must be IGX00nnn, where nnn is the number of the ESR entry.
  3. lock is the optional lock bit string which must be specified as follows:
    • 8000 indicates the local lock
    • C000 indicates both the CMS and local locks
  4. hhmm is the optional "good-night" time, in 24-hour clock format. When the specified time is reached, SVCUPDTE automatically un-installs the SVC and stops.
  5. userid is the user-ID that will be compared to that of each invoker of the new SVC routine. If the two user-IDs are equal, the new SVC is invoked. If they are different, the old SVC is invoked.



Sample JCL

The JCL examples below show how to invoke the SVCUPDTE utility program in various situations.

Example 1

This is the simplest and most common utilisation of SVCUPDTE to permanently install (or re-install) an SVC routine. The SVC routine must be resident in common storage (PLPA, MLPA, DLPA). SVCUPDTE itself is loaded from a system library.


Example 2

This example permanently installs (or re-installs) an SVC routine which has previously been made resident in common storage (PLPA, MLPA, DLPA). SVCUPDTE itself is loaded from a private library which may not also contain a copy of the SVC routine.


Example 3

In this example, SVCUPDTE installs TESTSVC2 as SVC 244 and remains active untill 20:00, at which time it restores the SVC entry to its initial state and terminates. Both SVCUPDTE and the SVC routine mae be loaded from a system or private load-library.


Example 4

Install SVC11Y2K as SVC 11 until 18:00, but make it only active for jobs run by IBMUSER


Example 5

In this example, the SVC11Y2K routine is installed permanently from the same private library from which SVCUPDTE is executed. The SVC11Y2K SVC routine is loaded into DLPA using the SETPROG command, out of the same load-library that also contains SVCUPDTE. The MVS FETCHLIB facility is used to execute SVCUPDTE and avoid the presence of JOBLIB or STEPLIB in the INSTALL step. The resulting installation of the SVC routine is permanent. If a JOBLIB or STEPLIB were used, the SVC routine would be loaded from it and the installation would be temporary.


Example 6

Install IGX00066 as type-3 ESR 66