Copy a Calendar from one system to another system in CA Workload Automation ESP Edition.
search cancel

Copy a Calendar from one system to another system in CA Workload Automation ESP Edition.

book

Article ID: 14352

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Copy a Calendar from one ESPWA system to another ESPWA system.

Is there an easy way to duplicate a calendar from one system to another system or does it have to be defined and created from scratch?

Environment

Release: ESP Workload Automation

Cause

Need to copy a calendar from one system to new ESPWA system in CA Workload Automation ESP Edition.

Resolution

 

The calendar information is stored in the index file. You can repro the calendar Information from that file to the other file. If you run the following job, Make Sure you use your ESP subsys name and loadlib. This will dump the index and All entries you see that start with C are calendar entries. 

//S1 EXEC PGM=ESP,PARM='SUBSYS(????)' 
//STEPLIB DD DISP=SHR,DSN=ESP.CD7YLOAD
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD * UTIL OPEN 'ESP.INDEX' 
DUMPKEY 
END 

For example calendar SYSTEM, will have key as CSYSTEM in above file. You can use IDCAMS REPRO to copy the records starting with key C from prefix1.INDEX of ESPA to the related file prefix2.INDEX of ESPB. You may want to consult your Vsam expert. 

Note: SYSTEM calendar will be created when the ESP is initialized. To copy the SYSTEM calendar from A to B, they should use REPRO with REPLACE option. Both ESPs can stay up when running IDCAMS REPRO to copy.


You can use the following to repro into new file. 

//REPRO   EXEC PGM=IDCAMS                           
//FROM     DD  DISP=SHR,DSN=prefix1.INDEX 
//TO       DD  DISP=SHR,DSN=prefix2.INDEX
//SYSPRINT DD  SYSOUT=*                             
//SYSIN    DD  *                                    
  REPRO  INFILE(FROM) -                             
         OUTFILE(TO)  -                             
         FROMKEY(CSYSTEM)  -                              
         TOKEY(CSYSTEM) REPLACE                          


REPLACE: 
Replace may be specified to cause existing records in the output cluster to be replaced when a duplicate record is read from the input dataset. REPLACE is applicable for KSDS and RRDS clusters. REPLACE may also be used to merge input from subsequent REPRO operations with different input datasets to the same target dataset, where the possibility of duplicate records. If an attempt is made to add a duplicate record and REPLACE is not specified, an error message and the input record is discarded; on the fourth occurrence of a duplicate record, the REPRO operation is terminated and the remainder of the input file is not processed.