Enhanced SMF record filtering
Enhanced filtering of records (relocatable sections)
One of the greatest obstacles of the „SMF dump programs“ is that no decent filtering has ever been introduced in 30 years. In RA2002 we included with V3.7.0 (once GA) such a facility that a user can select SMF records by using a „similar„ language as found in the DFSORT manual. A user has simply to add 2 IBM defined exit names called USER2(SMF$XT20) and USER3(SMF$XT21). Note: The complete I/O is fully handled by the IBM program IFASMFDP/DL and not by the supplied exits. racfra2.com Corp. holds the copyright to this technology, concept and design - © 2010. DFSORT is a trademark of IBM.
One additional obstacle is that e.g. the DFSORT is unable to INCLUDE/EXCLUDE fields when relocatable sections and or number of relocatable sections have to be processed.
Additions to the +INCLUDE control statement
So far we discussed this statement in the previous pages:
+INCLUDE COND=((startpos,length,format,comparison,string) ,AND/OR,(..........))
To be able to process data which are pointed by the a relocatable section and or a counter for the number of such section, additional positional fields are required. These fields appear only after the start position(startpos):
+INCLUDE COND=((0006,1,HX,EQ,50),AND,(0001(0004,H38,H40,I1,0),1,HX,EQ,01),AND,(0001(0004,H38,H40,I1,2),04,CH,EQ,ICQ.),OR,(0001(0004,H38,H40,I1,2),04,CH,EQ,MQM.))
Working with relocatable sections
To get an understanding on how relocatable work with SMF records please refer to the section ‚RACF SMF TYPE 80‘.
How to use relocatable section in an +INCLUDE statement
To be able to access a relocatable section 5 new fields must be specified immediatly after the start field e.g. (0001(...........),04,CH,EQ,text)
(0001(A,B,C,D,E),04,CH,EQ,MQM.)
A = This is an offset which may be required as by SMF80REL field. E.g. Offset to the first relocate section from the beginning of the record header (SMF80FLG). In this case an offset of 4 must be specified due to the RDW of the SMF record. The range for „A“ is 0-32760. Note: The offset is relative to the begin of the record which starts at address ‚0‘.
B = Specifies the location where we find the relocatable section. E.g. SMF80REL field can be found at position 38 and is 2 bytes long. It must be specified as Hxxxxx. In the sample here we define it for RACF SMF type 80 as H38. This offset does not change and is fix. Valid definitions for „B“ are: Fxxxxx, Hxxxxx, Ixxxxx or Z(ero), where xxxxx specifies the offset into the record to locate the relocatable value e.g. to point to SMF80DTP. Note: The offset is relative to the begin of the record which starts at address ‚0‘.
C = Specifies the location where we find the number of relocatable sections. E.g. SMF80CNT field can be found at position 40 and is 2 bytes long. It must be specified as Hxxxxx. In the sample here we define it for RACF SMF type 80 as H40. This offset does not change and is fix. Valid definitions for „C“ are: Fxxxxx, Hxxxxx, Ixxxxx or Z(ero), where xxxxx specifies the offset into the record to locate number of relocatable sections e.g. to point to SMF80DTP. Note: The offset is relative to the begin of the record which starts at address ‚0‘.
D = Specifies the location where we find length field in relocatable sections. E.g. SMF80DLN field can be found at position 1 and is 1 byte long. It must be specified as Ixxxxx. In the sample here we define it for RACF SMF type 80 as I1. This offset does not change and is fix. Valid definitions for „D“ are: Fxxxxx, Hxxxxx, Ixxxxx or Z(ero), where xxxxx specifies the offset into the relocatable sections e.g. to obtain the length of the data. Note: The offset is relative to the begin within a relocatable section which starts at address ‚0‘.
E = Specifies the location where we find the data in the relocatable section. Below can be seen that the length of the field is at position 1 and the data starts at position 2(SMF80DTA).
Sample
+INCLUDE COND=((0006,1,HX,EQ,50),AND,(0001(0004,H38,H40,I1,0),1,HX,EQ,01),AND,(0001(0004,H38,H40,I1,2),04,CH,EQ,ICQ.),OR,(0001(0004,H38,H40,I1,2),04,CH,EQ,MQM.))
Above sample validates a record based on following criterias:
1. (0006,1,HX,EQ,50) - get SMF TYPE 80 records only
AND
2. (0001(0004,H38,H40,I1,0),1,HX,EQ,01)) - get only SMF80DTP type from the relocation section which are X’01’ i.e. only resource names. The offset to the SMF80DTP type is zero(0). The length must e.g. I1 still be defined as we work here with repeating fields.
AND
3. (0001(0004,H38,H40,I1,2),04,CH,EQ,ICQ.)) - get only SMF80DTA data from the relocation section where the resource name is ICQ. The data always starts at offset 2 for SMF80REL type data.
OR
4. (0001(0004,H38,H40,I1,2),04,CH,EQ,MQM.)) - get only SMF80DTA data from the relocation section where the resource name is MQM. The data always starts at offset 2 for SMF80REL type data. You can use as well a generic search by using e.g. (0001(0004,H38,H40,I1,2),00,CG,EQ,MQM.**))
Sample - output
Note
If the length field is set to zero e.g. (0001(0004,H38,H40,I1,2),0,CH,EQ,MQM.) then to routine will use length found in e.g. SMF80DLN as specified in the supplied parm list. „I1“ specifies that the offset to the length field is at offset 1 and size if the length field is one byte. I=1byte followed by the offset into the relocatable section, H=half word followed by the offset into the relocatable section, F=fullword followed by the offset into the relocatable section, Z=zero - offset into the relocatable section.
Sample - output: Using generic search within relocatable sections. The data length of within the relocatable section will be used as the length in the control card is set to ZERO. This allows to perform simple generic searches on e.g. RACF resources names. Such functions are not available by e.g. DFSORT or IFASMFDP or IFASMFDL programs.
Sample of an SMF type 80 record with the relative location offset „H38“. This is the offset to the relocatable section.
Sample of an SMF type 80 record with the relative location offset „H40“. This is the offset to the number of relocatable sections within the SMF record.
Sample of an SMF type 80 record showing the data in the relocatable section:
e.g. Relocation section type x’01’ followed by a length byte, followed by the dataset „SOMMVS.SGOSPNLS“ accessed. After that you can see the relocation type X’03’ etc. following. There is no way to extract such data via the standard SORT programs until such features will ever built in.