GDG

GDG

1.       A Generation Data Group (GDG) consists of like named data sets that are chronologically or functionally related.

2.       When we use GDG?

When we want to update the dataset, and the old versions are also needed.

3.       Advantages

l         Common name

l         In chronological order

l         Automatically delete

4.       Relative DSN

l         DSN=PAYROLL.DATA(0)     -previous generation

l         DSN=PAYROLL.DATA(+1)   -next generation

l         DSN=PAYROLL.DATA(-1)   -previous of previous generation

Note: The relative generation numbers are updated after the completion of the job, not the completion of a job step.

5.       Absolute DSN

e.g. PAYROLL.DATA.GxxxxVyy

xxxx-Absolute generation number

yy  -Version number

Note: The version number lets you create more than one copy of a single generation. For instance, G0013V01 is the second version of a generation data set. However, only the version with the highest number is considered to be part of the GDG (that is, it’s the only one that’s assigned a relative number).

6.       The syntax for the AMS DEFINE GDG command

7.       Create GDG with specific model DSCB

//MM01DFG JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

// EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//MODEL DD DSNAME=MM01.PAYROLL.MASTER,DISP=(,KEEP),

// UNIT=SYSDA,VOL=SER=MPS800,SPACE=(TRK,(0)),

// DCB=(DSORG=PS,RECFM=FB,LRECL=400)

//SYSIN DD *

DEFINE GDG ( NAME(MM01.PAYROLL.MASTER) -

LIMIT(5) -

NOEMPTY -

SCRATCH )

/*

Note: The data set name for the model DSCB should be the same as for the GDG, and the VOL parameter should specify the volume that contains the user catalog where the GDG is defined. Then, the DCB parameter defines the characteristics of each generation data set.

8.       Create GDG with general-purpose model DSCB

Step1: A job that creates a general-purpose model DSCB

//MM01BR14 JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

// EXEC PGM=IEFBR14

//DD1 DD DSNAME=MODLDSCB,DISP=(NEW,CATLG),

// UNIT=SYSDA,VOL=SER=MPS800,

// SPACE=(TRK,(0)),

// DCB=(DSORG=PS,RECFM=FB

Step2: A job that defines a GDG with a general-purpose model DSCB

//MM01DFG JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

// EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DEFINE GDG ( NAME(MM01.PAYROLL.MASTER) -

LIMIT(5) -

NOEMPTY -

SCRATCH )

/*

Step3: The JCL for updating a GDG that uses a general-purpose model DSCB

//MM01PY4 JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

//UPDATE EXEC PGM=PAY3200

//OLDMAST DD DSNAME=MM01.PAYROLL.MASTER(0),DISP=OLD

//NEWMAST DD DSNAME=MM01.PAYROLL.MASTER(+1),DISP=(NEW,CATLG),

// UNIT=SYSDA,VOL=SER=MPS8BV,

// SPACE=(CYL,(10,1)),

// DCB=(MODLDSCB,LRECL=400)

//PAYTRAN DD DSNAME=MM01.PAYROLL.TRANS,DISP=OLD

//PAYCORP DD SYSOUT=*

Note:

l         A model DSCB doesn’t have to reside on the same volume as the GDGs that use it.

l         To create a general-purpose model DSCB, you use a data set name that isn’t the same as the name of a GDG.

9.       The syntax for the AMS DELETE GDG command

 

1.       A Generation Data Group (GDG) consists of like named data sets that are chronologically or functionally related.

2.       When we use GDG?

When we want to update the dataset, and the old versions are also needed.

3.       Advantages

l         Common name

l         In chronological order

l         Automatically delete

4.       Relative DSN

l         DSN=PAYROLL.DATA(0)     -previous generation

l         DSN=PAYROLL.DATA(+1)   -next generation

l         DSN=PAYROLL.DATA(-1)   -previous of previous generation

Note: The relative generation numbers are updated after the completion of the job, not the completion of a job step.

5.       Absolute DSN

e.g. PAYROLL.DATA.GxxxxVyy

xxxx-Absolute generation number

yy  -Version number

Note: The version number lets you create more than one copy of a single generation. For instance, G0013V01 is the second version of a generation data set. However, only the version with the highest number is considered to be part of the GDG (that is, it’s the only one that’s assigned a relative number).

6.       The syntax for the AMS DEFINE GDG command

7.       Create GDG with specific model DSCB

//MM01DFG JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

// EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//MODEL DD DSNAME=MM01.PAYROLL.MASTER,DISP=(,KEEP),

// UNIT=SYSDA,VOL=SER=MPS800,SPACE=(TRK,(0)),

// DCB=(DSORG=PS,RECFM=FB,LRECL=400)

//SYSIN DD *

DEFINE GDG ( NAME(MM01.PAYROLL.MASTER) -

LIMIT(5) -

NOEMPTY -

SCRATCH )

/*

Note: The data set name for the model DSCB should be the same as for the GDG, and the VOL parameter should specify the volume that contains the user catalog where the GDG is defined. Then, the DCB parameter defines the characteristics of each generation data set.

8.       Create GDG with general-purpose model DSCB

Step1: A job that creates a general-purpose model DSCB

//MM01BR14 JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

// EXEC PGM=IEFBR14

//DD1 DD DSNAME=MODLDSCB,DISP=(NEW,CATLG),

// UNIT=SYSDA,VOL=SER=MPS800,

// SPACE=(TRK,(0)),

// DCB=(DSORG=PS,RECFM=FB

Step2: A job that defines a GDG with a general-purpose model DSCB

//MM01DFG JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

// EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DEFINE GDG ( NAME(MM01.PAYROLL.MASTER) -

LIMIT(5) -

NOEMPTY -

SCRATCH )

/*

Step3: The JCL for updating a GDG that uses a general-purpose model DSCB

//MM01PY4 JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID

//UPDATE EXEC PGM=PAY3200

//OLDMAST DD DSNAME=MM01.PAYROLL.MASTER(0),DISP=OLD

//NEWMAST DD DSNAME=MM01.PAYROLL.MASTER(+1),DISP=(NEW,CATLG),

// UNIT=SYSDA,VOL=SER=MPS8BV,

// SPACE=(CYL,(10,1)),

// DCB=(MODLDSCB,LRECL=400)

//PAYTRAN DD DSNAME=MM01.PAYROLL.TRANS,DISP=OLD

//PAYCORP DD SYSOUT=*

Note:

l         A model DSCB doesn’t have to reside on the same volume as the GDGs that use it.

l         To create a general-purpose model DSCB, you use a data set name that isn’t the same as the name of a GDG.

9.       The syntax for the AMS DELETE GDG command

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值