View previous topic :: View next topic
|
Author |
Message |
harijax
New User
Joined: 16 Jul 2008 Posts: 22 Location: Bangalore
|
|
|
|
I wanted to merge the below SORT steps. Can anybody help me.
//SYSIN DD *
SORT FIELDS=(1,220,CH,A)
SUM FIELDS=NONE
//* END
/SYSIN DD *
SORT FIELDS=(42,7,CH,A)
/* END |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Hari,
Please start a new topic when you want to ask something.
Quote: |
I wanted to merge the below SORT steps. Can anybody help me.
|
Put all the SORT statements one after the other to merge.
BUT all depends on your requirement.
What actually is your requirement? This would help you in getting better answers. |
|
Back to top |
|
|
harijax
New User
Joined: 16 Jul 2008 Posts: 22 Location: Bangalore
|
|
|
|
Hi Aaru, Sorry for that. I will start a new topic from next time.
My requirement is that, I should merge the two SYSINs under oneSORT step. Currently I have two SORT steps. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
hari,
Quote: |
requirement is that, I should merge the two SYSINs under oneSORT step |
As mentioned earlier, you can just put one statement after another in the same SYSIN card. BUT all depends on the business requirement.
It shd be like
Code: |
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,220,CH,A)
SUM FIELDS=NONE
SORT FIELDS=(42,7,CH,A)
/* |
POst your JCL with the code tag. |
|
Back to top |
|
|
harijax
New User
Joined: 16 Jul 2008 Posts: 22 Location: Bangalore
|
|
|
|
But it gives Duplicate statement error.
SYSIN :
SORT FIELDS=(1,1,CH,A)
SUM FIELDS=NONE
SORT FIELDS=(2,1,CH,A)
*
WER269A SORT STATEMENT : DUPLICATE STATEMENT FOUND |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
As mentioned earlier, you can just put one statement after another in the same SYSIN card. |
I believe not. . . Maybe there is something i misunderstand. . .
Quote: |
I wanted to merge the below SORT steps. |
Why would you think you could give conflicting sort statements in the same step?
If you take a bit of time and explain what you want to do showing examples of all input files and the outputs you want from those inputs, someone may be able to offer suggestions. As posted, your question is most unclear |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Hari,
Quote: |
WER269A SORT STATEMENT : DUPLICATE STATEMENT FOUND |
My SITE uses DFSORT and it works fine here . I didn't note "SYNCSORT" in your post. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Aaru wrote: |
My SITE uses DFSORT and it works fine here . |
DFSORT ignores the duplicate and doesn't abend, but it doesn't "work" to have two SORT statements. Only one sort is done. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Bill is correct. With DFSORT, you get:
Code: |
SORT FIELDS=(1,1,CH,A)
SUM FIELDS=NONE
SORT FIELDS=(2,1,CH,A)
ICE002I 0 DUPLICATE OR CONFLICTING SORT STATEMENT
|
The ICE002I indicates the second SORT statement is ignored. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
DFSORT ignores the duplicate and doesn't abend, but it doesn't "work" to have two SORT statements. Only one sort is done.
|
Thanks Bill for the details. I should have had a look at the output. |
|
Back to top |
|
|
|