A RACF request can be
- A callable service, such as IRRSDL00 which is used to extract information about keyrings. This can be used by High Level Languages. These have a trace type of OMVS
- A RACROUTE request, an assembler macro interface, such as FASTAUTH. These have a trace type of RACF.
You get a trace entry PRE the call, and and a trace entry POST the call. A callable service would have an OMVSPRE, and an OMVSPOST entry.
When setting up your RACF trace you need to define which callable service, or which RACROUTE requests you want to trace.
Example of a callable server
Entry trace
Trace Identifier: 00000036
Record Eyecatcher: RTRACE
Trace Type: OMVSPRE
Ending Sequence: ........
Calling address: 00000000 20801A0F
Requestor/Subsystem: ........ ........
Primary jobname: IBMINC5
Primary asid: 00000029
Primary ACEEP: 00000000 008FA8A8
Home jobname: IBMINC5
Home asid: 00000029
Home ACEEP: 00000000 008FA8A8
Task address: 00000000 008D6A88
Task ACEEP: 00000000 00000000
Time: DFF36A27 5460CC00
Error class: ........
Service number: 00000029
RACF Return code: 00000000
RACF Reason code: 01000000
Return area address: 00000000 00000000
Parameter count: 00000021
Interesting information
- Trace Type: OMVSPRE this is an entry trace
- Primary jobname: IBMINC5
- Home jobname: IBMINC5
- The RACF return and reason code have no meaning on entry
- Service number: 00000029 is hex so the service is 41. The RACF commands documentation says for a callable service, 41 is function number IRRSDL00.
Exit trace
Trace Identifier: 00000036
Record Eyecatcher: RTRACE
Trace Type: OMVSPOST
Ending Sequence: ........
Calling address: 00000000 20801A0F
Requestor/Subsystem: ........ ........
Primary jobname: IBMINC5
Primary asid: 00000029
Primary ACEEP: 00000000 008FA8A8
Home jobname: IBMINC5
Home asid: 00000029
Home ACEEP: 00000000 008FA8A8
Task address: 00000000 008D6A88
Task ACEEP: 00000000 00000000
Time: DFF36A27 5468DC40
Error class: ........
Service number: 00000029
RACF Return code: 00000008
RACF Reason code: 00000014
Return area address: 00000000 00000000
Parameter count: 00000021
Interesting fields
- Trace Type: OMVSPOST this is the exit trace
- As above service number 41 is function
- The RACF Return code is 8
- The RACF reason code is 14
Example of a RACROUTE trace
Entry
Trace Identifier: 00000036
Record Eyecatcher: RTRACE
Trace Type: RACFPRE
Ending Sequence: ........
Calling address: 00000000 A096A08A
Requestor/Subsystem: CRYPTO CRYPTO
Primary jobname: CSF
Primary asid: 00000038
Primary ACEEP: 00000000 008F6B98
Home jobname: IBMEXP
Home asid: 00000029
Home ACEEP: 00000000 008FA8A8
Task address: 00000000 008D6A88
Task ACEEP: 00000000 00000000
Time: DFF37DD1 AB7FF040
Error class: ........
Service number: 00000002
RACF Return code: 00000000
RACF Reason code: 00000000
Return area address: 00000000 00000000
Parameter count: 00000009
This trace entry was from a batch job IBMEXP, using an ICSF service to access an encryption key.
Interesting fields
- RACFPRE this is a RACROUTE before entry
- Requestor/Subsystem: CRYPTO which z/OS component
- Primary jobname: CSF This was the address space which issued the RACROUTE request
- Home jobname: IBMEXP This was the job requesting an ICSF service
- Service number: 2. The RACF commands documentation says for a RACROUTE service, 2 is FASTAUTH
- Ignore RACF return and RACF reason codes. They are set on exit,
Exit
Trace Identifier: 00000036
Record Eyecatcher: RTRACE
Trace Type: RACFPOST
Ending Sequence: ........
Calling address: 00000000 A096A08A
Requestor/Subsystem: CRYPTO CRYPTO
Primary jobname: CSF
Primary asid: 00000038
Primary ACEEP: 00000000 008F6B98
Home jobname: IBMEXP
Home asid: 00000029
Home ACEEP: 00000000 008FA8A8
Task address: 00000000 008D6A88
Task ACEEP: 00000000 00000000
Time: DFF37DD1 AB85DE40
Error class: ........
Service number: 00000002
RACF Return code: 00000008
RACF Reason code: 00000000
Return area address: 00000000 00000000
Parameter count: 00000009
This trace entry was from a batch job IBMEXP, using an ICSF service to access an encryption key.
Interesting fields
- RACFPOST this is a RACROUTE after exit entry
- Requestor/Subsystem: CRYPTO which z/OS component
- Primary jobname: CSF This was the address space which issued the RACROUTE request
- Home jobname: IBMEXP This was the job requesting an ICSF service
- Service number: 2. The RACF commands documentation says for a RACFROUTE service, 2 is FASTAUTH
- RACF Return code: 00000008, RACF Reason code: 00000000 This shows there was a problem. The documentation for FASTAUTH shows
- RC=8 -> the user or group is not authorized to use the resource.
- RS=0 -> The invoker does not need to log the request.
The RACF trace command for this was
#SET TRACE(JOBNAME(csf),callable(none),RACROUTE(type(2)))
and the following commands
S GTF.GTF
R 1,trace=usrp
R 2,USR=(F44)
R 3,END
R 4,U
Fast start GTF
I can use
S GTF.GTF,M=GTFRACF
Where my GTF proc has
//GTFNEW PROC M=GTFPARM,ID=SYS1
//DELETE EXEC PGM=IEFBR14
//IEFRDER DD DSNAME=&ID..TRACE,UNIT=SYSDA,SPACE=(TRK,20),
// DISP=(MOD,DELETE)
//IEFPROC EXEC PGM=AHLGTF,PARM='MODE=EXT,DEBUG=NO,TIME=YES,NP',
// TIME=1440,REGION=2880K
//IEFRDER DD DSNAME=&ID..TRACE,UNIT=SYSDA,SPACE=(TRK,20),
// DISP=(NEW,KEEP)
//SYSLIB DD DSNAME=USER.Z24C.PROCLIB(&M),DISP=SHR
I have a member in USER.Z24C.PROCLIB(GTFRACF)
TRACE=USRP
USR=(F44)
END