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?
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(X113)'
//STEPLIB DD DISP=SHR,DSN=xxxx.xx.ESP.SSCPLINK //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * UTIL OPEN 'CYB2.TS.ESP.RB113M.INDEX'
For example calendar SYSTEM, will have key as CSYSTEM in above file. You can use IDCAMS REPRO to copy the records with starting with key C from prefix.INDEX of ESPA to the related file of ESPB. You may want to consult your Vsam expert.
Note: SYSTEM calendar will be created when the ESP is initialized; If client wants to copy the SYSTEM calendar from A to B, they should use REPRO with REPLACE option.
Let me know if you have any questions concerns and how you wish me to proceed with ticket.
You can use the following to repro into new file.
//STEP4 EXEC PGM=IDCAMS,
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO IDS(prefix1.INDEX) ODS(prefix2.INDEX) -
FROMKEY(C) TOKEY(D1) 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.