SWTCHKEY in ACF2
search cancel

SWTCHKEY in ACF2

book

Article ID: 225154

calendar_today

Updated On:

Products

ACF2 - z/OS

Issue/Introduction

SWTCHKEY is needed to issue F ACF2,SWITCH(DDSN) command. 

Environment

Release : 16.0

Component : ACF2 for z/OS

Resolution

The following ACF commands can be used to check if SWTCHKEY is set up in GSO OPTS record: 

SET CONTROL(GSO)
LIST OPTS

  LPAR / OPTS LAST CHANGED BY USERID ON 04/15/26-11:12                          
                       ACCESS NOBLPLOG BYPSTATS CACHE NOCERTCNTL CERTEXP(30)    
                       CKLIDSCP CMDREC CONSOLE(NOROLL) NOCPF CPUTIME(LOCAL)     
                       CSLIDEXT DATE(MDY) DBLOCKM NODDB DFTLID(DEFAULT)         
                       DFTLNXG() DFTLNXU() DFTSTC(XXXXXXXX) NOETAUDIT NOEVALMODE
                       NOICSF INFOLIST(AUDIT SECURITY) JFMMODE() NOJOBCK        
                       KERBLVL(0) KEYSIZE(4,096) LDS MAXVIO(10) MODE(ABORT)     
                       NONAMEHIDE NOTIFY PRIMARY(ENU) NOPRIVESC PTKRESCK        
                       ROLESYS(LPAR XXXX) RPTSCOPE SDNSIZE(512) SECONDRY(ENU)   
                       SHRDASD NOSTAMPSMF STATRECD(ALL) STATS STATSINT(15)      
                       STATSLOG(SMF) STC NOSUPERVAL SWTCHTOD(04/15/26-11:12)    
                       SYSPLEX NOTAPEDSN TEMPDSN NOTNGMON NOUADS NOVTAMOPEN     
                       WRNDAYS(4) NOXAPPLVLD                                    
                                                                  

The SWTCHTOD value (date/time of last SWTCHKEY update) shows:
- a non-zero value SWTCHTOD(04/15/26-11:12), if SWTCHKEY is setup
- zero value SWTCHTOD(00/00/00-00:00), if SWTCHKEY is not setup

The SWTCHKEY field is encrypted when stored in the database and is never displayed.

How to use SWTCHKEY ?
-If the SWTCHKEY is not set up or it's lost, the sample JCL is shown below to add a new SWTCHKEY using ACFBATCH job. 

//ACFBATCH EXEC PGM=ACFBATCH
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET CONTROL(GSO)
CHANGE OPTS SWTCHKEY(Ab@12?) = > choose key here
F ACF2,REFRESH(OPTS)
/*        
 ***                                                                            

Additional Information

Here is more information on switchkey from doc:

SWTCHKEY(key)
Sets the key for the F ACF2,SWITCH (DDSN list name) command. This is an 8-byte character field which can contain letters, numbers, and any of the following character symbols in parentheses ($, #, @, !, %, &, -, =, :, _, ^, ., ?, |). Note that although lowercase letters are allowed when specifying the key, each letter is uppercase before being stored. The console prompts for this key when issuing the F ACF2,SWITCH (DDSN list name) command. This field is encrypted when stored in the database and is never displayed.

The key can be up to 8 characters long, it is not restricted to be exactly 8 bytes and can be shorter.