View previous topic :: View next topic |
Author |
Message |
Vish Beginner
Joined: 17 Sep 2003 Posts: 21 Topics: 9 Location: Mumbai India
|
Posted: Mon Sep 29, 2003 6:55 am Post subject: Selection of all GDG versions in the given range. |
|
|
Friends,
I want to use GDG versions from 30 to 120. Is there any simpla way to do this apart from specifying all the versions in the range.
Thanks, _________________ Vish |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Sep 29, 2003 8:17 am Post subject: |
|
|
The simplest way I can think of is to cut and paste all the gdg versions.
what exactly is the requirement? Do you intend to copy the generations in the range or something else? |
|
Back to top |
|
|
Vish Beginner
Joined: 17 Sep 2003 Posts: 21 Topics: 9 Location: Mumbai India
|
Posted: Mon Sep 29, 2003 9:08 am Post subject: |
|
|
Kolusu,
Thanks. In fact I want to cumulate all the GDG versions in that range and copy into some temporary file for the reporting purpose.
Requirement is something like this.
I need the report for all the transactions in the specified time period which are stored in GDG versions.The period can be anything.It might be 1 month (here I have to take 30 versions ) 2 month(60 or 61 versions) and so on.
Thanks, _________________ Vish |
|
Back to top |
|
|
Mike Beginner
Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Mon Sep 29, 2003 5:16 pm Post subject: |
|
|
You could probably do this using an idcams LISTCAT to get the catalog info and then use sort to extract and reformat the required entries, this being followed perhaps by another idcams to copy the all the selected gdg's into a single dataset, another alternative would be that the reformatted data be dd statements for JCL which could be submitted by the third step (obviously other JCL bar the ddnames would come from another source, but be read by the third step).
Personally I'd probably use a Rexx program to do it all in one go (probably because I'm no expert with sort). _________________ Regards,
Mike. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Sep 30, 2003 1:25 pm Post subject: |
|
|
vish,
You need to know the creation date of each and every GDG version.You need to correlate your gdg version number with the create date and then you need to copy only those versions.
This involves a LISTCAT step and stripping all the gdg version names which fall into your range.A program or utility will read the listcat output and pick the desired generations.
But if you have the transaction date in the file , you can just use a simple sort step (give the gdg base name as sortin ) to include records which fall into desired range.
For example let us say your file is 80 bytes in LRECL and the transaction date starts in position 5. Lets us say the date format is CCYY-MM-DD.Let us assume that you want all the records which starts from 1st March 2003 and ends on 30th June 2003.The following JCl will give you the desired results.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR GDG BASE,
// DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT TEMP FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(5,10,CH,GE,C'2003-03-01',AND
5,10,CH,LE,C'2003-06-30')
//*
|
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
Vish Beginner
Joined: 17 Sep 2003 Posts: 21 Topics: 9 Location: Mumbai India
|
Posted: Wed Oct 01, 2003 6:54 am Post subject: |
|
|
Thanks a lot for your help. _________________ Vish |
|
Back to top |
|
|
|
|