3051 - DFSMS - MVS Basics - The ABCs of ACS
3051 - DFSMS - MVS Basics - The ABCs of ACS
Voice: (703)324-2708
of FAX: (703)324-3958
Email: [email protected]
C ACS
A B
Linnea Nichols
Fairfax County Government
[email protected]
703/324-2708
Presentation Objectives
Smsacs.prs 2
The DFSMS Environment
Introduction DFSMS is IBM's strategic approach to improve the efficiency of storage
The DFSMS Environment management. The goals of DFSMS are to:
ES/9000 DFSMS/MVS
Policies,
3990
Practices, DFSMS is an interaction between many products. DFSMS/MVS lies at the heart.
3390 hsm rmm
dfp dss Procedures It's function is to simplify the management and use of external storage media by
3590
RAMAC sort racf providing a device independent means of requesting data services at the data set
level. SMS achieves this by assigning through the ACS routines a series of classes
IBM IBM IBM and groups that reflect the service requirements of a data set. These definitions
Storage are stored in the SMS control data sets.
Storage DFSMS Management
Offerings Library
Smsacs.prs 3
This foil describes where the ACS routines fit in the allocation process of a data
set.
ACS Routines When allocating a new data set, the ACS routines are invoked in the following
Smsacs.prs 4
The ACS language referenced is contained in the DFSMS/MVS Storage
Administration Reference Manual
• PROC • SET EXIT Immediate exit of ACS routine (nonzero return code abends
the allocation)
• FILTLIST • WRITE
END End of statement group
• DO • EXIT
Comments Just that, comments to make it easier to understand what the
• SELECT • END routine is doing
• IF • Comments
Smsacs.prs 5
Each routine is invoked separately based on three criteria - the current ACS
environment, the program being executed, and the parameters being supplied. Not
all routines are invoked all the time. In fact, in some cases none of the routines are
invoked. It is important to be aware of this while coding ACS routines.
ACS Routine Invocation
The following two foils illustrate this point.
Smsacs.prs 6
ACS Routine When &ACSENVIR=ALLOC
This chart shows which ACS routine is invoked when the ACS variable &ACSENVIR
Invocation Examples equals "ALLOC". Notice that the type of processing determines which ACS routine is
invoked.
Initial Allocation
When &ACSENVIR is ‘ALLOC’ For new allocations, the data class and storage class ACS routines are always
invoked. If a storage class is assigned, the data set will be system-managed and
SC MC SG the management class and storage group ACS routine will be invoked. If a storage
Type of processing DC ACS class is NOT assigned, the data set will not be system-managed and the
ACS ACS ACS management class and storage group ACS routines will be bypassed.
Initial allocation Y Y C C Temporary data sets are considered new allocations. The difference between
temporary and permanent data set allocation is the management class ACS routine
IDCAMS IMPORT N Y C C will not be invoked for temporary data sets.
DFDSS COPY N Y C C
DFDSS COPY IDCAMS IMPORT
N N N C The IDCAMS IMPORT command moves or restores a VSAM cluster. The data class
BYPASSACS
ACS routine is bypassed for this command. The storage class and management
class ACS routines are invoked and provided with class names exported with the
original data set or class names provided in the IMPORT command.
• DC ACS routine only invoked for initial allocation
• MC and SG ACS routines are only invoked if a SC is DFDSS COPY
assigned The DFDSS COPY command has a &ACSENVIR equal to "ALLOC". The data class
• SG ACS routine will be invoked when STORCLAS ACS routine is bypassed for this command. The storage class and management
class ACS routines are invoked and provided with class names copied with the
keyword is used with the DFDSS COPY original data set or class names provided in the DFDSS COPY command.
BYPASSACS command
Y - routine is invoked DFDSS COPY BYPASSACS
N - routine is not invoked Using the DFDSS COPY command keyword BYPASSACS, the system will not
C - routine is invoked if SC is assigned invoke the ACS routines to determine the target data set class names. One can
specify the DFDSS COPY keywords STORCLAS and MGMTCLAS to assign the
class names. Note the combination of BYPASSACS and NULLSTORCLAS forces
the selected data set to not be system-managed.
Smsacs.prs 7
ACSENVIR=RECALL/RECOVER/CONVERT
The three other standard ACS environments are RECALL, RECOVER, and CONVERT. Each
environment causes a different type of processing to occur.
ACS Routine DFDSS RESTORE
Invocation Examples The original class names (storage and management) are passed to the ACS routines as they
were when the data set was dumped. These classes can be accepted "as is" by the ACS
routines, or new ones can be assigned, depending on the ACS logic. (If the data set is being
restored from another site, you may want to re-drive the allocation through the ACS routines.)
DFHSM FORCENONSMS
Using the DFHSM parameter FORCENONSMS on the RECALL or RECOVER command forces
• DC ACS routine not invoked when &ACSENVIR is the system to bypass the ACS routines and put the data set on a non-SMS volume. Of course, a
non-SMS volume must be known to DFHSM to complete the request.
RECALL/RECOVER/CONVERT In addition, the following points are worth noting:
• SG ACS routine is not invoked for DFDSS
CONVERTV - DFHSM RECALL/RECOVER are DFHSM-authorized commands (not to be confused with
HRECALL/HRECOVER). The FORCENONSMS option in RECALL/RECOVER should be used
• ACS is bypassed when DFHSM keyword only as a fallback process to direct recalls or recovers to non-managed volumes.
FORCENONSMS is used
- You can assign (through ISMF or IDCAMS ALTER command) a different storage class and
management class to an existing data set. The ACS routines are not invoked in this case. This
function should be RACF-protected.
Smsacs.prs 8
ACS Routine
Invocation Examples
Smsacs.prs 9
Constraints on Read-only variables
Constraints On ACS routines receive input variables coming from different sources such as JCL,
RACF, or the preceding routines. These variables are not always available for
Read-Only Variables each of the ACS routines. Their content depends on:
The following read-only variables are not passed to any ACS routine except for
• &ACCT_JOB • &ACCT_JOB initial allocation (&ACSENVIR=ALLOC). This is very logical because the following
information is not saved anywhere for future reference. For example, when
• &ACCT_STEP • &ACCT_STEP recalling a data set from DFHSM , the job name that initially allocated the data set
• &DD • &DD is not available.
- &ACCT_JOB the accounting information from the JOB card
• &GROUP
- &ACCT_STEP the accounting information from the EXEC card
• &JOB • &JOB - &DD DD (data definition) statement describing the data set
• &MVSGP - MSS only • &MVSGP - MSS only - &GROUP the name specified on the GROUP= JCL keyword
• &PGM • &PGM - &JOB the job name, the started task name, or the TSO/E userid from the JOB
card, depending on your execution mode (&XMODE)
• &USER • &USER - &MVSGP MSS only - the group name for mass storage (MSS) volumes
• &XMODE • &XMODE - &PGMthe name of the program the system is running
- &USER the userid of the person creating the data set
- &XMODE the execution mode in which the data set is being created, one of:
BATCH, TSO, or TASK.
Smsacs.prs 10
Objectives
Objectives - Durable
The next few foils explain how to achieve these objectives by observing certain
• Simple and straightforward design criteria and considerations, a recommended structure for ACS routines, as
well as documentation and standards.
Requirements
• Easy to understand and maintain
The ACS routines reflect and implement the installation storage management
policy. The first part of the design phase is to identify the data requirements in an
• Durable installation. This work can be split into two tasks:
• Understand requirements of DFSMS These tasks will now be discussed in more detail.
Implementation Plan
Smsacs.prs 11
In order to design the ACS routines, it is first necessary to develop an
implementation plan that covers the implementation of DFSMS, moving from the
current environment by staged implementation to the final target environment. The
The DFSMS developer of the ACS routines should be cognizant of the:
Be cognizant of:
User requirements
Established service level agreements
Target environment
Major objectives of the installation
Smsacs.prs 12
A major task of the planning phase will be to identify the following requirements
which will form the basis of the policies used to drive DFSMS.
Once these high-level requirements have been identified, the data classification
Application/Business System methodology suggested in the following foils can be applied to:
Requirements Capabilities
- Translate the requirements into data classes, storage classes, and
management classes.
SLAs - Identify the decision points needed in the ACS routines.
Application
Standards
ACS
DC SC MC SG
Routines
Smsacs.prs 13
Data Classification Methodology
Data Classification The suggested technique is to build a tree diagram where the root is managed
data, and each major branch (pool) is a collection of data that will be migrated to
Methodology DFSMS management in each separate phase of the master implementation plan.
Next, each pool is split by different data types into further branches until there are
no more downward splits to be made. These are the leaves of the tree, and each
leaf is a distinct type of data that may require a discrete set of assigned classes.
R
Managed O
Data O
T The decision needs to be made as to whether a leaf requires discrete classes
B assigned on the basis of user requirements, service level agreements, and any
R technical requirements.
A
System Devl. Prod. TSO Batch Temp N
C
H When the requirements for each leaf have been identified, all cases that require
E more than the standard classes will be decision points (WHEN ... or IF ...) in the
B S
R ACS routines. The criteria for the decision points need to be determined by
A
N
identifying the unique characteristic(s) of each exception case.
System Shared User C
H
E This foil shows six pools of data that are to be migrated to DFSMS management
S
separately in staged implementation.
L Note: This picture is only an example and may not reflect all the pools in your
E
Profiles JCL Source Data A installation. This sample can be used as a starting point to build the data
V classification tree for a specific installation.
E
S
Smsacs.prs 14
This example shows how the TSO POOL may be split into different data types until
there are no more splits to be made, thus identifying the leaves of the tree.
Profiles, JCL, programs and data are the USER data sets identified as leaves.
Data Classification
Methodology The TSO System and Shared data may each be considered leaves if further splits
do not show any exceptions in terms of class assignment.
B Although both JCL and Source have been identified as having the same
requirements, this need not necessarily have been the case. For example, Source
R
could have been split further if different users had different requirements.
A
System Shared N
User C
H
DC=null DC=null
SC=FAST SC=FAST E
MC=NOMIG MC=STANDARD S
L
E
Profiles JCL Source Data A
V
DC=null FIXED80 FIXED80 null E
SC=STANDARD STANDARD STANDARD STANDARD S
MC=NOMIG EXTRABAK EXTRABAK STANDARD
Smsacs.prs 15
This foil shows how a segment of a management class ACS routine may be coded
for this environment using each branch to identify different data types and, where
necessary, decision criteria for the exception cases.
Data Classification
Methodology The decision criteria used in these cases have been either &HLQ or &DSN. More
than 30 read- only variables can be tested for decisions.
TSO BRANCH
SELECT
SELECT
FILTLIST
*.LOG.MISC **.CNTL **.COBOL
OTHERWISE
*.PDF.PROFILE **.JCL **.ASM
L
E
Profiles JCL Source Data A
V
DC=null FIXED80 FIXED80 null
E
SC=STANDARD STANDARD STANDARD STANDARD
S
MC=NOMIG EXTRABAK EXTRABAK STANDARD
Smsacs.prs 16
Each ACS routine consists of a main line SELECT, which branches to the relevant
subroutines that contain (optionally) installation standards enforcement and logic
that executes each class assignment method. The subroutines invoked vary for
Structure for ACS each ACS routine.
1. External specification
This is where a user would request a specific class (i.e. management class) on
External there data set allocation statement.
Specification
Few
2. ACS routine logic
ACS routine M
Sets E Code would be written to identify groups of data sets that required specific classes.
logic
with same criteria T
H 3. RACF defaults
RACF All O
defaults associated with an D
You have the option to use RACF defaults. The ACS routine can assign RACF
HLQ, USER, or Group defaults to a data set if the data set has a default.
Otherwise 4. The data that did not fall in the previous three categories.
All other Data Sets
This would be considered the masses, the data sets that don't have any special
requirements. These data sets would be assigned standard classes.
Smsacs.prs 18
This is an example of a DASD data set subroutine for the storage class ACS
routine. This is how the logic in the pyramid would be translated to ACS routine
logic. Each level of the pyramid would be represented in ACS code by a SELECT
Structure for ACS case statement. The OTHERWISE of the case statement would determine the
class for the bottom layer of the pyramid, or the "masses".
Routines
WHEN DASD data set
DO
Installation Standards
SELECT
WHEN condition
code ....
?
END
External specification S
SELECT E
WHEN &STORCLAS not NULL T
code .... E
?
C X
END
ACS Code Logic L I
SELECT A T
WHEN multivolume
WHEN temporary S
WHEN critical S
WHEN ...
RACF Defaults
WHEN RACF default class
OTHERWISE
END
END
Smsacs.prs 19
Comments set apart from the executable code
Documenting ACS Routines ACS routines should be well documented. This will make it easier for future
modifications. Also, if the modifications are performed by someone other than the
author, documentation contributes to the ease of understanding and maintenance
Comments set apart from executable code of the ACS routines.
PROC 0 STORCLAS
For ACS routines, the best place for documentation is within the routines
/*===============================================================*/
/* C H A N G E H I S T O R Y */ themselves. Comments set apart from the executable code should begin by
/* ============================ */ stating the nature and purpose of the routine.
/* DATE RESP DESCRIPTION OF CHANGE */
/* ------ ------ ----------------------- */
/* 98/05/04 LTN CLEAN UP DEAD CODE */ Following that should be a log of all changes to the routine. This log of changes
/* 96/09/23 DMR ALLOW SYSTEM PROGRAMMERS TOTAL FREEDOM */ should identify the date of the change, initials of persons responsible, and the
/* 96/09/16 DMR DELETED PRF FROM EXCLUDE LIST */ nature of the changes. The log entries should be made in descending date order
/*===============================================================*/
/* FILTLIST SPECIFICATIONS FOLLOW */
(latest change is at the start of the log), so that it is immediately evident who made
/*---------------------------------------------------------------*/ the last change and why. Usually, the latest change is responsible for the most
FILTLIST &DASD INCLUDE('3390', /* Valid DASD devices for SMS */ recent problem!
'3380', /* allocation. */
SYS*,
'')
/*---------------------------------------------------------------*/
/* IGNORE ALLOCATIONS FOR NON-DASD DEVICES */
/*---------------------------------------------------------------*/
IF &UNIT NE &DASD
THEN DO
SET &STORCLAS EQ ''
EXIT
END
/*---------------------------------------------------------------*/
Smsacs.prs 20
Comments within the code - two types
Documenting ACS Routines There should be two types of comments in the code of the ACS routines.
Comments within the code - two types 1. Describe the purpose of a section of code
These comments are set off from the code, as separate complete comment lines.
/*--------------------------------------------------------------------*/
/* CHECK AND AUTHORIZE EXTERNAL SPECIFICATION OF STORCLAS. */ They refer to the overall function of the block of code that follows.
/* IF AUTHORIZED, ALLOW SPECIFICATION TO REMAIN AND EXIT. */
/*--------------------------------------------------------------------*/
IF &STORCLAS NE '' THEN 2. Describe the specific purpose of the programming statements
DO /* Start main DO-group 1. */
SELECT /* Start SELECT-group 1. */
These comments form part of the detail of the code, and as such, are tied to it. If a
WHEN ( &JOB EQ &SYSPROG ) /* Permit system programmers */ statement is altered in any way, any comment related to it will likely be changed.
EXIT /* to bypass the system. */ These comments may either be:
WHEN ( &DSN EQ &DB2TEST ) /* DB2 test uses specific SC */ - Set apart from the code and distinguished from the general comments by
SET &STORCLAS EQ 'SCODB2D' /* */ entering them in lower cases.
WHEN ( &ACSENVIR EQ 'RECOVER' OR /* If recall/recover, then set */
&ACSENVIR EQ 'RECALL' ) /* &STORCLAS to the current */ - or alternatively,
SET &STORCLAS EQ &STORCLAS /* value. */
OTHERWISE /* In all other cases, routine */ - Entered to the right of the relevant statements in the code. In this case,
SET &STORCLAS EQ 'NORMAL' /* will continue and assign */
vertical alignment of the start and end columns of the comments provides a
END /* End SELECT-group 1. */ neat layout, which adds clarity to the routine.
END /* End main DO-group 1. */
END /* End of STORCLAS ACS Routine.*/
- As a rough guideline, there should be about the same number of comment
statements as program statements.
Smsacs.prs 21
Changes to ACS routines can affect an entire installation and therefore cannot be taken lightly.
Designing durable routines should be a primary objective for the storage administrator. Some
considerations having to do with code durability are included below.
Strive for Code Durability Furthermore, some of these variables can contain null values, or values that are not associated
with the data set that is currently being processed. For example, the &PGM variable is null in a
RECALL or RECOVER environment, and the &USER variable is set to the userid that is causing
the RECALL or RECOVER, not to the userid associated with the original allocation of the data set.
• Use durable variables
The durability of the ACS routine code will be greatly enhanced by using these variables rather
– The ACS environment than transitional variables wherever possible. Variables in this category are:
- The ACS environment variable (&ACSENVIR)
– Data set name related variables - Data set name related variables (&DSN, &HLQ, &LLQ, &NQUAL ....)
- The RACF default variables.
– RACF default variables
Minimize maintenance
• Minimize maintenance It is possible that the same FILTLIST may need to be coded for more than one ACS routine.
(Typically this may occur during the migration phase when FILTLISTs are built to include or
exclude data sets from DFSMS management.) This requirement can multiply the maintenance
– FILTLISTs common to more than effort by up to four times each time a change is made to the FILTLISTs. It also adds to the
volatility of the ACS routines. One technique for avoiding this duplicated effort is to code a
one ACS routine separate member (FILTLIST) in the ACS source library of duplicated FILTLISTs. This member
can be updated and then imbedded into each ACS routine as required.
A starter set for the DFSMS constructs and ACS routines is supplied in
SYS1.SAMPLIB.
Design Considerations Enforcing Installation Standards
It is possible within the ACS routines to enforce installation data set standards that
might previously have been controlled by user exits in the operating system.
In General Either the data class or the storage class ACS routine can be used for enforcing
installation standards.
In general, the storage class ACS routine can be used to enforce standards when:
• SMS starter set
- The data class ACS routine is not executed, such as during in- place volume
• Enforcing installation standards conversion and for data set recall or recovery.
– Resource class facilities - The standard to be enforced relies on allocation values that are not set until the
data class ACS routine has been exited.
STORCLAS/MGMTCLAS ACS
defaults The data class ACS routine can be used for all other installation standards
enforcement to encompass the following:
• DFSMShsm RECALL/RECOVER
- VOL=REF backward DD references that bypass the storage class ACS routine.
• PDSE
- Fail an allocation as early as possible, thus avoiding the execution of the storage
• Artificial classes class ACS routine.
- Data sets that are redirected from DASD to tape may need a DATACLAS assigned
to provide SPACE allocation.
- Typically the storage class ACS routine is the most complex ACS routine. It can be
simplified if installation standards are enforced by the data class ACS routine.
Smsacs.prs 23
The value of each ACS default is found in the data set owner profile (either USER or
RACF Considerations GROUP). If the data set has a USER profile and an ACS default is blank, then the
USER's default GROUP profile is used for that ACS default. If no value is found through
RACF Resource Class Facilities STORCLAS and MGMTCLAS this process or ACSDEFAULTS=NO, then all the variables are set to null.
The STORCLAS and MGMTCLAS RACF general resource class facilities can be The use of RACF ACS defaults can reduce the complexity of the ACS routines because
used to prevent unauthorized use of privileged storage and management classes. they can address:
This removes the need to do complicated authorization checking in the ACS
routines. The use of the RACF resource class facilities has the following - All data sets for specific HLQs
advantages:
- All data sets for any number of USERs
- All data sets for any number of GROUPs
- Addition and removal of storage classes and management classes should not
affect the logic of the ACS routines.
Considerations for DFSMShsm RECALL and RECOVER
- Changes to the resource access list (adding and deleting users authorized to use DFSMShsm keeps track of the original storage and management class when migrating
specific storage and management classes) will not require extra coding within the or backing up a data set. During the recall or recover, these values are passed to the
ACS routines. ACS routines. There are several ways to handle DFSMShsm recall and recover.
These ACS defaults are specified through RACF on the DATAAPPL, DATACLAS,
STORCLAS, and MGMTCLAS portions of the DFP segment associated with the Artificial Classes
owner of the data set if defined in RACF. The data set owner is either specified in An artificial class is a class that has no attributes coded and is used purely as a switch
the data set profile in the RESOWNER field or the HLQ of the data set if no for ACS logic. These classes will never be assigned to any managed data sets. An
RESOWNER is specified. When the ACS routines are entered, the following example is shown in the next section of foils.
variables are set to the associated RACF ACS default if specified:
Bypassing the normal ACS routine process may be necessary in emergency situations.
- APPLIC Therefore, the ACS routines must allow specific users to assign any class or select any
storage group for the data sets. Sufficient RACF authority to both data set and SMS
- DEF_DATACLAS class profiles must be provided for these users. Consideration needs to be given to the
- DEF_STORCLAS need for emergency bypass when there is a disaster recovery situation.
- DEF_MGMTCLAS.
USE FILTLIST TO SIMPLIFY CODING
Use FILTLIST FILTLISTs are a practical, easy- to- update way to simplify code for the testing of
multiple OR conditions, using INCLUDE lists. Their power lies in their ability to
To Simplify Coding combine literals and data set masks in its INCLUDE and EXCLUDE lists. By
grouping FILTLISTs at the beginning of ACS routines, the number of executable
code can be reduced, and its readability enhanced.
Instead of complex AND and OR testing FILTLISTs can also be used to build NOT conditions, through the use of
EXCLUDE lists.
SELECT
WHEN ((&LLQ EQ 'CNTL')
Instead of complex AND and OR testing
OR (&LLQ EQ LINK* AND &LLQ NE 'LINKLST")
OR (&LLQ EQ SRC*)) In this example the low level qualifier of a data set is being tested. The technique is
DO a complex series of AND/OR testing in a case statement. The code is not straight
forward, and the results of the test are not obvious. This type of coding is not
. recommended. Instead, use FILTLIST to simplify coding.
.
Use FILTLIST INCLUDE and EXCLUDE Use FILTLIST INCLUDE and EXCLUDE
By using the INCLUDE and EXCLUDE parameters of the FILTLIST statement ACS
FILTLIST &PDSF routine logic can be greatly simplified. One can see the code is simple and easy to
INCLUDE ('CNTL',LINK*,SRC*) understand.
EXCLUDE ('LINKLST')
.
.
SELECT
WHEN (&LLQ EQ &PDSF)
DO
.
.
Smsacs.prs 25
USE FILTLIST TO MINIMIZE CHANGES
To Minimize Changes FILTLIST statements can be used to minimize changes. For example, set up a
FILTLIST to identify applications under SMS control. The FILTLIST can be used in
subsequent code of the ACS routine. When a new application is converted to
SMS, one can simply update the FILTLIST statement thus leaving the code
To add new application untouched.
FILTLIST &SMS_APPLIC
INCLUDE(ACCOUNT.**,TEST.**,SALES.**,...)
.
.
SELECT
WHEN (&DSN EQ &SMS_APPLIC)
DO
.
. Smsacs.prs 26
USE PARENTHESES TO GROUP OR CONDITIONS
Group OR Conditions Without parentheses, the AND conditions will be tested first, and results may differ
from what is expected.
Is equivalent to
AND conditions tested before OR
By using parentheses, it is obvious which condition will be tested first - the
condition in parentheses. Use parentheses to clarify the logic in your ACS
routines.
WHEN &LLQ=&PDSF OR &DSORG='PO' AND &USER='MYONE'
And different from
By just one change in the parentheses, the entire logic will change.
Is equivalent to
WHEN &LLQ=&PDSF OR
(&DSORG='PO' AND &USER='MYONE')
Smsacs.prs 27
PLACE TESTS IN THE PROPER SEQUENCE
Place Tests in the Proper In general, there should be no overlapping between the character strings and
masks used in tests. If it should be necessary, test for the specific cases before
Sequence testing for the general ones. Remember, once a true WHEN has been
encountered, the rest of the SELECT is not processed.
DFSMShsm Recall/Recover DFSMShsm keeps track of the original storage and management class when
migrating or backing up a data set. During the recall or recover, these values are
passed to the ACS routines.
PROC &MGMTCLAS
Our recommendation is that, where practical, do not accept the storage class and
management class presented to ACS. Rather, re- drive the allocation through the
FILTLIST &VALID_MGMTCLAS INCLUDE ACS routine and redetermine the class. However, depending on how ACS routines
are written and the variables used to assign classes, this may not always be
('STANDARD','EXTRABAK',..) possible. For example, if you are use RACF group or userid to assign classes in
FILTLIST &DF_ENVIR INCLUDE ('RECALL','RECOVER') the first place, then you will almost certainly want the original class assigned during
DFSMShsm recall/recover. (The ACS variables &GROUP and &USER are not
. available during DFSMShsm recall/recover.) However, if you are restoring data
. sets from another site, you should always redetermine the classes.
.
If you decide to accept the class presented to the ACS routine, then you should
SELECT check the names to see if they are still valid. Here are two situations that could
WHEN (&ACSENVIR EQ &DF_ENVIR) cause problems:
SELECT
WHEN (&MGMTCLAS EQ &VALID_MGMTCLAS) - The class has been removed from the SMS configuration. Any attempt to use
an undefined class will cause allocation failure.
DO - The attributes for the class have been altered since the creation of the data
SET &MGMTCLAS EQ &MGMTCLAS set but the class name remains the same. The data set will be given a wrong
service level.
/*Accept as is*/
END /*when*/ If you decide to check classes, then the list of valid classes must be maintained in
OTHERWISE your ACS routines. The addition and removal of classes should occur infrequently
for an SMS installation that is in production.
SET &MGMTCLAS EQ '' /*redrive through*/
END /*select*/
.
.
Smsacs.prs 29
DATA THAT MUST BE SYSTEM- MANAGED
System-Managed The ACS routines can be used to ensure that a storage class is always assigned to
the PDSE data sets.
PDSE
PROC &DATACLAS
.
.
SELECT
.
WHEN &DSNTYPE EQ 'LIBRARY'
DO
SET &STORCLAS='BASE'
/*ENSURE SYSTEM MANAGED*/
EXIT
END
.
.
Smsacs.prs 30
USING ARTIFICIAL CLASSES
These classes will not be assigned to any data sets. They will be used as
indicators to the ACS routines.
• These classes will not be assigned to
any data sets Example - SMS Starter Set
The SMS Starter Set uses the "artificial" storage class "NONSMS" to enable
• Example - in SMS Starter Set authorized users to allocate a non- SMS data set. Another example is to define a
data class with the name "YES". This data class will be tested in the data class
– "NONSMS" storage class ACS routine A data class will be determined by the routine only when
DATACLAS=YES is specified externally.
– Allow authorized users to allocate
non-SMS data sets
– Specified externally -
//DDX DD DSN=SYSPGM.MUST.BE.NONSMS,STORCLAS=NONSMS, ...
Smsacs.prs 31
The first stage is to test the new SCDS prior to activation:
- Define test cases for each decision point by using the ISMF test facility. These
Testing ACS Routines test cases should be based on the data classification exercise detailed in previous
foils. A test case must be defined for each leaf that has been identified as requiring
special class assignment. Test cases must also be defined for all further decision
points in the code logic. These decision points are WHEN or IF conditional
statements and will be identified when designing the structure of the ACS routines.
Stage 1
It is possible to define a set of test cases by using ISMF to save specific data set
Execute test cases for each leaf lists that contain the criteria necessary for a specific test. Then the saved lists can
be processed by REXX or CLIST to create the test cases.
- Generate bulk test cases to use for regression testing in the initial
implementation phase by using ISMF to save data set lists or the storage class
Stage 3 ACS exit if SMS is active. Then process the saved lists or SMF data to create test
libraries for the ISMF test facility. (REXX or CLIST can be used to create the code
Execute tests against an active to process the saved lists into test case libraries.)
configuration
- Execute the test cases by using the ISMF test facility to process each test
library.
The third stage is to activate the new configuration and test using the
preproduction methods described in the next section.
Smsacs.prs 32
Testing with the ISMF Test Facility
The following should be taken into consideration when using the ISMF test facility:
Testing Methods - Successful test results produced by the ISMF test facility should not be relied
upon as a complete and representative test of the ACS routines. Coding ISMF test
cases is a manual task (unless created by CLISTs or REXX) and therefore error
prone.
• ISMF test facility - Using the data classification output and a diagram of the structure of the ACS
routines, a person other than the ACS routine code developer should be able to
code test cases that may exercise the code logic more thoroughly.
• DFSMSdss CONVERTV - Code descriptions should be provided for each test case to identify the nature
of the test for future tests and regression testing.
– TEST keyword
– REDETERMINE Testing with DFSMSdss CONVERTV TEST
Consider the following when using DFSMSdss CONVERTV TEST to test the ACS
routine:
• ACS Write statement
- The output generated from a CONVERTV TEST is in a format that is
complicated to read. It is possible to postprocess the output using REXX or CLIST
to present the results in a simplified manner.
• SC ACS Exit
- The TEST keyword does not test all aspects of an actual CONVERTV
conversion. It is possible to achieve a zero return code with the TEST keyword and
then fail the actual conversion when the TEST keyword is removed. One example
is when a data set is allocated. CONVERTV with TEST will complete with a zero
return code. When TEST is removed, the data set that is allocated will cause an
error. Another example is RACF checking. No checking is carried out with
CONVERTV and TEST. When the TEST keyword is removed, any unauthorized
use of a class will fail the CONVERTV.
When the TEST keyword is specified with DFSMSdss CONVERTV, the conversion is
simulated for storage class and management class ACS routines; no actual physical
conversion takes place. The data class and storage group ACS routines will not be
entered. If the data that is to be migrated to DFSMS management is contained on one
or more volumes, the TEST keyword can be a valuable tool to produce bulk test output
and for regression testing.
REDETERMINE Keyword
This keyword can be added to a DFSMSdss CONVERT with TEST to redetermine the
classes for all existing managed data on one or more volumes. The output from this
operation can be compared to existing class assignments, and exception, can be
noted. This method also adds to regression testing.
The WRITE statement can be used to provide "trace" facilities from within the ACS
routines to aid preproduction testing.
The storage class ACS exit (IGDACSSC) can be used to enhance the testing of ACS
routines. This exit captures the ACS variables used in allocation and writes them to
SMF. The SMF records can be processed to:
This sample exit allows the variables to be recorded to SMF or the JOBLOG. This can
be triggered by adding the field DEBUG to the step accounting information of the job.
The account field is not available in some ACS environments, such as RECALL.
Therefore, no ACS variables will be written in these circumstances.
You must allocate either a sequential data set, a member of a partitioned data set
(PDS), or a member of a partitioned data set extended (PDSE) for each of the
ACS routines that you intend to write. As a general guideline, use an LRECL of
Maintaining ACS 80. After allocating the data sets you can EDIT them from ISPF or alternatively,
select option 7, Automatic Class Selection Application, from the ISMF Primary
Routines Option Menu.
After creating an ACS routine, you must translate it into executable form. The
translation process checks your source code for syntactic and semantic errors,
Source code: generates an object form if no errors exist, and places the object form into the
PS SCDS you specified on the translate panel. If the ACS routine that you are
translating already exists in the SCDS, the new object form replaces the existing
or PDS object form. To translate an ACS routine, select option 2, TRANSLATE, from the
ISMG Automatic Class Selection Application Selection panel.
or PDSE
with LRECL=80 SMS validates the entire SCDS when it is saved. You can validate the individual
ACS routines of an SMS configuration after successfully translating them. You
should also validate the entire configuration yourself so that you can see any error
Translate to Object code: messages that result. To validate an ACS routine, select option 3, VALIDATE on
the Automatic Class Selection Application Selection panel.
SCDS
It is necessary to ACTIVATE the configuration for any changes made to the SCDS
to take effect. Select option 8, Control Data Set, from the ISMF Primary Option
Validate Menu.
To display information about the currently active configuration, issue the following
Activate ACDS command:
D SMS,ACTIVE or D SMS
where D is an abbreviation for DISPLAY. (The default for the DISPLAY command
is to display the active configuration when no options are specified.). The display
D SMS on console to display shows the names of the current control data sets.
Smsacs.prs 35
A rigorous approach to change management is imperative in maintaining ACS routines.
Consider the following:
Maintaining ACS - A change control and problem management system should be set up for the
constructs and ACS routines during the initial implementation phase.
Routines
- Use RACF to restrict the use of SMS- related ISMF applications to authorized
personnel.
• Set up a change control and problem - Include detail and meaningful comments in the ACS routines
management system
- Keep a minimum of four different SCDS data sets:
– SCDSs Each source code data set should only contain source for one
– ACS routines - data class routine
- storage class routine
– Test cases and results - management class routine
- storage group routine.
• Keep at least one backup copy of the - Keep results of the translation and validation of all configurations
latest ACDS - There must be at least one ACDS data set in case of corruption of the ACTIVE
Smsacs.prs 36 ACDS.
Use the SMF Type 42 subtype 3 records "New Configuration Change Audit" to log
all changes made to the active configuration. This record is written when issuing:
– Log changes made to the active When the SMS subsystem is active, any change to the active configuration can
configuration affect all users who create data sets. Therefore, the timing and nature of changes
must be considered.
Smsacs.prs 37
More Documentation
Sample code:
• http://www.interlog.com/~hal/mvss
Smsacs.prs 38
Summary
• Document procedures
Smsacs.prs 39