How to invoke CA JCLCheck CLIST SUBCHK for use with the SUBCHEK feature

Document ID : KB000129577
Last Modified Date : 15/03/2019
Show Technical Document Details
Introduction:
After the CA JCLCheck SUBCHEK feature is enabled, a SUBCHEK control file needs to be allocated in the TSO logon procedure.
Example:  //SUBCHKDD DD DSN=CAI.CAZ2OPTN(CAZ1SSUP),DISP=SHR

Optionally, this file may be allocated or deallocated using a CLIST.
CA JCLCheck provides a CLIST name SUBCHK in the CAZ2CLS0 library for this purpose.
Question:
How do I execute CLIST SUBCHK? 
Environment:
CA JCLCheck release 12.0
 
Answer:
1. Place CLIST SUBCHK in a data set that's allocated to DDname SYSPROC in the TSO logon proc.

2. From an ISPF Command Line, enter TSO %SUBCHK ON  or  TSO %SUBCHK OFF
    or
3. From the ISPF Command Shell, enter: %SUBCHK ON or %SUBCHK OFF 

Note:
%SUBCHK ON allocates the SUBCHEK options control file to DDname SUBCHKDD
%SUBCHK OFF deallocates SUBCHKDD 
 

To execute CLIST SUBCHK from within an ISPF Edit session ( %SUBCHK ON or %SUBCHK OFF), the CLIST must be modified as follows: 

ISREDIT MACRO (PARM) PROCESS                                  
CONTROL LIST CONLIST SYMLIST                                  
  IF &STR(&PARM) = OFF THEN SET &SW = 1                       
     ELSE SET &SW = 0                                         
  IF &STR(&PARM) = ON THEN SET &SW = 2                        
  IF &SW NE 0 THEN FREE FI(SUBCHKDD)                          
  IF &SW EQ 2 THEN -                                          
   ALLOC FI(SUBCHKDD)   +                                      
          DA('CAI.CAZ2OPTN(CAZ1SSUA)') SHR REUSE          /* change the data set name */                  
  IF &SW EQ 0 THEN -                                          
   DO                                                         
    WRITE SUBCHK CMD IS USED TO ACTIVATE/DEACTIVATE SUBCHEK   
    WRITE OPERAND IS 'ON' TO ACTIVATE, 'OFF' TO DEACTIVATE    
   END   
           
Additional Information:
-  Install SUBCHEK:
https://docops.ca.com/display/CJWA12/%28Optional%29+Install+SUBCHEK

- How to activate the CA JCLCheck Workload Automation SUBCHEK feature:
.https://comm.support.ca.com/kb/how-to-activate-the-ca-jclcheck-workload-automation-subchek-feature/kb000054058

- Control SUBCHEK:
https://docops.ca.com/display/CJWA12/Control+SUBCHEK