DFSMS ACS routines
DFSMS, z/OS System Managed Storage - ACS Routines
ACS routines are used to assign the 4 SMS classes to datasets, tapes or objects. These routines can interrogate a number of read-only variables such as &DSN (datasetname) and &JOB (job name) then use that info to decide what values to assign to the 4 read-write variables &DATACLAS &MGMTCLAS &STORCLAS &STORGRP.
The four ACS routines are processed in the order DATACLAS - STORCLAS - MGMTCLAS - STORGRP. If a data allocation is redriven from DFHSM or DFDSS then it can go straight to the STORCLAS routine. If an allocation is not to be SMS managed then it will exit at the STORCLAS routine with the &STORCLAS variable set to NULL.
You will store your base ACS routines in a PDS, and its name will be unique to your site. The ACS routines are split into two sections, the first section combines lists of files and objects together, the second section contains the code which processes those lists. The ACS routines are processed every time a dataset is allocated, so SMS can be a big CPU user. However, SMS uses cross-memory services, so the CPU is not allocated to the SMS address space, but is passed over to the address space of the requesting user. This means that its difficult to determine just how much CPU SMS is using. CPU is expensive, so
- Keep the ACS routines simple
- Put popular hits at the front of the code
- If you have SMS compatible dataset names, you can keep your filtlists simple by using dataset name patterns. If you are replacing an older system, or introducing a new one, use the opportunity to influence the naming standards to make them SMS friendly. Its not a good idea to go to the expense of renaming all your files just to fix SMS.
- Select ... When ... Otherwise statements are easier to write and understand, than nested If .. then .. else .. statements. Remember to code EXIT statements at the end of every WHEN clause, or everything will default to the otherwise clause.
SELECT WHEN (&DSN = &HSMCDS) DO SET &MGMTCLAS = 'CONCCOP' EXIT END WHEN (&DSN = &SYSTEM) DO SET &MGMTCLAS = 'NOMGMT' EXIT END OTHERWISE DO SET &MGMTCLAS = 'DEFAULT' EXIT END END /* OF SELECT */
To make changes to your ACS routines follow the process below.
- Take ISMF option 7 - UPDATE then option 1. EDIT to edit your routines. You will need to supply the name of your ACS library here. Strictly speaking, you do not need to use ISMF for this option, you could edit the library directly from TSO. You site will almost certainly have a process for this that involves taking a backup of the routines first.
- Once you have edited your routine, take option 2, TRANSLATE. This will produce a dataset that lists out what happened during the translation and hopefully tells you that it was successful. If not, go back to EDIT, fix the errors then try another translation. When you come out of the TRANSLATE panel ISMF will ask you what you want to do with the listing file. Unless your site process requires that you keep the listing for audit purposes, I'd suggest that you always delete the listing file. The reason why is that it could be some weeks before you make another change, your file will probably get migrated to tape, then you have to wait for the recall next time you want to make a change.
- Take option 3 VALIDATE. This checks that the ACS routines are consistent with the whole SMS Setup. Again, I'd suggest you delete the listing file when you are finished
- Test your routines. Many sites have a pre-defined set of test scripts that you can run through to make sure that your change will not affect existing rules and allocations.
- When you are happy with your testing, go back to the main ISMF menu and take option 8. Control Data Set, then option 5, ACTIVATE. This promotes your new ACS routine from the SCDS to the ACDS and refreshes anything in storage on every LPAR.