Environment Description
EASY/Exit can receive control and enforce standards and policies whenever DFSMSdss performs any of its functions, such as dataset or volume backup or restore, defragmentation, copying, deletion, and so on. EASY/Exit receives control at each of the four exit points within DFSMSdss.
The four exit points are:
-
ADRUENQ -
ADRUPSWD -
ADRREBLK -
ADRUIXIT
By examining and setting the appropriate EASY/Exit variables at each of these exit points, EASY/Exit can enforce standards for DFSMSdss processing, issue warnings, alter DFSMSdss parameters and options, write log or SMF records for later analysis, and control just about any aspect of DFSMSdss operation.
When EASY/Exit receives control at any of these exit points, the
environment name (that is, the variable &ENV) is
DFDSS. The subenvironment name (that is, &ENVS) is one
of ADRUENQ, ADRUPSWD, ADRREBLK, or
ADRUIXIT, depending on which exit is being entered. The DFDSS environment
and its subenvironments may be entered multiple times during a DFSMSdss
execution. For example, the ADRUENQ exit is entered for each volume
processed during a backup or copy, to give the exit a chance to indicate how long the VTOC
enqueue should be held. If multiple volumes are processed, the ADRUENQ
exit (and thus the EASY/ExitADRUENQ subenvironment) is
entered multiple times, once for each volume. The other subenvironments may also be entered
multiple times — the ADRUIXIT subenvironment, for example, is always
entered at least twice — once to allow processing of values in the DFSMSdss
EXECute statement parame-ter list, and again for each dataset or volume processed.
Environment for EASY/Exit
EASY/Exit communicates with DFSMSdss via the EASY/Exit interface modules, which are DFSMSdss exit 'stubs' that are defined to DFSMSdss as ordinary exits. These interface stubs communicate with the DIF started task to run the EASY/Exit policy rules, allowing the main DIF and EASY/Exit modules to be independent of DFSMSdss, and allowing the EASY/Exit policy rules to be changed without requiring an IPL, relink, or other changes.
Before using the DFDSS environment, the EASY/Exit
interface module (the 'stub') for DFSMSdss must be linked into the
DFSMSdss load module ADRDSSU, replacing the default exit
points. Once these modules have been linked into ADRDSSU, they will be
called whenever DFSMSdss runs from that library. After the modules have
been linked into ADRDSSU, then DIF can be started and
the EASY/Exit rules will be called in the DFDSS
environment.
Only the modules for the desired exits need be linked into ADRDSSU. The
linkage editor (binder) will take an '*' in column one as a comment. The installer can
include any or all of the 4 pairs of INCLUDE/REPLACE statements for the EXT stub modules,
depending on which exits need to be installed. If the output load library containing the
modified ADRDSSU member is in the system linklist, an LLA refresh may be
required.
SYSLMOD and PRODLIB DD statements can be allocated to
the same dataset.
The JCL to perform the link-edit is shown below.
//LINK EXEC PGM=IEWBLINK,PARM='XREF,LIST,LET,RENT',REGION=4M
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DISP=SHR,DSN=TEST.LINKLIB <= OUTPUT LIBRARY
//PRODLIB DD DISP=SHR,DSN=SYS1.LINKLIB <= INPUT LIBRARY
//DTSLIB DD DISP=SHR,DSN=DTS.R71.LOADLIB <= DIF LOAD LIBRARY
//SYSPRINT DD SYSOUT=*
//SYSLIN DD *
INCLUDE PRODLIB(ADRDSSU)
*
***********************************************
* ADRUIXIT - CONTROL DFSMSDSS OPTIONS *
*********************************************** REPLACE -IMMED,ADRUIXIT
INCLUDE DTSLIB(EXTUIXIT)
*
***********************************************
* ADRUPSWD - VOLUME / DATASET AUTHORIZATION *
*********************************************** REPLACE -IMMED,ADRUPSWD
INCLUDE DTSLIB(EXTUPSWD)
*
***********************************************
* ADRUENQ - CONTROL VTOC ENQUEUE DURATION *
*********************************************** REPLACE -IMMED,ADRUENQ
INCLUDE DTSLIB(EXTUENQ)
*
***********************************************
* ADRREBLK - CONTROL COPY/RESTORE BLOCKSIZES *
*********************************************** REPLACE -IMMED,ADRREBLK
INCLUDE DTSLIB(EXTREBLK)
*
SETCODE AC(1) NAME ADRDSSU(R)
Figure 11-1. Enabling the DFDSS Environment
The DFDSS Sub-environments
Each subenvironment within the DFDSS environment represents a different
exit point in DFSMSdss processing. During DFSMSdss
execution, the environment name DFDSS is stored in the variable
&ENV, and the subenvironment name is stored in the variable
&ENVS. The subenvironment may be any of the following:
-
ADRREBLK— The DFSMSdss Reblock exit. This exit can be used to allow or disallow system-determined blocksize processing, set or change block-sizes, and indicate whether or not a dataset should be reblocked. -
ADRUENQ— The DFSMSdss Enqueue exit. Return codes from this exit indicate whether a short- or long-duration enqueue should be held on the VTOC. -
ADRUIXIT— The DFSMSdss Options exit. This exit receives control for almost all DFSMSdss functions and can be used to change almost any aspect of DFSMSdss processing, including overriding installation options and verifying or altering control statement parameters. -
ADRUPSWD— The DFSMSdss Authorization exit. Return codes from this exit indicate whether security checking should be performed at the dataset level or at the volume level, how much checking should be performed, whether security checking should be bypassed, or whether the function should be terminated.
The ADRREBLK exit is entered whenever DFSMSdss performs
a COPY or RESTORE of a sequential or partitioned dataset. This exit may be used to examine
the dataset block-size, change it, force use of system-determined blocksize, or prevent or
force reblocking. Preventing or forcing reblocking has the same effect as if the
REBLOCK keyword was entered on the COPY or RESTORE control statement.
Variables in the ADRREBLK Sub-environment
The following variables are specifically available in the DFDSSADRREBLK subenvironment. Also, many of the usual DIF
variables (&JOBNAME, &SYSID, &CURDATE,
&CURTIME, &STORGRP, &VOLSER,
&UNITNAME, etc.) are also available in this subenvironment as well as
the other DFDSS subenvironments.
Table 11-1. Variables in the ADRREBLK Subenvironment
Name
|
Values
|
Description
|
BLKSIZE
|
0 - 32767
|
Dataset current blocksize |
DSNAME
|
44 characters | Dataset name |
DSORG
|
PS or PO | Dataset organization |
DSS_EXITRC
|
0, 4, 8, or 12 | Indicates how the dataset is to be processed:
DSS_EXITRC = 0 (DFSMSdss-determined blocksize used).
|
DSS_FUNC
|
COPY or RESTORE | DFSMSdss function being performed |
DSS_OPER
|
DATASET | DFSMSdss operation type. ADRREBLK is always entered for a DATASET operation. |
DSS_PROCLEVEL
|
DATASET | Indicates whether the exit is being called for operation at the volume level or at the dataset level. ADRREBLK is always entered at the dataset level. |
DSS_REBLK_BLKSZ
|
0 – 32767
|
The new blocksize. If the rules change this value, &DSS_EXITRC = 4 is forced so that the new value is honored. |
DSS_REBLK_CALC
|
SYSTEM or DFDSS | Indicates whether the new blocksize was calculated by the system (system-determined) or by DFSMSdss. Usually the new blocksize will be the same regardless of which calculated it. |
DSS_SRCUNIT
|
8 char | Type of unit (for example, 3390) for the source volume on which the operation is being performed. |
DSS_SRCVOL
|
6 char | Source volume serial for which operation is being performed. |
Additional variables (continued):
DSS_TGTUNIT
|
8 char | Type of unit (for example, 3390) for the target volume on which the operation is being performed. |
DSS_TGTVOL
|
6 char | Target volume serial for which operation is being performed. |
LRECL
|
0 – 32767 | Dataset current logical record length |
Examples for the ADRREBLK Sub-environment
Example — Never reblock datasets beginning with SYS or PROD:
DEFENV DFDSS MODE(ACTIVE)
DEFRULE NOREBSYS
/* IF REBLOCK SUBENV */
IF &ENVS = ADRREBLK
/* FOR SELECTED DSNS */
IF &DSNAME = (SYS*,PROD*)
THEN SET &DSS_EXITRC = 8 /* NEVER REBLOCK */
Example 2 – Force Use of System-Determined Blocksize for Certain Datasets
In this example, datasets with a naming convention of 'PROD' in the high-level qualifier, and 'WEST' in the low-level qualifier, which have an LRECL of 80 and a current block-size of less than 800, are reblocked using system-determined blocksize.
DEFENV DFDSS MODE(ACTIVE)
DEFRULE SETSDB
IF &ENVS = ADRREBLK /* IF REBLOCK SUBENV */
&HLQ = PROD /* FOR SELECTED DSNS */
&QUALL = WEST /* FOR SELECTED DSNS */
&LRECL = 80 /* WITH SPECIFIED LRECL */
&BLKSIZE LT 800
THEN SET &DSS_EXITRC = 12 /* USE SYSTEM-DETERMINED BLOCKSIZE (SDB) */
The ADRUENQ exit is entered whenever DFSMSdss performs
a physical COPY or DUMP. The COPY or DUMP may be either a full dump or a dump of only
selected tracks. The subenvironment is also entered for a PRINT tracks operation. This
subenvironment is not entered for DFSMSdss logical operations such as
COMPRESS, DEFRAG, or logical dump.
By default, DFSMSdss will enqueue the VTOC for the entire duration of the
physical COPY, DUMP, or PRINT for the volume. However, this can interfere with other access
to the volume or make a 'deadly-embrace' possible. Using the EASY/Exit
rules to set a return code (&EXIT_RC) of 4 in this subenvironment limits
duration of the enqueue to only as long as VTOC access is required. This is usually a much
shorter time than required to process the entire volume.
Variables in the DFDSS ADRUENQ
The following variables are specifically available in the DFDSSADRUENQ subenvironment. Also, many of the usual DIF
variables (&JOBNAME, &SYSID, &CURDATE,
&CURTIME, &STORGRP, &VOLSER,
&UNITNAME, etc.) are also available in this subenvironment as well as the
other DFDSS subenvironments.
Table 11-2. Variables in the ADRUENQ Subenvironment
Name
|
Values
|
Description
|
DSS_ENQTYPE
|
SHORT or LONG | Indicates whether the VTOC enqueue should be a long-duration (0) or short-duration (4) enqueue. The default is 0. Setting DSS_ENQTYPE to SHORT forces DSS_EXITRC = 4. |
DSS_EXITRC
|
0 or 4 | Return code from the exit. 0 = hold VTOC enqueue for duration of operation. 4 = hold only as long as necessary to process VTOC. |
DSS_FUNC
|
DUMP, COPY, or PRINT | DFSMSdss function being performed. For ADRUENQ, always a physical, full, or tracks operation. |
DSS_OPER
|
DATASET, FULL, or PARTIAL | DFSMSdss operation type. A range of tracks is PARTIAL. |
DSS_SRCUNIT
|
8 char | Type of unit (for example, 3390) for the source volume on which operation is being performed. |
DSS_SRCVOL
|
6 char | Source volume serial for which operation is being performed. |
DSS_TGTUNIT
|
8 char | Type of unit for the target volume on which operation is being performed. |
DSS_TGTVOL
|
6 char | Target volume serial for which operation is being performed. |
DSS_TOLENQF
|
YES or NO | Indicates whether TOLERATE(ENQFAILURE) was specified on the DFSMSdss control statement or as a DFSMSdss option. |
Examples for the DFDSS ADRUENQ sub-environment
Example — Enqueue VTOC only as long as necessary for production volumes:
DEFENV DFDSS MODE(ACTIVE) DEFRULE PRODRULE
IF &ENVS = ADRUENQ &DSS_FUNC = (DUMP,COPY) THEN DO
IF &DSS_SRCVOL = PROD* OR &STORGRP = (STGP1, STGP2)
THEN SET &DSS_ENQTYPE=SHORT
END
ADRUIXIT - Control DFSMSdss Options
The ADRUIXIT exit allows the EASY/Exit administrator to
define rules which can control many aspects of DFSMSdss processing. The
rules in this exit can change DFSMSdss installation default options and
can examine, supply, or override the options specified on DFSMSdss control
statements.
The ADRUIXIT exit is entered at least twice for each execution of
DFSMSdss. The first entry, called the "parm change" entry, allows the
rules to change values that can be specified on the PARM field of the EXECute statement for
DFSMSdss. This includes items such as setting SERIAL or PARALLEL
operation and specifying where the I/O buffers should reside or be backed (above or below
16M), and whether RACF checking should be performed. The "parm change" entry into the exit
is indicated by a value of PARMCHG in the variable &DSS_FUNC.
After the "parm change" entry has been performed, subsequent entries into
ADRUIXIT are made for each function (for example, DUMP, RESTORE) to be
performed. These are referred to as "function" entries. During a function entry, the rules
may examine or modify variables that represent DFSMSdss keywords or
options, such as ALLEXCP, ALLDATA, PURGE,
REPLACE, SELECTMULTI, RECATALOG, and so on.
It is not necessary to set the exit return code (&DSS_EXITRC) to 4 in
the rules for the ADRUIXIT subenvironment. If the rules change any
variables that are represented in the ADRUIXIT parmlist,
EASY/Exit will automatically set &DSS_EXITRC to 4 to
indicate something has been changed. If a function is to be terminated (with an error), the
rules can set &DSS_EXITRC to 8. This will cause the function to fail
with message ADR036W.
If the rules alter any values in the ADRUIXIT subenvironment, the changed
values will be displayed in the DFSMSdss SYSPRINT output with message
ADR035I, for example:
ADR035I (001)-PRIME(12), INSTALLATION EXIT ALTERED ALLEXCP OPTION
ADR035I (001)-PRIME(15), INSTALLATION EXIT ALTERED ALLDATA OPTION
ADR035I (001)-PRIME(36), INSTALLATION EXIT ALTERED OPTIMIZE VALUE TO 4
Variables in the ADRUIXIT sub-environment
The following variables are specifically available in the DFDSSADRUIXIT environment. Also, many of the usual DIF
variables (&JOBNAME, &SYSID, &CURDATE,
&CURTIME, &STORGRP, &VOLSER,
&UNITNAME, etc.) are also available in this subenvironment as well as
the other DFDSS subenvironments.
Table 11-3. Variables in the ADRUIXIT Subenvironment
Name
|
Values
|
Description
|
DSS_EXITRC
|
0, 4, or 8 |
Indicates actions taken by the exit:
DSS_EXITRC = 0.
|
DSS_FUNC
|
BUILDSA, COMPRESS, CONSOLIDATE, CONVERTV, COPY, COPYDUMP, DEFRAG, DUMP, PARMCHG, PRINT, RELEASE, RESTORE | DFSMSdss operation type. |
DSS_OPER
|
DATASET, FULL, PARTIAL, PRTVTOC | DFSMSdss operation type. A range of tracks is PARTIAL. |
DSS_UIM_BYPFAC
|
YES or NO | Do/Do not perform any RACF FACILITY class checks. |
DSS_UIM_IGNCAT
|
YES or NO | Do/Do not ignore catalog entries for new-named dataset (valid only if DSS_LOGICALDUMP=YES). |
DSS_UIM_INVOKD
|
YES or NO | Indicates whether DFSMSdss was invoked by the application interface (program) or from JCL. YES indicates application interface was used. |
DSS_UIM_NOMOD
|
YES or NO | Indicates that ADRUIM (the User Interaction Module) for an application-invoked execution is given control, but may not change any values. |
DSS_UIM_NOSYSIN
|
YES or NO | SYSIN is not required. |
DSS_UIM_NOSYSPR
|
YES or NO | SYSPRINT is not required. |
DSS_UIM_NOTAPEI
|
YES or NO | No tape input is required (RESTORE only). |
DSS_UIM_NOTAPEO
|
YES or NO | No tape output is required (DUMP only). |
DSS_UIM_PREVENT
|
YES or NO | Indicates that ADRUIM is not to be given control for an application-invoked execution. |
DSS_UIM_REWIND
|
YES or NO | Do/Do not rewind tape on CLOSE. |
DSS_UIM_SAFOK
|
YES or NO | Do/Do not use the SAF interface at the highest possible level. |
DSS_UIM_TERM
|
YES or NO | Indicates the operation should be terminated. Equivalent to setting DSS_EXITRC = 8. |
The following variables are available only during a "parm change" entry (when
&DSS_FUNC = 'PARMCHG').
Table 11-4. Variables in the ADRUIXIT Subenvironment for &DSS_FUNC = 'PARMCHG'
Name
|
Values
|
Description
|
DSS_PARM_AI31B
|
YES or NO | Place application interface buffers above 16M |
DSS_PARM_PARA
|
YES or NO | Default to PARALLEL processing |
DSS_PARM_REAL64
|
YES or NO | Use 64-bit real addressing (ZBUFF64R=YES/NO) |
DSS_PARM_SERIAL
|
YES or NO | Force SERIAL processing |
DSS_PARM_WKUNIT
|
1-8 characters | Value for WORKUNIT (esoteric or generic, e.g., 3390) |
DSS_PARM_WKVOL
|
1-6 characters | Value for WORKVOL (volser) |
DSS_PARM_XABUFF
|
YES or NO | Place I/O buffers above 16M (XABUFF=ABOVE16/BELOW16) |
The following variables are available only during a "function" entry (that is, when
&DSS_FUNC is not equal to 'PARMCHG').
Table 11-5. Variables in the ADRUIXIT Subenvironment for &DSS_FUNC NOT = 'PARMCHG'
Name
|
Values
|
Description
|
DSS_OPT_ACOPY
|
YES or NO | Dump must produce all output or none at all (if YES) |
DSS_OPT_ALD
|
YES or NO | ALLDATA option specified for COPY or DUMP |
DSS_OPT_ALDL
|
YES or NO | ALLDATA(*) was/was not specified (valid only if DSS_OPT_ALD = YES) |
DSS_OPT_ALLE
|
YES or NO | ALLEXCP specified |
DSS_OPT_ALLMU
|
YES or NO | ALLMULTI option for logical COPY or DUMP |
DSS_OPT_ARBA
|
YES or NO | AUTORELBLKA specified |
DSS_OPT_BK32K
|
YES or NO | Set tape blocksize = 32K |
DSS_OPT_BLDIX
|
YES or NO | Do/Do not invoke ICKDSF to rebuild VTOC Index after function completes |
DSS_OPT_COMP
|
YES or NO | COMPRESS option specified for DUMP |
DSS_OPT_CONCURR
|
ANYPREF, ANYREQ, CACHEPREF, CACHEREQ, VIRTUALPREF, VIRTUALREF | CONCURRENT option |
DSS_OPT_CPDAY
|
0-255 | Days value for FORCECP |
DSS_OPT_CTLG
|
YES or NO | Catalog or recatalog datasets during RESTORE or COPY |
DSS_OPT_CVOL
|
YES or NO | COPYVOLID option specified for RESTORE or COPY |
DSS_OPT_CVRBK
|
YES or NO | CICSVRBACKUP value |
DSS_OPT_DCOND
|
YES or NO | DUMPCONDITIONING value |
DSS_OPT_DEBUG
|
DETAILED, MINIMAL, or SUMMARIZED | DEBUG(FRMSG(value)) |
DSS_OPT_DEBUGTRC
|
YES or NO | DEBUG(TRACE) option |
DSS_OPT_DEL
|
YES or NO | DELETE dataset after dump |
Continued (Table 11-5):
DSS_OPT_DRBLK
|
YES or NO | Disable reblocking for COPY or RESTORE |
DSS_OPT_DYNQ
|
YES or NO | Use dynamic allocation (YES) or enqueue (NO) to serialize datasets |
DSS_OPT_ENQE
|
YES or NO | Enqueue exclusive |
DSS_OPT_ENQN
|
YES or NO | Do not enqueue if attempt to enqueue exclusive or share fails |
DSS_OPT_ENQS
|
YES or NO | Enqueue share if attempt to enqueue exclusive fails |
DSS_OPT_ERASE
|
YES or NO | Erase DASD tracks after operation |
DSS_OPT_FASTREP
|
REQUIRED or PREFERRED | FASTREPLICATION value |
DSS_OPT_FC2PP
|
YES or NO | FCTOPPRCPRIMARY (FLASHCOPY to PPRC primary option) |
DSS_OPT_FCFRZ
|
YES or NO | FCCGFREEZE (FLASHCOPY Consistency Group Freeze option) |
DSS_OPT_FCN2C
|
YES or NO | FCNOCOPYTOCOPY (FLASHCOPY nocopy-to-copy option) |
DSS_OPT_FCNC
|
YES or NO | FCNOCOPY (FLASHCOPY nocopy option) |
DSS_OPT_FCOPY
|
INCREMENTAL or INCRELAST | FCINCREMENTAL or FCINCREMENTAL-LAST value |
DSS_OPT_FCOPYVER
|
REVERSE or NOREVERSE | FCINCRVERIFY value |
DSS_OPT_FCWD
|
YES or NO | FCWITHDRAW (FLASHCOPY withdraw option) |
DSS_OPT_FCWTR
|
0-99 | Number of retries value for FCWAIT(num-secs,numretries) |
DSS_OPT_FCWTS
|
0-255 | Number of seconds value for FCWAIT(num-secs,numretries) |
DSS_OPT_FORC
|
YES or NO | FORCE option for RESTORE or COPY (allow unmovable datasets to move) |
DSS_OPT_FORCECP
|
YES or NO | FORCECP option |
DSS_OPT_FRAGI
|
0-999 | Fragmentation Index for volume |
DSS_OPT_FRBLK
|
YES or NO | Force reblocking for COPY or RESTORE |
DSS_OPT_HCOMP
|
YES or NO | HWCOMPRESS option |
DSS_OPT_LEAV
|
YES or NO | Do not reposition on CLOSE (LEAVE option) |
DSS_OPT_MAXTM
|
0-65535 | Maxtime number of minutes |
DSS_OPT_MKMV
|
YES or NO | MAKEMULTI specified |
DSS_OPT_MNSQT
|
0-99999999 | MINSECQTY value for RELEASE |
DSS_OPT_MNTUS
|
0-99999999 | MINTRACKSUNUSED value for RELEASE |
DSS_OPT_NMGMT
|
YES or NO | NULLMGMTCLAS option |
DSS_OPT_NOSMS
|
YES or NO | NULLSTORCLAS option |
DSS_OPT_PRSYS
|
YES or NO | PROCESS(SYS1) value |
DSS_OPT_PRUND
|
YES or NO | PROCESS(UNDEFINEDSORG) value |
DSS_OPT_PURG
|
YES or NO | PURGE option specified for DUMP, COPY, or RESTORE |
DSS_OPT_RACLG
|
YES or NO | Force RACF logging (RACFLOG=YES) |
DSS_OPT_REPL
|
YES or NO | REPLACE option for dataset RESTORE or COPY |
DSS_OPT_REPU
|
YES or NO | REPLACEUNCONDITIONAL value |
DSS_OPT_RESE
|
YES or NO | RESET option specified for DUMP |
DSS_OPT_RIOPC
|
0-999 | READIOPACING value |
DSS_OPT_SELMULTI
|
ALL, ANY, FIRST | SELECTMULTI option |
DSS_OPT_SPHER
|
YES or NO | SPHERE option |
DSS_OPT_T0REQ
|
YES or NO | CONCURRENT copy value |
DSS_OPT_TGTAL
|
BLOCK, CYLINDER, SOURCE, TRACK | TGTALLOC value |
DSS_OPT_UOPTM
|
1, 2, 3, or 4 | OPTIMIZE value |
DSS_OPT_VALD
|
YES or NO | VALIDATE specified (only if DSS_LOGICALDUMP=YES) |
DSS_OPT_VOL-COUNT
|
ASTERISK, ANY, SOURCE, NUM | VOLCOUNT option |
DSS_OPT_VOLCVAL
|
0-59 | Volume count for VOLCOUNT(N(nn)) |
DSS_OPT_WAITR
|
0-99 | Number of retries value for WAIT(numsecs,numretries) |
DSS_OPT_WAITS
|
0-255 | Number of seconds value for WAIT(num-secs,numretries) |
DSS_OPT_WRCK
|
YES or NO | WRITECHECK option specified for DUMP or RESTORE |
DSS_SRCDDNAME
|
1-8 characters | DD name for source volumes |
DSS_SRCUNIT
|
1-8 characters | Type of unit for the source volume (first volume only) |
DSS_SRCVOL
|
1-6 characters | Source volume serial for which operation is being performed (first volume only) |
DSS_TGTDDNAME
|
1-8 characters | DD name for target volumes |
DSS_TGTUNIT
|
1-8 characters | Type of unit for the target volume (first volume only) |
DSS_TGTVOL
|
1-6 characters | Target volume serial for which operation is being performed (first volume only) |
Examples for the ADRUIXIT Environment
Example — Prevent specified users from executing a DUMP function:
DEFENV DFDSS MODE(ACTIVE) DEFRULE KILLDUMP
IF &ENVS = ADRUIXIT /* IF OPTIONS EXIT */
&RUSER = STEVE /* FOR SELECTED USERS */
&DSS_FUNC = DUMP /* FOR DUMPS */
THEN SET &DSS_EXITRC = 8 /* DISALLOW THE FUNCTION */
Example 2 — Set OPTIMIZE, WAIT, ALLEXCP, ALLDATA and other values
Example — Force OPTIMIZE(4), WAIT retries, and set ALLDATA/ALLEXCP to dump idle tracks:
DEFENV DFDSS MODE(ACTIVE) DEFRULE DFLTRULE
IF &ENVS = ADRUIXIT &DSS_FUNC NE PARMCHG
THEN
SET &DSS_OPT_UOPTM = 4 /* OPTIMIZE(4) */
SET &DSS_OPT_WAITR = 10 /* WAIT 10 SECS BETWEEN ENQ RETRIES */
SET &DSS_OPT_WAITS = 10 /* UP TO 10 ENQ RETRIES */
SET &DSS_OPT_ALD = YES /* SET ALLDATA */
SET &DSS_OPT_ALDL = YES /* SET ALLDATA(*) */
SET &DSS_OPT_ALLE = YES /* SET ALLEXCP */
Example — Change PARM options to place buffers above 16M, use 64-bit real storage if available, and set WORKVOL/WORKUNIT:
DEFENV DFDSS MODE(ACTIVE) DEFRULE PARMSRULE
IF &ENVS = ADRUIXIT &DSS_FUNC EQ PARMCHG
THEN
SET DSS_PARM_AI31B = YES
SET DSS_PARM_REAL64 = YES
SET DSS_PARM_XABUFF = YES
SET DSS_PARM_WKVOL = DTS003
SET DSS_PARM_WKUNIT = 3390
ADRUPSWD - Volume/Dataset Authorization
The ADRUPSWD exit is called once for each volume processed, and,
depending on the return codes from this call or subsequent calls, may be called once for
each dataset on the volume. At each call, ADRUPSWD can return a code that
indicates whether:
- processing should be terminated (with an error) for the dataset or volume
- authorization should be checked for the dataset or volume
- whether the
ADRUPSWDexit should be called again (note:ADRUPSWDis not called for the CONVERTV or COPYDUMP functions)
Volume-Level Calls vs. Dataset-Level Calls
The ADRUPSWD exit is not called if the volume being processed is a
non-SMS volume already protected by a DASDVOL profile. For all other volumes, the exit is
called first at the volume level (&DSS_PROCLEVEL = VOLUME). If the rules
return a zero return code (&DSS_EXITRC = 0), then no further checking on
the volume is performed — no dataset-level checks are performed. If the rules return a nonzero
return code for the volume-level call, then dataset-level checking is performed (unless the
rules set a return code greater than 12, which ends the function with an error).
Dataset-level calls are not made for the DEFRAG function.
Table 11-6. Return Codes when &DSS_PROCLEVEL = VOLUME
DSS_EXITRC
|
Action
|
| 0 | No further checking necessary on this volume |
| 8 | Reenter ADRUPSWD for dataset-level checking (default) |
| 12 | Perform dataset-level authorization checking but do not reenter ADRUPSWD for datasets on this volume |
| 20 | Terminate processing for volume (with message ADR402E-5) |
Any other value for &DSS_EXITRC will result in DFSMSdss
terminating the function with message ADR402E-15.
If the return code from the volume-level call is greater than zero (and less than or equal
to 12), then ADRUPSWD is called for each dataset on the volume. For these
dataset-level calls, the value of &DSS_PROCLEVEL is DATASET.
For each dataset-level call, the rules may set a return code which indicates whether any
further calls should be made.
Table 11-7. Return Codes when &DSS_PROCLEVEL = DATASET
DSS_EXITRC
|
Action
|
| 0 | No further checking necessary on this dataset or volume. Do not reenter ADRUPSWD for this volume. |
| 4 | No further checking necessary for this dataset. Reenter ADRUPSWD for the next dataset on this volume. |
| 8 | Perform authorization checking for this dataset and reenter ADRUPSWD for the next dataset on the volume (default). |
| 12 | Perform authorization checking for this dataset, but do not reenter ADRUPSWD again for this volume. |
| 16 | Terminate processing for dataset (with message ADR402E-6) |
| 20 | Terminate processing for volume (with message ADR402E-5) |
The following variables are specifically available in the DFDSSADRUPSWD subenvironment. Also, many of the usual DIF
variables are also available in this subenvironment as well as the other DFDSS
subenvironments.
Table 11-8. Variables in the ADRUPSWD Subenvironment
Name
|
Values
|
Description
|
CATALOG_NAME
|
44 characters | For a VSAM cluster, the name of the catalog in which the cluster is catalogued. |
DSNAME
|
44 characters | Dataset name or cluster name (if &DSS_PROCLEVEL = DATASET). |
DSS_EXITRC
|
0, 4, 8, 20 (if &DSS_PROCLEVEL = VOLUME) or 0,4,8,12,16,20 (if &DSS_PROCLEVEL = DATASET) |
Indicates whether authorization checking should be performed and whether ADRUPSWD should be entered again. See the tables under "Volume-Level Calls vs. Dataset-Level Calls" for valid values. |
DSS_FUNC
|
DUMP, RESTORE, COPY, PRINT, DEFRAG, COMPRESS, PRESS, RELEASE, BUILDSA, CONSOLIDATE | DFSMSdss function being performed. |
DSS_OPER
|
DATASET, FULL, PARTIAL | DFSMSdss operation type. A range of tracks is PARTIAL. |
DSS_PROCLEVEL
|
VOLUME or DATASET | Indicates whether the exit is being called for operation at the volume level or at the dataset level. |
DSS_SRCUNIT
|
8 char | Type of unit (for example, 3390) for the source volume on which the operation is being performed. |
DSS_SRCVOL
|
6 char | Source volume serial for which operation is being performed. |
DSS_TGTUNIT
|
8 char | Type of unit for the target volume on which the operation is being performed. |
DSS_TGTVOL
|
6 char | Target volume serial for which operation is being performed. |
VOLSER
|
6 char | Volume serial number for which the operation is being performed. If the call is for operation on the source volume, then &VOLSER = &DSS_SRCVOL. If the call is for the target volume, then &VOLSER = &DSS_TGTVOL. |
Examples for the ADRUPSWD Sub-environment
Example 1 — Bypass authorization checking for certain volumes:
DEFENV DFDSS MODE(ACTIVE) DEFRULE BYPRULE1
IF &ENVS = ADRUPSWD
&DSS_FUNC = DUMP /* BACKUPS */
&DSS_PROCLEVEL = VOLUME /* VOLUME-LEVEL ENTRY */
&VOLSER = PRD* /* FOR SPECIFIED VOLUMES */
&RUSER = P32* /* FOR SPECIFIED USERIDS */
THEN SET &DSS_EXITRC = 0 /* NO AUTH CHECKING NEEDED */
IF &ENVS = ADRUPSWD &DSS_PROCLEVEL = VOLUME
THEN SET &DSS_EXITRC = 12 /* PERFORM VOLUME-LEVEL AUTH */
Example — If datasets on volumes beginning with PRD must start with PROD; otherwise fail dataset:
DEFENV DFDSS MODE(ACTIVE) DEFRULE CHKRULE1
IF &ENVS = ADRUPSWD &DSS_PROCLEVEL = VOLUME &VOLSER = PRD* THEN SET &DSS_EXITRC = 8 /* CHECK AT DATASET LEVEL */
IF &ENVS = ADRUPSWD &DSS_PROCLEVEL = DATASET &VOLSER = PRD* &DSNAME = PROD** THEN SET &DSS_EXITRC = 8 /* AUTH-CHECK AND REENTER */
IF &ENVS = ADRUPSWD &DSS_PROCLEVEL = DATASET &VOLSER = PRD* &DSNAME NE PROD** THEN SET &DSS_EXITRC = 20 /* FAIL THIS DATASET */