Home > Storage > PowerMax and VMAX > Mainframe > Dell PowerMax: Data Protector for z Systems (zDP) Essentials > Linking VDG to target set
After creating a VDG and successfully starting it, and creating snapsets, customers can link a snapset to a Target Set to use the data. First, it is suggested to query the VDG to see what snapsets are available to use. The following is a sample JCL job that queries the status of the snapsets:
//jjjjjjjj JOB (ZDP),EMC,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,
// REGION=0M
/*JOBPARM LINES=999999
//*
//* QUERY VDG OPTIONS
//*
//*
//ZDPDEF EXEC PGM=EIPINIT,REGION=0M
//STEPLIB DD DISP=SHR,DSN= your.mfe.linklib
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SCF$PD40 DD DUMMY ---> Point to the SCF you are running
//*
//SYSIN DD *
GLOBAL MAX_RC(4)
QUERY VDG VDGNEW,SNAPSET
QUERY VDG VDGNEW,SNAPSET,DETAIL
/*
Within the query output look for the ‘SNAPSET_NAME’ and select the snapset you would like to link to your target devices. Normally users can reference the Create Date to indicate what snapset data they want to access. Note that the ‘SNAPSET_NAME’ is needed in the LINK command. The following figure provides sample output from a query command that has the VDG SNAPSET_NAME.
Using the SNAPSET_NAME, and Target Set (created earlier), users can customize the following JCL to link the snapset to the Target Set, making the data accessible to the target volumes.
//JBASTI00 JOB (ZDP),CSEEMC,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,
// REGION=0M
/*JOBPARM LINES=999999
//*
//* LINK / UNLINK A TARGET_SET
//*
//*
//ZDPDEF EXEC PGM=EIPINIT,REGION=0M
//STEPLIB DD DISP=SHR,DSN=your MFE linklib
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*SCF$XXXX DD DUMMY ---> Point to the SCF you are running
//*
//SYSIN DD *
GLOBAL MAX_RC(4)
LINK VDG(vdg name from above),SNAPSET(221681545C05500) TGT(target set from above)