MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading 1 record from all generations

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
dhulipalla
Beginner


Joined: 24 Aug 2004
Posts: 21
Topics: 6

PostPosted: Thu Dec 15, 2005 2:53 pm    Post subject: Reading 1 record from all generations Reply with quote

I have a GDG with 10 generations. Suggest me in opening all the generations and read one record from each generation using FileAid
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 15, 2005 3:55 pm    Post subject: Reply with quote

dhulipalla,

Assuming that you always 10 generations, pre-allocate the output file and then hardcode the relative generation numbers for input files

Code:

//STEP0100  EXEC PGM=IEFBR14                             
//FILE01    DD DSN=YOUR OUTPUT 1 REC FILE ,                     
//             DISP=(NEW,CATLG,DELETE),                 
//             UNIT=SYSDA,                               
//             SPACE=(CYL,(1,1),RLSE),                   
//             DCB=(LRECL=nnn,RECFM=zz,BLKSIZE=0)         
//*
//STEP0200  EXEC PGM=FILEAID                             
//SYSPRINT  DD SYSOUT=*                                 
//DD01      DD DSN=YOUR GDG BASE (-09),
//             DISP=SHR                                 
//DD02      DD DSN=YOUR GDG BASE (-08),
//             DISP=SHR                                 
//DD03      DD DSN=YOUR GDG BASE (-07),
//             DISP=SHR                                 
//DD04      DD DSN=YOUR GDG BASE (-06),
//             DISP=SHR                                 
//DD05      DD DSN=YOUR GDG BASE (-05),
//             DISP=SHR                                 
//DD06      DD DSN=YOUR GDG BASE (-04),
//             DISP=SHR                                 
//DD07      DD DSN=YOUR GDG BASE (-03),
//             DISP=SHR                                 
//DD08      DD DSN=YOUR GDG BASE (-02),
//             DISP=SHR                                 
//DD09      DD DSN=YOUR GDG BASE (-01),
//             DISP=SHR                                 
//DD10      DD DSN=YOUR GDG BASE (+0), 
//             DISP=SHR                                 
//DD01O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD02O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD03O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD04O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD05O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD06O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD07O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD08O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD09O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//DD10O     DD DSN=YOUR OUTPUT 1 REC FILE ,DISP=MOD   
//SYSIN     DD *                             
$$DD01 COPY OUT=1                             
$$DD02 COPY OUT=1                             
$$DD03 COPY OUT=1                             
$$DD04 COPY OUT=1                             
$$DD05 COPY OUT=1                             
$$DD06 COPY OUT=1                             
$$DD07 COPY OUT=1                             
$$DD08 COPY OUT=1                             
$$DD09 COPY OUT=1                             
$$DD10 COPY OUT=1                             
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dhulipalla
Beginner


Joined: 24 Aug 2004
Posts: 21
Topics: 6

PostPosted: Fri Dec 16, 2005 10:09 am    Post subject: Reply with quote

Kolusu,

We are not sure of having the same no of generations all the time, in that case is there any alternative..

In my shop if we dont open / refer a dataset for certain time period it is going to be uncataloged, for that we planned to prepare a job which opens all the generations/datasets and reads one record from each dataset so that we can avoid the uncataloging of the datasets.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 16, 2005 10:36 am    Post subject: Reply with quote

Quote:

In my shop if we dont open / refer a dataset for certain time period it is going to be uncataloged, for that we planned to prepare a job which opens all the generations/datasets and reads one record from each dataset so that we can avoid the uncataloging of the datasets.


Dhulipalla,

I guess you are confused with MIGRATION to Uncatalog'ing a dataset.Usually you can recall a migrated dataset using the HRECALL in batch mode. Check this link

http://mvsforums.com/helpboards/viewtopic.php?p=26390#26390

For recovering Uncatalog datasets then check these links

http://mvsforums.com/helpboards/viewtopic.php?t=4232&highlight=uncatalog

http://mvsforums.com/helpboards/viewtopic.php?t=1491&highlight=uncatalog

http://mvsforums.com/helpboards/viewtopic.php?t=2656&highlight=uncatalog

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group