IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to create GDG version?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
crm

New User


Joined: 14 Nov 2005
Posts: 25

PostPosted: Wed Nov 23, 2005 1:44 pm
Reply with quote

hai
how to create GDG version?
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Wed Nov 23, 2005 1:49 pm
Reply with quote

1. use IDCAMS. refer some JCL material for the correct JCL.
2. Use file tools like Filemarvel/Fileaid if available in your mainframe.
Back to top
View user's profile Send private message
Sangameshwar N

New User


Joined: 18 Nov 2005
Posts: 14
Location: Mumbai

PostPosted: Wed Nov 23, 2005 2:03 pm
Reply with quote

Hi
GDGs can be created using file-aid 3.2 in that use "G - Define generation data group" in option to allocate the base and then using "A" to allocate a generation.

Regards
Sangameshwar N
Back to top
View user's profile Send private message
Phantom

New User


Joined: 04 Sep 2005
Posts: 25

PostPosted: Wed Nov 23, 2005 2:37 pm
Reply with quote

crm,

You can also do that using ISPF option 3.2, then choose VSAM utilities 'V' - (Most of us are not aware of this - since its listed under VSAM)

1. Go to ISPF 3.2 panel.
2. Choose option 'V' (VSAM Utilities)
3. Choose '1' (define) under Process Request and '4' (Generation data Group) under Data Type and follow the screens.

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Nov 23, 2005 2:46 pm
Reply with quote

hi frnd,
Try this JCL

Code:

//JOB1   JOB A50, 'IBM'
//STEP   EXEC PGM=IDCAMS
//SYSIN DD *
  ----this creates the index for GDG----
   DEFINE GDG(NAME(ACCOUNTS.MONTHLY)-
                       LIMIT(5)-
                       NOEMPTY-
                       SCRATCH)
//STEP2 EXEC=IEFBR14
---this creas the model----------
//MODEL1  DD DSN=ACCOUNTS.MONTHLY(+1),
//                   DISP=(NEW,KEEP,DELETE),
//                   UNIT=SYSDA, SPACE=(TRK,0),
//                   DCB=LRECL=80,RECFM=FB,BLKSIZE=800)
---this creats ur GDG---
//STEP3 EXEC PGM=GDG1,COND=(0,EQ,STEP2)
//FILE1 DD DSN=ACCOUNTS.MONTHLY(+1),
//              DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
//              DCB=(MODEL.DCB,RECFM=FB,LRECL=80,BLKSIZE=800)



hope works. may be some mistake.. try to resolve it and execute...
Back to top
View user's profile Send private message
Phantom

New User


Joined: 04 Sep 2005
Posts: 25

PostPosted: Wed Nov 23, 2005 4:12 pm
Reply with quote

khamarutheen,

Whenever you post any code, please encode the code within the BBTags {code} & {/code}.

Note: You actually need to use '[' & ']' instead of '{' & '}' above.

This make it more legible to read and understand.

Thanks,
Phantom
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Nov 23, 2005 4:34 pm
Reply with quote

hi frnd,
i really agree ur point. let me do the thing from the next time. i m sorry for this happening and i assure u that it will not happen any more.
Back to top
View user's profile Send private message
crm

New User


Joined: 14 Nov 2005
Posts: 25

PostPosted: Wed Nov 23, 2005 5:03 pm
Reply with quote

thanks for ur answers.
i have one doubt

CREATE GDG ?
CREATE GDG VERSION ?

these both queries lead to the same answer?
Back to top
View user's profile Send private message
Phantom

New User


Joined: 04 Sep 2005
Posts: 25

PostPosted: Wed Nov 23, 2005 5:19 pm
Reply with quote

crm,

Actually Khamarutheen has given you the required solution. Look at his code.

1. This piece of code creates the GDG Base for you.
Code:

//JOB1 JOB A50, 'IBM'
//STEP EXEC PGM=IDCAMS
//SYSIN DD *
----this creates the index for GDG----
DEFINE GDG(NAME(ACCOUNTS.MONTHLY)-
LIMIT(5)-
NOEMPTY-
SCRATCH)



2. This piece of code creates the Model to be used for all versions. Not necessary though.
Code:

//STEP2 EXEC=IEFBR14
---this creas the model----------
//MODEL1 DD DSN=ACCOUNTS.MONTHLY(+1),
// DISP=(NEW,KEEP,DELETE),
// UNIT=SYSDA, SPACE=(TRK,0),
// DCB=LRECL=80,RECFM=FB,BLKSIZE=800)


3. And this piece of code creates new versions under the GDG base.
Code:

---this creats ur GDG---
//STEP3 EXEC PGM=GDG1,COND=(0,EQ,STEP2)
//FILE1 DD DSN=ACCOUNTS.MONTHLY(+1),
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(MODEL.DCB,RECFM=FB,LRECL=80,BLKSIZE=800)


Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
sonipankaj

New User


Joined: 23 Nov 2005
Posts: 10

PostPosted: Wed Nov 23, 2005 9:27 pm
Reply with quote

Use the below command to create the base of the GDG :

"DEFINE GDG(NAME('"NAME"') NOEMPTY LIMIT("LMT") SCRATCH)"

NAME : Name of the GDG base
LMT : Limit of the GDG.

To create the New generation give 'NAME(+1)' with the DISP=(new,catlg,delete).
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 24, 2005 1:08 am
Reply with quote

Creating a new GDG version. All three examples assume that you wish to update the current version of the GDG 'HLQ.MY.GDG.G0003V00' from V00 to V01:

JCL Copy method:

Code:

//STEP0001 EXEC PGM=IEBGENER                                           
//SYSUT1   DD   DISP=SHR,DSN=HLQ.MY.GDG.G0003V00                   
//SYSUT2   DD   DSN=HLQ.MY.GDG.G0003V01,                           
//         DISP=(,CATLG,DELETE),UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)       
//SYSPRINT DD   SYSOUT=*                                               
//SYSIN    DD   DUMMY                                                   


IDCAMS Alter method:

Code:

//STEP0001 EXEC PGM=IDCAMS                                             
//SYSPRINT DD   SYSOUT=*                                               
//SYSIN    DD   *                                                     
  ALTER 'HLQ.MY.GDG.G0003V00' NEWNAME('HLQ.MY.GDG.G0003V01')   
/*                                                                     


TSO Rename method:

Code:

//STEP0001 EXEC PGM=IKJEFT01                                     
//SYSTSPRT DD   SYSOUT=*                                         
//SYSTSIN  DD   *                                               
RENAME 'HLQ.MY.GDG.G0003V00' 'HLQ.MY.GDG.G0003V01'       
/*                                                               


Please note that this can also be handled in TSO/ISPF via the normal R (Rename) line command.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
No new posts COBOL - create and write to output fi... COBOL Programming 0
Search our Forums:

Back to Top