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

Read Entire GDG Base and backup


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

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Tue Feb 05, 2008 10:16 pm
Reply with quote

Hi,

At the end of each day, I need to read all the existing generations of a GDG Base (Say X )and then backup all of them as one different GDG Version (Say Y+1).

How can I do that ? Thanks for your time and info.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Feb 05, 2008 10:23 pm
Reply with quote

Since you're in the Compuware Forum, is this a FILE-AID question?
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Tue Feb 05, 2008 10:33 pm
Reply with quote

As such, it doesnt matter. I am thinking in terms of IEBGENER,IDCAMS or for that matter,anything that works.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Feb 05, 2008 10:39 pm
Reply with quote

Just read against the base entry using whatever utility you want. That will concatenate all of the generations together as a single input dataset.
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Tue Feb 05, 2008 10:54 pm
Reply with quote

I want to copy all versions as one after processing.

Will that work too with IDCAMS?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Feb 05, 2008 11:05 pm
Reply with quote

Your question is not very clear...

ok reading all the gdg generations ( not versions ) in one single shot

what is not clear is where You want the written to ..

Do You want them as a single dataset with the same dcb attributes of the original GDG

or is enough for You to have them in backup format..

Thing about space and time to backup

case 1

Code:
//ieb exec pgm=icegener ( faster than iebgener )
//sysprint dd syout=*
//sysin dd dummy
//sysut1 dd disp=shr,dsn=X not using a gneration will concatenate all the generations
//sysut2 dd .... disp and dcb and allocation parameters
//              dsn=y(+1)


case 2

Code:
//dump exec pgm=adrdssu
//sysprint dd sysout=*
//sysut2 dd .... disp and dcb and allocation parameters
//              dsn=y(+1)
//sysin dd *
 DUMP DATASET(INCLUDE            -
          (x.** -
          )) -
        OUTDD(sysut2) -
        SHA -
        SPHERE -
        TOL(ENQF) ADMIN


just snippets, look att the appropriate doc for the exact syntax

also remember after the copy/dump to delete all the input generations
otherwise the next day You will have them again in the copy/dump

if You need to have the copy/dump
contain only the daily generations and,
at the same time have them available,

then, alas, You need to review Your requirements
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Feb 05, 2008 11:29 pm
Reply with quote

kirankumarj wrote:
I want to copy all versions as one after processing.
Will that work too with IDCAMS?

Quote:
Just read against the base entry using whatever utility you want.


What's the difference will it make about the choice of utility..if only back-up is needed...& why don't give a try if You need a choice..?
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Tue Feb 05, 2008 11:32 pm
Reply with quote

//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=CCSDLTQX.TRANS.SN8115IR.KIRAN,DISP=SHR
//OUT1 DD DSN=CCSDLTQX.TRANS.SN8115IR.KIRAN.TEST(+1),
// DCB=(RECFM=FB,LRECL=200),
// SPACE=(CYL,(2,1),RLSE),UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
REPRO INFILE(IN1) OUTFILE(OUT1)
//*==================================================================*
//STEP2 EXEC PGM=IEFBR14,COND=(0,NE,STEP1)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=CCSDLTQX.TRANS.SN8115IR.KIRAN,
// DISP=(OLD,DELETE,DELETE)
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Tue Feb 05, 2008 11:32 pm
Reply with quote

The above code worked. Thanks to all.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Feb 06, 2008 12:28 pm
Reply with quote

Hi,

Yup.. Your code will work & the other which were suggested earlier.

Thanks for sharing Your solution... icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Feb 06, 2008 12:30 pm
Reply with quote

it will work, but from a performance point of view
idcams is certainly the worst choice...

again i suggest ...
"ICEGENER" if You need to process the data
"ADRDSSU" if You simply need a backup
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1049
Location: Richmond, Virginia

PostPosted: Thu Feb 07, 2008 1:05 am
Reply with quote

Note an interesting/odd feature: referencing the GDG base only concatenates the gens in reverse order!
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 COBOL sorting, with input GDG base COBOL Programming 7
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
Search our Forums:

Back to Top