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

SYNCSORT command merge


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

New User


Joined: 16 Jul 2008
Posts: 22
Location: Bangalore

PostPosted: Wed Jul 16, 2008 2:43 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 3:17 pm
Reply with quote

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
View user's profile Send private message
harijax

New User


Joined: 16 Jul 2008
Posts: 22
Location: Bangalore

PostPosted: Wed Jul 16, 2008 3:24 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 3:43 pm
Reply with quote

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
View user's profile Send private message
harijax

New User


Joined: 16 Jul 2008
Posts: 22
Location: Bangalore

PostPosted: Wed Jul 16, 2008 5:33 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 16, 2008 9:36 pm
Reply with quote

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 icon_confused.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Jul 18, 2008 10:53 am
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Jul 18, 2008 7:28 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jul 18, 2008 10:37 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Jul 19, 2008 10:43 am
Reply with quote

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
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top