Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Create a GDG base with limit of 20 generations

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
boosha

New User


Joined: 19 Aug 2008
Posts: 1
Location: chennai

PostPosted: Tue Aug 19, 2008 9:46 am    Post subject: Create a GDG base with limit of 20 generations
Reply with quote

1) Create a GDG base using IDCAMS with limit of 20 generations.

//STEP1 EXEC PGM=IDCAMS
//SYSIN DD *
DEFINE GDG(NAME(TRGD26.VERSION.BASE) LIMIT(20) NOEMPTY SCRATCH)
/*

2) Create the first generation with Empty DSN using jcl with LRECL of 40.

//STEP3 EXEC PGM=IEFBR14
//INFILE DD DSN=TRGD26.VERSION.BASE(+1),DISP=NEW,SPACE=(TRK,(5,4),RLSE),RECFM=FB,LRECL=40
//

Are my answers right.
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Tue Aug 19, 2008 10:06 am    Post subject:
Reply with quote

Try these out yourself and see the results.

Thanks,
Arun
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 19, 2008 4:45 pm    Post subject:
Reply with quote

This thread is being lengthy..unnecessarily.. icon_neutral.gif

Quote:
Are my answers right.
Yes, answers are right..

However, Using IDCAMS, it's a good practice to code different parameters on differnet lines, probably for readability..
Code:
//DEFINE  EXEC PGM=IDCAMS                 
//SYSPRINT DD  SYSOUT=*                   
//SYSIN    DD  *                           
   DEFINE GDG -                           
         (NAME(TRGD26.VERSION.BASE) - 
          NEMP -                           
          SCR -                           
          LIM(20) )                       


Further, defining first GDG using IEFBR14 might cause problems in READ ( statement of COBOL), if your site in not SMS managed.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 19, 2008 4:54 pm    Post subject:
Reply with quote

Anuj D. wrote:
This thread is being lengthy..unnecessarily.. icon_neutral.gif

Yes, very lengthy for a YES/NO answer


Anuj D. wrote:
Further, defining first GDG using IEFBR14 might cause problems in READ ( statement of COBOL), if your site in not SMS managed.

Or in fact if the ACS routines are not perfect (like mine are icon_lol.gif icon_lol.gif icon_lol.gif )

The foolproof way is to use IEBGENER as the file builder, SYSUT1 as a DUMMY with the RECFM and LRECL specified writing to SYSUT2.
A lot longer way of doing it, but at least the dataset is opened and closed by IEBGENER and will have a valid DSORG.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 19, 2008 4:58 pm    Post subject:
Reply with quote

Hello again,

You have coded
Code:
DISP=NEW

They say, If you omit the normal termination disposition subparameter, the default is DELETE for a NEW data set. So first Generation would not be available after the execution of IEFBR14 step.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 19, 2008 5:02 pm    Post subject:
Reply with quote

Quote:
Or in fact if the ACS routines are not perfect (like mine are )
Oh..does your PM logs-in to this site.. icon_razz.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 19, 2008 5:36 pm    Post subject:
Reply with quote

What are the LIMIT attributes set to on the thread ?

Quote:
Oh..does your PM logs-in to this site..

Yes, I do icon_lol.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 19, 2008 5:53 pm    Post subject:
Reply with quote

expat wrote:
Yes, I do icon_lol.gif
I was afraid of this only.. icon_smile.gif

BTW, I think, probably Kevin was expecting TS to pop-in at least once again..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Limit CICS CPU resource vasanthz CICS 0 Tue Jan 31, 2017 7:09 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us