Abstract:
The purpose of this document is to demonstrate, in a technical way, the configuration of the writing process of User SMF type records as well as their Layout generation (the subsequent reading of the records will not yet be covered in the scope of this document) for the IBM Change solution Data Capture for Db2 for Z/OS version 11.4, which will from now on be designated by the abbreviations of its initials: CDC
General considerations:
The following examples were run in an emulated environment using IBM zDT version 13 software, whose z/OS version is 02.03
Two steps will be covered, namely:
- Write SMF user records for CDC
- Generate Layout of SMF Records for CDC
Records SMF General Consideration
1.1 - Setting to Enable Writing:
First of all, two parameters are necessary to indicate to the CDC to start the writing process of the SMF records: SMFTYPE and SMFINTERVAL
Such parameters must be declared in member CHCCFGxx belonging to target dataset SCHCDATA
To generate the Layout, whose purpose is to display all SMF fields records for CDC, their respective types and sizes, it is necessary to invoke a Macro through an Assembly program
This macro is found in the Target-Lib SCHCMAC, and it is called CHCSMFRC:
Submit this JCL below, passing the TLIB SCHCMAC and Macro CHCSMFRC into DD statements:
//ASMCHC JOB (),,CLASS=A,MSGCLASS=H,TIME=1440, RESTART=RUN,
// NOTIFY=&SYSUID,MSGLEVEL=(1,1),REGION=0M,COND=(4,LT)
/*
//COMPILE EXEC ASMACL,PARM.L='MAP,LET,LIST,CALL'
//C.SYSLIB DD
// DD DISP=SHR,DSN=CDC.V11R4.SCHCMAC
//L.SYSLIB DD DISP=SHR,DSN=CDC.V11R4.LINKLIB
//L.SYSLMOD DD DISP=SHR,DSN=CDC.V11R4.LINKLIB(CHCSMF)
//C.SYSIN DD *
TITLE 'PROGRAM ASMCHC'
PRINT GEN
ASMCHC CSECT
YREGS EQUATE DE REGS.
STM R14,R12,12(R13) SALVA REGISTRADORES
LR R12,R15 CARREGA R15 EM R12
USING ASMCHC,R12 SETA REG. BASE
LA R10,SAVEAREA SETA LINKAGE
ST R13,4(,R10) "
ST R10,8(,R13) "
LR R13,R10 "
*PROGRAMA FONTE
*FIM
LA R15,0 ZERA RETURN-CODE
LR R1,R13 PREPARA SAIDA DO PROGRAMA
L R13,4(,R13) "
L R14,12(,R13) RESTAURA R14
LM R2,R12,28(R13) RESTAURA R2 - R12
BR R14 SAIDA DO PROGRAMA
LTORG
DS 0F
SAVEAREA DS 18F SAVEAREA
CHCSMFRC LIST=YES,NOTES=NO
END
/*
//
Note: Thanks to Gustavo Lozano for delivery this JCL code
The above JCL generates as a result the Layout for the SMF records written by the CDC
2.3 LAYOUT
The fields are grouped into task names categories where each has a type of responsibility
https://www.ibm.com/docs/en/idr/11.4.0?topic=records-cdc-tasks-referenced-in-smf
To calculate the length of each segment it is necessary to apply hexadecimal arithmetic, subtracting the Offset value from the previous Offset value
Task data segments that describe the data written by the different task types do not appear in the SMF user record in any particular order. When coded logic is "walking" over the task data segments in a record, each segment must be identified by the segment header's content and not by its position in the SMF record
OSC Task segment: