Best Practice for ACF2 CLASMAP Definitions
search cancel

Best Practice for ACF2 CLASMAP Definitions

book

Article ID: 207311

calendar_today

Updated On:

Products

ACF2 ACF2 - MISC ACF2 - z/OS

Issue/Introduction

What are the suggested best practices for CLASMAP definitions in ACF2? Can an ACF2 default CLASMAP definition be remapped to a different type code? Can a CLASMAP definition be changed when there are already rules written for a resource?

Resolution

The CLASMAP record translates resource class(1 - 8 characters) names into three-byte ACF2 resource TYPE codes. These TYPE codes are then used to write resource rules in ACF2.

It is recommended when setting up a resource for the first time, a unique type code should be defined for the resource.

If a resource does not have a CLASMAP definition, the type code will default to the first 3 characters of the resource class. This can have undesirable consequences if there are multiple resources that share the same first 3 characters as a site may not want certain resource rules grouped with another resource. Mapping resource classes to a unique TYPE codes facilitates the management of resource rules.

Some resources are already set up in ACF2 with default type codes. For example, there are many SDSF resources such as SDSF, JESSPOOL, WRITER and OPERCMDS that have a default type code of SAF. To set up a unique type code for each of these resources, the following example can be used:

SET Control(GSO)
Insert CLASMAP.SDSF RESOURCE(SDSF) RSRCTYPE(SDF) ENTITYLN(63)
Insert CLASMAP.WRITER RESOURCE(WRITER) RSRCTYPE(WTR) ENTITYLN(39)
Insert CLASMAP.JESSPL RESOURCE(JESSPOOL) RSRCTYPE(SPL) ENTITYLN(53)
Insert CLASMAP.OPRCMDS RESOURCE(OPERCMDS) RSRCTYPE(OPR) ENTITYLN(39)

These commands insert a CLASMAP record with an externally defined TYPE code. Issue an F ACF2,REFRESH(CLASMAP) command to refresh the CLASMAP record. Then a SHOW CLASMAP command can be issued in TSO ACF2 to see the updated definitions. Any site external CLASMAP definition will override ACF2 default definitions. External definitions will have 'EXT' listed in the EXTERNAL column. 

Note: If resource rules are already in place, it is not recommended to change the CLASMAP record for that resource. If a CLASMAP record is changed, all the rules for that resource will need to be recompiled and stored under the new type code. There is not a straightforward way to distinguish resources if they have all been defined under the same type code.

Sometimes the $KEY of a resource rule can determine what the actual resource is, but other times a site will need to go back through product documentation to determine what resource a rule belongs to. Depending on how many resource rules are written under a certain type code, this can be a challenging task.

 

Additional Information

For more information on CLASMAP records, please see the section in the ACF2 documentation titled SAF Resource Classes (CLASMAP).