SVCUPDTE - Install a Type-3 SVC RoutineOverviewSVCUPDTE is an MVS utility program to define an SVC routine to the system as a type-3 SVC. Several options are available:
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.
PARM=(nnn,mmmmmmm,lock,hhmm,userid)
The JCL examples below show how to invoke the SVCUPDTE utility program in various situations.
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.
//SVC222 EXEC PGM=SVCUPDTE,PARM=(222,IGC0022B)
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.
//SVC222 EXEC PGM=SVCUPDTE,PARM=(222,IGC0022B)
//STEPLIB DD
DSN=SYS2.SVCUPDTE.LOAD,DISP=SHR
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.
//TEMPSVC EXEC PGM=SVCUPDTE,PARM=(244,TESTSVC2,,2000)
Install SVC11Y2K as SVC 11 until 18:00, but make it only active for jobs run by IBMUSER
//SVC11TMP EXEC PGM=SVCUPDTE,PARM=(011,SVC11Y2K,,1800,IBMUSER)
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.
//*
// SETPROG LPA,ADD,DSN=SYS1.P390.LINKLIB,MODNAME=SVC11Y2K
//*
//FETCHLIB EXEC PGM=IEFBR14
//SVCUPDTE DD
DSN=SYS1.P390.LINKLIB(SVCUPDTE),DISP=SHR
//*
//INSTALL EXEC
PGM=*.FETCHLIB.SVCUPDTE,PARM=(011,SVC11Y2K)
Install IGX00066 as type-3 ESR 66
//ESR66 EXEC PGM=SVCUPDTE,PARM=(109,IGX00066)