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
 

 

Limit of GDG

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

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Wed Mar 08, 2006 7:12 pm    Post subject: Limit of GDG
Reply with quote

We need to backup trade file on a daily basis for 3 years.

GDG has a maximum limit of 255 generations and we wants close to

1100 generations

GDG is not an option for this scenario So we plan to create flat files

in the format.

P.#yymmdd.SYSOUT.DATA

Assuming the file is created today, the file name should be

P.#060308.SYSOUT.DATA


1. How to create the DD qualifier name dynamically ?.


2. If this problem has to be cracked using GDG only, how can it be

done ?
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Wed Mar 08, 2006 7:35 pm    Post subject: Re: limit of GDG !
Reply with quote

I don't quite understand the difference conceptually between the two scenarios. Using either method, you will have to create and catalog approximately 1100 datasets. As long as your process relies on retrieving the backup by explicit dataset name, then I see no difference one way or the other, other than:

In order to create a dataset with the name
P.#060308.SYSOUT.DATA
you will need to use a program that will dynamically allocate the dataset with the appropriate date-stamp value, or use some other process (a job scheduler perhaps) that can date-stamp the dataset name.

If you go with the GDG's, that process won't be necessary.
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Wed Mar 08, 2006 7:41 pm    Post subject:
Reply with quote

Since GDG can't support more than 255 generations.
We go for dynamic dataset.


How to generate the dataset name with time-stamp value in JCL ?.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Mar 08, 2006 7:49 pm    Post subject: Re: limit of GDG !
Reply with quote

What does the GDG LIMIT have to do with your process? It should be totally irrelevent.

If you define the GDG base as:

DEFINE GDG (NAME('MY.GDG') LIMIT(255) NOEMPTY NOSCRATCH)

then, everytime you want a new backup you can catalog a new dataset with the (+1) generation. You will continue to catalog datasets from G0001V00 all the way to G9999V00. After G9999V00, the generation data group will roll back around to G0001V00. Now, keep in mind that only the last 255 generations (LIMIT(255)) are considered to be part of the generation data group, and can be accessed by their relative address (i.e. using (0), (-1), (-2), etc.). For the datasets that roll out of the generation data group, they will have to be access by their specific dataset name (i.e. 'MY.GDG.G0001V00').



As far as your other question, here are some options:

Quote:

Enabling System Date and/or Time Stamps In JCL

Section 1. Using Job Schedulers

CA7 Example:

Say you want your JCL to look like this if todays date was 11/7/03:

//JOBCARD...
//STEP010 EXEC PGM=IEFBR14
//DD1 DD DSN=NODE1.NODE2.D110703,
// DISP=(NEW,CATLG, DELETE),
// etc....

Create a member in your CA7ONL //CARPROC DD, call it "CURRDATE". Copy in this information:

// DPROC MMDDYY
// DSET MMDDYY=MDY(&C_JDATE)
//DD1 DD DSN=NODE1.NODE2.D&MMDDYY,

Create your CA-7 JCL to look like this:
//JOBCARD...
//STEP010 EXEC PGM=IEFBR14
//D EXEC CURRDATE
// DISP=(NEW,CATLG, DELETE),
// etc....

In CA-7, do the "LJCK,LIST=ONLY,JOB=jobname" command to see what will be submitted to JES2


Section 2. Strictly JCL

Example 1. Using a PROCedure with variables.

//JOB123 JOB (accounting),CLASS=X,MSGCLASS=X
//*
//STEP1 EXEC MYPROC,SYSDATE=110703,SYSTIME=080000
//*

//MYPROC PROC SYSDATE=,SYSTIME=
//*
//PROC1 EXEC PGM=IEFBR14
//DD1 DD DSN=NODE1.NODE2.D&SYSDATE.T&SYSTIME,
// DISP=(NEW,CATLG, DELETE),
// etc....

Example 2. Using SET command to set JCL variables. The values for the SET statements must be defined prior to the job submission.

//JOB123 JOB (accounting),CLASS=X,MSGCLASS=X
//*
// SET SYSDATE=110703
// SET SYSTIME=080000
//*
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=NODE1.NODE2.D&SYSDATE.T&SYSTIME,
// DISP=(NEW,CATLG, DELETE),
// etc....

Example 3. Using SET/INCLUDE commands to set JCL variables in an external library.

Step 1. Application creates a member SETDATE in the library 'MYLIB.CNTL' with the following two records:

// SET SYSDATE=110703
// SET SYSTIME=080000

Step 2. Now, job can be submitted with an INCLUDE statement for the associated library.

//JOB123 JOB (accounting),CLASS=X,MSGCLASS=X
//*
// JCLLIB ORDER=(MYLIB.CNTL)
// INCLUDE MEMBER=SETDATE
//*
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=NODE1.NODE2.D&SYSDATE.T&SYSTIME,
// DISP=(NEW,CATLG, DELETE),
// etc....


Section 3. Using a program to create and submit the JCL.

/* REXX to capture the current date and save it in an INCLUDE group */
Drop jcl. /* clear STEM */
jcl.0 = 1 /* plug in record count. */
jcl.1 = "// SET DATE="D20||DATE('J') /* create SET statement */
jcl.1 = LEFT(jcl.1,80) /* Pad to 80 bytes, and */
"EXECIO 1 DISKW DATEDD (FINIS STEM jcl." /* Output to library */
Exit 0 /* quit with COND CODE = 0 */

Sample Job to capture the date

//OPSSTU1T JOB ,'TERRY',CLASS=A,NOTIFY=&SYSUID,MSGCLASS=X
//LIST OUTPUT DEFAULT=YES,CLASS=*,JESDS=ALL
//S0010 EXEC PGM=IKJEFT01,PARM='SETDATE'
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=(,)
//SYSPRINT DD SYSOUT=(,)
//CEEDUMP DD SYSOUT=(,)
//SYSEXEC DD DSN=&SYSUID..REXX.EXEC,DISP=SHR
//DATEDD DD DSN=&SYSUID..JCL.CNTL(TODAY),DISP=SHR

Sample Job to include the Date.

//OPSSTU11 JOB ,'T-R-S',CLASS=A,MSGCLASS=X,NOTIFY=OPSSTU1
// JCLLIB ORDER=(&SYSUID..JCL.CNTL)
// INCLUDE MEMBER=TODAY
// EXEC PGM=IEFBR14
//DDA DD DSN=&SYSUID..SEQ.&DATE,DISP=(,DELETE,DELETE),
// SPACE=(80,(100,100)),LRECL=80,RECFM=FB,BLKSIZE=0,
// AVGREC=K,UNIT=SYSDA

Time stamp method
This solution could be used when multiple versions of a data set are to be created through out the day, and both date and time are to form part of the data set name. It requires two steps, the first creates the data set, and the second renames the data set replacing a particular node with the date and time. The issue not dealt with directly here is one of co-ordination to ensure that two jobs do not attempt to create data sets with the same time stamp. If an installation runs with the standard JES2 default of NOT allowing concurrent execution of jobs with duplicate names, it provides some assistance.

Sample REXX Routine to rename the data set

/* REXX to rename a data set to include current date as part of the
data set name. */
Parse Arg odsn onode /* Obtain parameters
odsn = existing dsn
onode = date location */
tod = TIME('N') /* Get Time of Day */
Parse var tod hh ':' mm ':' ss /* Remove the semi-colons */
lnode = LENGTH(onode) /* Get length of node */
lodsn = LENGTH(odsn) /* Get length of dsname */
start = POS(onode,odsn) /* Find onode */
more = POS('.',odsn,start) /* Anything after onode */
ndsn = SUBSTR(odsn,1,start-1)||'D20'||DATE('J')||'.T'||hh||mm||ss
If more > 0 Then ndsn = ndsn||SUBSTR(odsn,more)
x = MSG('OFF') /* Suppress messages */
"RENAME '"odsn"' '"ndsn"' " /* Rename the data set */
If rc ?= 0 Then Do /* Check for success */
Say "Rename Error"
Exit rc
End
Exit 0 /* quit with COND CODE = 0 */

Sample Job using the above REXX routine.

//OPSSTU1T JOB ,'T-R-S',CLASS=A,NOTIFY=&SYSUID,MSGCLASS=X
//LIST OUTPUT DEFAULT=YES,CLASS=*,JESDS=ALL
// SET DATEF='OPSSTU1.TEST.FILE'
//S0010 EXEC PGM=IEFBR14
//DDA DD DSN=&DATEF,DISP=(,CATLG,DELETE),
// SPACE=(80,(100,100)),LRECL=80,RECFM=FB,BLKSIZE=0,
// AVGREC=K,UNIT=SYSDA
//S0020 EXEC PGM=IKJEFT01,
// PARM='SETDATE2 &DATEF TEST'
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=(,)
//SYSPRINT DD SYSOUT=(,)
//CEEDUMP DD SYSOUT=(,)
//SYSEXEC DD DSN=&SYSUID..REXX.EXEC,DISP=SHR

//*
/*JOBPARM ROOM=SOP,LINES=9999
//*
//STEP0001 EXEC PGM=IEFBR14
##DD1
// DISP=(,CATLG,DELETE),UNIT=SYSDA,SPACE=(CYL,(1,1)),
// RECFM=FB,LRECL=80
//*
//STEP0002 EXEC PGM=IEBGENER
//SYSUT1 DD DATA
TEST RECORD 01 OF 10
TEST RECORD 02 OF 10
TEST RECORD 03 OF 10
TEST RECORD 04 OF 10
TEST RECORD 05 OF 10
TEST RECORD 06 OF 10
TEST RECORD 07 OF 10
TEST RECORD 08 OF 10
TEST RECORD 09 OF 10
TEST RECORD 10 OF 10
/*
##SYSUT2
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*

Next, I created the JCL that follows. I am using DFSORT to:

first, generate a sequential number for each record so that they can be kept in order.

then, I separate the JCL into two datasets - one with everything minus the ## records, and one with just the ## records, with the ## replaced by //, the data 'DD DSN=', and a dataset, with the SORT function DATE3 supplying the current Julian date.

lastly, the two sets of JCL are concatenated back together, using the sequence numbers to retain the proper order, with the resulting concatenated file going to the Internal Reader for submission. I'm sure it could use some tweaking here and there, but here goes nothing:

//*
//STEP0001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IA DD DISP=SHR,DSN=TPPAT07.JCL(JCLDATEX)
//OA DD DSN=&&OA,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1))
//IB DD DSN=*.OA,VOL=REF=*.OA,DISP=(OLD,PASS)
//OB DD DSN=&&OB,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1))
//OC DD DSN=&&OC,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1))
//IC DD DSN=*.OB,VOL=REF=*.OB,DISP=(OLD,PASS)
// DD DSN=*.OC,VOL=REF=*.OC,DISP=(OLD,PASS)
//OD DD SYSOUT=(*,INTRDR)
//*
//TOOLIN DD DATA
COPY FROM(IA) TO(OA) USING(CTLA)
COPY FROM(IB) TO(OB) USING(CTLB)
COPY FROM(IB) TO(OC) USING(CTLC)
SORT FROM(IC) TO(OD) USING(CTLD)
/*
//*
//CTLACNTL DD DATA
INREC FIELDS=(1,80,SEQNUM,6,ZD)
OUTREC FIELDS=(1:1,86)
/*
//*
//CTLBCNTL DD DATA
INCLUDE COND=(1,2,CH,NE,C'##')
/*
//*
//CTLCCNTL DD DATA
INCLUDE COND=(1,2,CH,EQ,C'##')
OUTREC FIELDS=(1:C'//',3:3,8,12:C'DD DSN=',
C'&SYSUID..DATA.#',DATE3,C',',81:81,6)
/*
//CTLDCNTL DD DATA
SORT FIELDS=(81,6,ZD,A)
OUTREC FIELDS=(1:1,80)
/*

Section 4. Using system variables in the JCL.

//STEP0001 EXEC PGM=EZACFSM1
//SYSIN DD DATA,DLM=@@
//MYJOB JOB (...),CLASS=X,MSGCLASS=X
//*
//STEP0001 EXEC PGM=IEFBR14
//FILE1 DD DSN=&SYSUID..CUST.AF.#&LYR2&LMON&LDAY..#000001.DAT,
// DISP=(MOD,DELETE,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(0,0),RLSE)
//*
//STEP0002 EXEC PGM=ICEGENER
//SYSUT1 DD DUMMY
//SYSUT2 DD DSN=&SYSUID..CUST.AF.#&LYR2&LMON&LDAY..#000001.DAT,
// DISP=(,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(100,100),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
@@
//SYSOUT DD SYSOUT=(A,INTRDR)
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Mar 09, 2006 6:08 pm    Post subject: Re: limit of GDG !
Reply with quote

Which direction did you decide to go with?
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Fri Mar 10, 2006 11:29 am    Post subject:
Reply with quote

We decided to use PS with date qualifier
(Example 3)

Using Set/Include commands


Thanks,
Ramesh
Back to top
View user's profile Send private message
martijn

New User


Joined: 09 Mar 2006
Posts: 14
Location: The Netherlands

PostPosted: Mon Mar 13, 2006 8:38 pm    Post subject:
Reply with quote

Hi,

I'm surprised that superk didn't mention OPC (Operation Planning & Control; the IBM scheduler, nowadays also know as TWS: Tivoli Workload Scheduler). being an OPC-user myself, I automatically assume everybody uses it icon_wink.gif ! Not so, apparently!
Anyway; if you do use OPC, the answer to setting the date-variable is extremely easy! For instance, like this:

//NEX0015T JOB CLASS=O,MSGCLASS=P,
// COND=(0,NE)
//*
//*%OPC SCAN
//*
//STEP001 EXEC PGM=IEFBR14
//DD001 DD DSN=TEST.DSNAME.D&OYMD1.,
// DISP=(,CATLG,),LRECL=80,RECFM=FB

- //*%OPC SCAN tells opc it must scan the jcl for variables to resolve.
- &OYMD1 is is a predefined OPC variable, which resolves to the input arrival date of the application this job is in, in yymmdd-format.
- Before submit, OPC resolves the variables it can /must resolve.
- the actual JCL that's submitted is:

//NEX0015T JOB CLASS=P,MSGCLASS=P,
// COND=(0,NE)
//*
//*>OPC SCAN
//*
//STEP001 EXEC PGM=IEFBR14
//DD001 DD DSN=TEST.DSNAME.D060313,
// DISP=(,CATLG,),LRECL=80,RECFM=FB

I hope my post is useful to you. Obviously, if you don't use OPC, it's not... icon_wink.gif
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Mar 13, 2006 8:44 pm    Post subject: Re: limit of GDG !
Reply with quote

I don't know why the O/P doesn't just stick with using GDG's.
Back to top
View user's profile Send private message
martijn

New User


Joined: 09 Mar 2006
Posts: 14
Location: The Netherlands

PostPosted: Mon Mar 13, 2006 9:41 pm    Post subject:
Reply with quote

Hi superk,

What do you mean with O/P? the OPC people?

anyway, I'm not saying that you shouldn't use GDG's, but their are alternatives! Use whatever suits you (and your installation) best!

One obvious advantage of using a date-stamp is that the datasetname tells you when the dataset was created. A GDG-qualifier like G0001V00 doesn't really tell you much, does it?...
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Mar 13, 2006 9:59 pm    Post subject: Re: limit of GDG !
Reply with quote

O/P = Original Poster.
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Commit limit for Delete query through... mf_karthik DB2 10 Thu Dec 17, 2015 12:56 am
No new posts Array overflow on Internal table - An... scdinesh COBOL Programming 13 Thu May 22, 2014 2:55 am
No new posts To set record limit for each include ... karthickpearl DFSORT/ICETOOL 8 Tue Apr 15, 2014 6:02 pm
No new posts Buffer limit reached while handling h... rajendra kalepu COBOL Programming 32 Mon Mar 31, 2014 7:29 pm


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