xUnit support for CICS applications (ZUnit)
|
You need the assistance of a CICS® , TCP/IP and possibly a
security administrator to complete this customization task, which requires specific resources or
special customization tasks.
|
- CICS system initialization (SIT) parameter updates
- Specify
TCPIP=YES. - Specify
USSHOME=/usr/lpp/cicsts/cicsts61, where /usr/lpp/cicsts/cicsts61 is the path used during the SMP/E installation of CICS Transaction Server.
Note: Security considerations documents the impact of specifying these optional SIT parameters:- SEC=YES
- CMDSEC=ALWAYS
- RESSEC=ALWAYS
- Specify
- CICS JCL updates:
- Specify
REGION=0Mon theEXECstatement to provide sufficient room to buffer the recording. - Define the FEL.SFELLOAD load library in the region’s
DFHRPL DDstatement, whereFELis the high level qualifier used during the SMP/E install of z/OS Explorer Extensions.- Alternatively, you can define a
LIBRARYresource definition in the CSD for this load library. A sample definition can be found in the FEL.SFELSAMP(AZUCSD) sample CSD update job.
- Alternatively, you can define a
- Specify
- CICS CSD updates:
- Define ZUnit to your CICS region, as documented in the AZUCSD sample CSD update job. AZUCSD is located in FEL.#CUST.JCL, unless you specified a different location when you customized and submitted job FEL.SFELSAMP(FELSETUP). For more information. see Customization setup.
The ZUnit CICS recorder uses a CICS PIPELINE to communicate with the ZUnit client. This CICS service requires that a TCP/IP port be defined in the CSD. The developers who use this service need to know the host system name and the port on which the service is listening.
The ZUnit CICS recorder uses a temporary storage queue in auxiliary storage to store log data. The log data is written to a queue named _AZU_LOGRS_. You can browse the log data with the CICS command CEBR. When the log data is too big to reserve TS
queues in auxiliary storage for other programs, purge it manually in the CEBR
command screen. Abend AIER (resp-18 NOSPACE) occurs when an auxiliary TS queue runs
out of space.
AZUM { GETLOGLEVEL | SETLOGLEVEL0 | SETLOGLEVEL1 | SETLOGLEVEL2 }- GETLOGLEVEL
- Show the current log level
- SETLOGLEVEL0
- Set the current log level to 0 (error only).
- SETLOGLEVEL1
- Set the current log level to 1 (error and warning)
- SETLOGLEVEL2
- Set the current log level to 2 (error, warning and information)
Security considerations
- The user ID used by the end-user when connecting to the host using the IBM Developer for z/OS client, referred to as the client user ID in this section.
- The user ID used by the CICS region when doing actions requested by ZUnit, referred to as the CICS user ID in this section. The CICS user ID can differ from the client user ID, for example it can be the CICS default user.
- The user ID used by an administrator or end-user to interact directly with CICS, referred to as CICS admin ID in this section. The CICS admin ID can differ from both the client user ID and the CICS user ID.
- The user ID that the CICS region runs under, referred to as the CICS region user ID in this section.
- Data set
-
As part of its processing, ZUnit creates a recording (also known as "playback") data set that will be populated by Dynamic Test Runner. The high level qualifier(s) of this data set can be configured in the ZUnit client preferences (default is the client user ID followed by
ZUNIT.PB). The low level qualifier is the name of the program under test. Two user IDs require authorization to the security profile in theDATASETclass that protects these recording data sets:- The client user ID requires ALTER access so that it can create them
- The CICS region user ID requires UPDATE access so that it can write to them
For example, use the following z/OS Security Server (RACF) commands to define a data set profile for client user IDIBMUSERusing the default high level qualifier, and to authorize users to use it:ADDSD 'IBMUSER.ZUNIT.PB.*' UACC(NONE) DATA('ZUNIT PLAYBACK') PERMIT 'IBMUSER.ZUNIT.PB.* ' CLASS(DATASET) ACCESS(ALTER) ID(IBMUSER) PERMIT 'IBMUSER.ZUNIT.PB.* ' CLASS(DATASET) ACCESS(UPDATE) ID(#CICS_region_user_ID) SETROPTS GENERIC(DATASET) REFRESH - SEC=YES
-
When CICS security is enabled with the
SEC=YESsystem initialization parameter, users of the ZUnit management transaction (CICS admin ID) require READ access to the profile protecting theAZUMCICStransaction. Default resource and grouping class names for transactions areTCICSTRNandGCICSTRN, respectively, but these names can be overridden by theXTRANCICS system initialization parameter.For example, use the following z/OS Security Server (RACF) commands to define a profile for transactionAZUMin theTCICSTRNclass, and to authorize users to run it:
No further security configuration is required unless CICS security is enabled with theRDEFINE TCICSTRN AZUM UACC(NONE)DATA('ZUNIT MANAGEMENT') PERMIT AZUM CLASS(TCICSTRN) ACCESS(READ) ID(#CICS_admin_ID_group) SETROPTS GENERIC(TCICSTRN) REFRESHSEC=YESsystem initialization parameter, and eitherCMDSEC=ALWAYSorRESSEC=ALWAYSis specified as a CICS system initialization parameter. - CMDSEC=ALWAYS
-
If
SEC=YESandCMDSEC=ALWAYSare specified as CICS system initialization parameters, then client user IDs require ALTER access toTDQUEUE, the security profile that protects the CICS Transient Data queue (TD queue) commands. Default resource and grouping class names for CICS commands areCCICSCMDandVCICSCMD, respectively, but these names can be overridden by theXCMDCICS system initialization parameter.For example, use the following z/OS Security Server (RACF) commands to define a profile for TD queue commands in theCICSCMDclass, and to authorize users to issue theTDQUEUEcommands:RDEFINE CCICSCMD TDQUEUE UACC(NONE) PERMIT TDQUEUE CLASS(CCICSCMD) ACCESS(ALTER) ID(#client_user_ID_group) SETROPTS GENERIC(CCICSCMD) REFRESH - RESSEC=ALWAYS
-
If
SEC=YESandRESSEC=ALWAYSare specified as CICS system initialization parameters, then client user IDs require the following resource authorization:- Transient data queues (TD queues)
-
Client user IDs require ALTER access to
ZU*, the profile that protects ZUnit CICS TD queues. Default resource and grouping class names for CICS TD queues areDCICSDCTandECICSDCT, respectively, but these names can be overridden by theXDCTCICS system initialization parameter.For example, use the following z/OS Security Server (RACF) commands to define a profile for TD queues in theDCICSDCTclass, and to authorize users to access them:RDEFINE DCICSDCT ZU* UACC(NONE) DATA('ZUNIT') PERMIT ZU* CLASS(DCICSDCT) ACCESS(ALTER) ID(#client_user_ID_group) SETROPTS GENERIC(DCICSDCT) REFRESH - Programs
-
Client user IDs require:
- READ access to
AZUCREST - READ access to all load modules or program objects containing routines that are called by programs under test using non-CICS interfaces
Default resource and grouping class names for CICS programs are
MCICSPPTandNCICSPPT, respectively, but these names can be overridden by theXPPTCICS system initialization parameter.For example, use the following z/OS Security Server (RACF) commands to define profiles for programAZUCRESTin theMCICSPPTclass and programs under test in theNCICSPPTclass, and to authorize users to access them:RDEFINE MCICSPPT AZUCREST UACC(NONE) DATA('ZUNIT') RDEFINE NCICSPPT TESTPGM1 UACC(NONE) ADDMEM(#test_program_1,#test_program_2,#test_program_3) RDEFINE NCICSPPT TESTPGM2 UACC(NONE) ADDMEM(#test_program_4,#test_program_5) PERMIT AZUCREST CLASS(MCICSPPT) ACCESS(READ) ID(#client_user_ID_group) PERMIT TESTPGM1 CLASS(NCICSPPT) ACCESS(READ) ID(#client_user_ID_group1) PERMIT TESTPGM2 CLASS(NCICSPPT) ACCESS(READ) ID(#client_user_ID_group2) SETROPTS GENERIC(MCICSPPT) REFRESH SETROPTS GENERIC(NCICSPPT) REFRESH - READ access to
- Temporary Storage queues (TS queues)
-
By default, no authorization is required for temporary storage queues (TS queues). If you want to enforce security for TS queues, define two
TSMODELs in CICS:- One with
PREFIX(_AZU_LOG) LOCATION(AUXILIARY) SECURITY(YES) - One with
PREFIX(_AZU_CTL) LOCATION(MAIN) SECURITY(YES)
_AZU_LOGRS_and_AZU_CTL2_.The default resource and grouping class names for temporary storage queues are
SCICSTSTandUCICSTST, respectively, but these names can be overridden by theXTSTCICS system initialization parameter.For example, use the following z/OS Security Server (RACF) commands to define profiles for TS queues used by ZUnit, and to authorize users to access them:RDEFINE SCICSTST _AZU_* UACC(NONE) DATA('ZUNIT') PERMIT _AZU_* CLASS(SCICSTST) ACCESS(UPDATE) ID(#client_user_ID_group) SETROPTS GENERIC(SCICSTST) REFRESH - One with