Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT command merge

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Reply to: how do sum fields=none remove duplicates.
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: 1288
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 3:17 pm    Post subject: Reply to: how do sum fields=none remove duplicates.
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    Post subject: Reply to: how do sum fields=none remove duplicates.
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: 1288
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 3:43 pm    Post subject: Reply to: how do sum fields=none remove duplicates.
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    Post subject: Reply to: how do sum fields=none remove duplicates.
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

Site Director


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

PostPosted: Wed Jul 16, 2008 9:36 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Fri Jul 18, 2008 10:53 am    Post subject: Reply to: SYNCSORT command merge
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    Post subject: Re: Reply to: SYNCSORT command merge
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 Moderator


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

PostPosted: Fri Jul 18, 2008 10:37 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Jul 19, 2008 10:43 am    Post subject: Reply to: SYNCSORT command merge
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us