View previous topic :: View next topic
|
Author |
Message |
jagankallis Warnings : 1 New User
Joined: 28 Jun 2006 Posts: 29 Location: DUISBURG
|
|
|
|
Dear All,
I want to automate the activity of SORT utility in Production.
Code: |
//S010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DISP=SHR,
// DSN='A VERY VERY BIG UNSORTED TAPE FILE'
//SORTOUT DD DSN=OUTPUT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=AUTO,
// LABEL=RETPD=3650,
// DCB=(RECFM=VB,LRECL=3000,BLKSIZE=0)
//SYSIN DD *
INCLUDE COND=((24,16,CH,EQ,C'XXXXXXXXXXXXXXXX'),OR,
.
.
.
(24,16,CH,EQ,C'yyyyyyyyyyyyyyyy'))
SORT FIELDS=COPY
/* |
I want to specify the keys given in INCLUDE COND in a file.
I want to make sure that whatever approach I follow I never need to SORT the under any circumstance.
Is it possible? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post some sample data and what you want as output.
I'm not sure how to automate sort but never need to use sort
When you show your input and what the out0put needs to be, we can offer suggestions. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I want to specify the keys given in INCLUDE COND in a file. |
You can use a file or a PDS member as the SYSIN DD input as long as it has RECFM=FB and LRECL=80. You can concatenate such files with other such files or DD * statements. For example, if you had INCLUDE.CTL with your INCLUDE statement, you could use:
Code: |
//SYSIN DD *
SORT FIELDS=COPY
// DD DSN=INCLUDE.CTL,DISP=SHR
|
Quote: |
I want to make sure that whatever approach I follow I never need to SORT the under any circumstance. |
I can't figure out what this sentence means. Are some words missing? |
|
Back to top |
|
|
jagankallis Warnings : 1 New User
Joined: 28 Jun 2006 Posts: 29 Location: DUISBURG
|
|
|
|
I have a GDG => EORGA.RA.SAMPLE with many generations
Sample EORGA.RA.SAMPLE.G0001V00 (sorted on first 10 bytes) content
Code: |
1111111111rama
1111111111rama
1111111111rama
1111111111rama
1111111111rama
1111111112sita
1111111112sita
1111111112sita
1111111112sita
1111111112sita
1111111112sita |
Sample EORGA.RA.SAMPLE.G0002V00 (sorted on first 10 bytes) content
Code: |
1111111111jagan
1111111111jagan
1111111111jagan
1111111111jagan
1111111111jagan
1111111112rajesh
1111111112rajesh
1111111112rajesh
1111111113kamala
1111111113kamalakar
1111111113tom alter |
Now my input is EORGA.RA.SAMPLE entire GDG will all version and the latest version GDG at the top in the concatenation and the earliest version of the GDG at the bottom
and I give in my INCLUDE COND many keys...
for our example we take the KEY '1111111111'
and my desired output is
Code: |
1111111111jagan
1111111111jagan
1111111111jagan
1111111111jagan
1111111111jagan |
and
Code: |
1111111111rama
1111111111rama
1111111111rama
1111111111rama
1111111111rama |
should not be retrieved.
Is there a way possible using SORT?? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I really can't figure out what it is you want to do from your explanation. Maybe somebody else can. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
My guess is that the example data and desired results are incorrectly/imcompletely posted.
Maybe Jagannathan B will review and re-post with better explanation(s).
I'm not sure how the gdg versions relate to the INCLUDEs - unless there is some thought that sort will "know" when if crosses to another generation and will apply the desired INCLUDE to the appropriate version.
Of course, i may be way off . . . |
|
Back to top |
|
|
|