Mainframes 360
The one stop destination for System Z professionals

Monday, July 13, 2009

Storage Management System - SMS

Read more tutorials on JCL >>

Q. What is the Storage Management System(SMS)? What is it used for?

The Storage Management System(SMS) is important part of the MVS O/S. Its function is to manage Storage Space. In other words, the memory manager of the MVS is called Storage Management System(SMS).

What meaning does this have when you write JCL? Its quite simple. When you write JCL/Batch JOBs, you often need to store your output/results, in OUTPUT Dataset. Moreover, you also need to store intermediate results of processing in Temporary/Work Datasets. When you create a new Dataset, for storing output, you must tell the MVS, how much storage space should be RESERVED for the dataset. That is, you need to declare/announce to the MVS, how much Storage Space(which is either in TRACKS,CYLS,BLKS,KB,MB) to keep aside for your dataset. Why do you need to do this?
Q. Why do you need to announce or make a declaration to MVS, “I need 1 TRACK Primary space, and 1 TRACK of secondary space?”

The reason is because, MVS O/S is a memory guard. It protects the memory. You cannot directly go ahead and store data in a Mainframe Computer’s memory. You need to first request the MVS O/S, “I need a few tracks of memory space to store my output data”. You need to properly/explicitly say, How much Storage Space you need – 1 track, 2 tracks, 5 cylinders, exactly how much? Not just this, you need to tell the MVS, the device and the volume on which you desire this storage space. Only when the MVS grants your request, and exclusively reserves Storage Space for you, you can then go ahead and store output dataset in it.

Thus, the MVS O/S acts like a miser. It does not give any TRACKS for free. Even if you want a single(1) byte of Storage Space, you need to first ask the MVS O/S.
Q. And how do you make this request to MVS O/S?

You already know it..! You do this by coding the SPACE parameter on the DD Statement, which creates a new dataset in the Batch JOB/JCL. If you need to brush up, on how the SPACE Parameter works, you can jump to the relevant tutorial by click here.
Q. Alright, I’ve had enough of writing the SPACE Parameter every time, I wanted to create a new dataset. Isn’t there some automatic way of doing this?

That’s precisely, what Storage Management System(SMS) is all about. Storage Management System(SMS) handles all the storage-space related issues for you automatically. For example, it can calculate how much Storage Space, your dataset needs, on which volumes to store your dataset, when is your dataset no longer needed, and how often to backup your dataset etc. However, one must realize that you will need to specify in your JCL, that you want SMS to manage your dataset.

Thus, in a nutshell, SMS is a tool that helps you by automatically managing Storage-space related issues for you.

You simply need to rub the Magic Lamp, and SMS-genie will manage storage-related issues for you!
Q. How does SMS know, how much storage space you’ll need, what volume to store the dataset on, bla bla bla...?

Storage Management Subsystem(SMS) manages your datasets, by asking you a few questions :

1)What’s the Storage Class ?

- Storage Class STORCLAS : The Storage Class represents different categories of devices and volumes. Every category has a meaning. Category name can be 1-8 characters long. For example, a STORCLAS=CLASSOA could be representing all volumes on 3380 DASD Device.

Note : You need to specify STORCLAS parameter in JCL, to signal to the SMS to manage your dataset. Otherwise, you will have to specify SPACE and VOL parameters for the dataset.

- Looking at a JCL/Batch JOB, you can make out whether a dataset is SMS-Managed or not, by seeing the STORCLAS parameter.

2)What’s the Management Class ?

- Management Class MGMTCLAS : Management class represents different categories of management activities. For example, a MGMTCLAS=MGMT01 could mean all datasets which are backed up everyday, and retained upto 1 month.
It is not mandatory to specify the MGMTCLAS parameter.

3) What’s the Data Class ?

- Data Class DATACLAS : Data Class represents different characteristics of the dataset’s records, what will be their record length, record organisation, record format etc. Since SMS can also be used to manage VSAM Datasets, the DATACLAS can be used to specify the Control Interval Size, Control Areas, Free Space, Imbed option etc. relevant to VSAM Clusters.

Once again, it is not mandatory to specify the DATACLAS.

Apart from these, if you wish, you could also specify other parameters to the MVS such as (i) RECORG, which is used for VSAM Datasets and tells what type of cluster to create – KSDS, ESDS, RRDS (ii) KEYOFF and KEYLEN, which in the context of VSAM Dataset tells, where the key starts, and what is the length of the key respectively, as well as (iii) AVGREC.
Q. Cut the crap out! Just show me a Batch JOB/JCL which uses SMS to manage my dataset...

Very well... It couldn’t be easier.


Read more tutorials on JCL >>
References :
- Storage Management System – A marvel of IBM

To many people who are thrown to work at a mainframe computer on their first job, they feel lost. Mainframe people seem to speak a completely different language and that doesn't make life easy. What's more, the books and manuals are incredibly hard to comprehend.

"What on earth is a Mainframe?" is an absolute beginner's guide to mainframe computers. We'll introduce you to the hardware and peripherals. We'll talk about the operating system, the software installed on a mainframe. We'll also talk about the different people who work on a mainframe. In a nutshell, we'll de-mystify the mainframe.

Readers based in India, can buy the e-book for Rs. 50 only or the print book. International readers based in the US and other countries can click here to purchase the e-book.