Page 1 of 1

alter storage class attributes by batch job

PostPosted: Tue Sep 11, 2018 5:50 pm
by bahareh
Hello!
Can anyone help me to alter a specific storage class by batch job, before and after running another batch job?

I need to set GUARANTEED SPACE attribute to "Yes" before running the job and set it to "NO" after running the job.

Re: alter storage class attributes by batch job

PostPosted: Tue Sep 11, 2018 6:54 pm
by Robert Sample
From https://www.lascon.co.uk/zOS-DFSMS-Storage-Class.php :
Specifically placing data

This is the other side of the coin. You want a dataset to be SMS managed, but you want to place it onto a specific disk. A good example, is the FDRABR initialisation dataset, which must go on the correct disk. You do this by using an SMS construct called 'guaranteed space'.
When you define a storage class in ISMF, you will see a parameter

Guaranteed Space . . . . . . . . . N

You change the pre filled 'N' to a 'Y', and SMS will not guarantee you any space, but it will guarantee to give you the volume you ask for. Its your responsibility to check that the space is there.

This is a powerful facility which lets you override all SMS control. I suggest you restrict it to a controlled set of users, using the following.
Define a storage class called something like GSPACE, which has the guaranteed space attribute set to 'Y', and define a Filtlist which contains explicit users who can override SMS, or pattern masks of users that can override SMS, if you RACF naming standards let you do this.

If you specify a storclass of 'GSPACE', and if you are contained in the list of authorised users, you will get the volume you asked for, otherwise, you drop down to a default value.
So you should be able to define a storage class of GSPACE as the quote indicates, then define a storage class with guaranteed space set to N, and with appropriate ACS routine rules you should be able to accomplish what you want. If you are not a storage administrator at your site, you will need to work with your site support group to accomplish what you want.

Re: alter storage class attributes by batch job

PostPosted: Tue Sep 11, 2018 7:27 pm
by willy jensen
The only SMS batch job interface I am aware of is Naviquest, described in the 'DFSMSdfp Storage Administration' manual chapter 'Using NaviQuest'. However it seems a bit complicated what you are looking for as that will require changing one or more SMS ACS routines before and after running that job of yours. I will strogly suggest a permanent GUARANTEED SPACE storage class, protected against misuse.
Perhaps you can tell us why you want/need to do as described?

Re: alter storage class attributes by batch job

PostPosted: Wed Sep 12, 2018 11:40 am
by bahareh
Robert Sample wrote:From https://www.lascon.co.uk/zOS-DFSMS-Storage-Class.php :
Specifically placing data

This is the other side of the coin. You want a dataset to be SMS managed, but you want to place it onto a specific disk. A good example, is the FDRABR initialisation dataset, which must go on the correct disk. You do this by using an SMS construct called 'guaranteed space'.
When you define a storage class in ISMF, you will see a parameter

Guaranteed Space . . . . . . . . . N

You change the pre filled 'N' to a 'Y', and SMS will not guarantee you any space, but it will guarantee to give you the volume you ask for. Its your responsibility to check that the space is there.

This is a powerful facility which lets you override all SMS control. I suggest you restrict it to a controlled set of users, using the following.
Define a storage class called something like GSPACE, which has the guaranteed space attribute set to 'Y', and define a Filtlist which contains explicit users who can override SMS, or pattern masks of users that can override SMS, if you RACF naming standards let you do this.

If you specify a storclass of 'GSPACE', and if you are contained in the list of authorised users, you will get the volume you asked for, otherwise, you drop down to a default value.
So you should be able to define a storage class of GSPACE as the quote indicates, then define a storage class with guaranteed space set to N, and with appropriate ACS routine rules you should be able to accomplish what you want. If you are not a storage administrator at your site, you will need to work with your site support group to accomplish what you want.


Many Thanks for your useful link and clear guidance.

Re: alter storage class attributes by batch job

PostPosted: Wed Sep 12, 2018 11:49 am
by bahareh
willy jensen wrote:The only SMS batch job interface I am aware of is Naviquest, described in the 'DFSMSdfp Storage Administration' manual chapter 'Using NaviQuest'. However it seems a bit complicated what you are looking for as that will require changing one or more SMS ACS routines before and after running that job of yours. I will strogly suggest a permanent GUARANTEED SPACE storage class, protected against misuse.
Perhaps you can tell us why you want/need to do as described?


Dear willy,
Many thanks for introducing Naviquest which solved my problem.
I have a storage group which many backup datasets sits there every night. in one of our night routines, its required to allocated some other datasets on specific volumes of this storage group.
so I have to set “Guaranteed Space” before and after that job.

The JCL I used is as follows:

//ALTERSTC JOB (ACCT),'IBMUSER',MSGCLASS=H,                  
//      NOTIFY=IBMUSER,CLASS=A,MSGLEVEL=(1,1),TIME=(0,10)    
//MYLIB JCLLIB ORDER=SYS1.SACBCNTL                          
//STEP1   EXEC ACBJBAOB,                                    
//        TABL2=IBMUSER.TEST.ISPTABL                        
//SYSUDUMP DD  SYSOUT=*                                      
//SYSTSIN  DD *                                              
PROFILE PREFIX(SYS1)                                        
ISPSTART CMD(ACBQBAS1 ALTER +                                
SCDS(DFSMS.SCDS) +                                          
STCNAME(SCLARGE) +                                          
GURNTSPC(Y) +                                                
)                                                            
/*                                                          
//DISPLAY EXEC ACBJBAOB,                                    
//        TABL2=IBMUSER.TEST.ISPTABL                        
//SYSUDUMP DD  SYSOUT=*                                      
//SYSTSIN  DD *                                              
PROFILE PREFIX(SYS1)                        
ISPSTART CMD(ACBQBAS1 DISPLAY +            
SCDS(DFSMS.SCDS) +                          
STCNAME(SCLARGE) +                        
)                                          
//SETSMS EXEC PGM=IEFBR14                  
//C1 COMMAND 'SETSMS SCDS(SYS1.DFSMS.SCDS)'

Coded for you