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

Create a GDG base with limit of 20 generations


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2481
Location: @my desk

PostPosted: Tue Aug 19, 2008 10:06 am
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

Superior Member


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

PostPosted: Tue Aug 19, 2008 4:45 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 4:54 pm
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

Superior Member


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

PostPosted: Tue Aug 19, 2008 4:58 pm
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

Superior Member


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

PostPosted: Tue Aug 19, 2008 5:02 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 5:36 pm
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

Superior Member


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

PostPosted: Tue Aug 19, 2008 5:53 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
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
No new posts Best way to create an automated line ... TSO/ISPF 3
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
Search our Forums:

Back to Top