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
 

 

Eliminate DUPLICATES and SORT at the same time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Wed Dec 03, 2008 12:05 pm    Post subject: Eliminate DUPLICATES and SORT at the same time
Reply with quote

Hi ...
Is it possible to eliminate DUPLICATES and at the same time , again use SORT FIELDS in the sort card to Sort a particular field in the ascending order ? Giving the SORT FIELDS twice gives the error :
Code:

WER269A  SORT STATEMENT    : DUPLICATE STATEMENT FOUND


I am trying to select Unique records using SORT FIELDS on the column -
SORT FIELDS=(15,10,CH,A)
and then when I write my report I am trying to sort the output records based on the STATE by using
SORT FIELDS=(68,2,CH,A)

How else can I get my output sorted Statewise without using SORT FIELDS again.
The following is my SORT CARD :
Code:

JOINKEYS FILE=F1,FIELDS=(15,10,A)                           
SORT FIELDS=(15,10,CH,A),EQUALS                             
SUM FIELDS=NONE                                             
JOINKEYS FILE=F2,FIELDS=(01,10,A)                           
REFORMAT FIELDS=(F2:1,67,F1:25,6)                           
SORT FIELDS=(68,2,CH,A),EQUALS                               
OUTFIL REMOVECC,                                             
       HEADER2=(30:'J A Y S   R E P O R T   O N  IYUIOS 5',/,
                35:'LAST PURCHASES MADE IN 2003',//,         
                02:'NAME',                                   
                20:'STREET ADDRESS',                         
                52:'CITY',                                   
                68:'STATE',                                 
                75:'DATE',/),                               
        OUTREC=(02:11,15,                                   
                20:31,20,                                   
                52:51,15,                                   
                68:68,2,                   
                73:70,2,C'/',72,2,C'/',68,2)
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Wed Dec 03, 2008 12:15 pm    Post subject:
Reply with quote

JayC,

As the message indicates, Syncsort does not support the usage of more than one SORT statement. Also you cannot expect it to work the way you're expecting.

The JOIN operation sorts your input files on the key fields by default unless you specify the 'SORTED' option which implies that the files are presorted. You can specify only a single SORT statement which takes the JOINed records as input. If you describe what exactly you are trying to do, somebody here might be able to help.
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Wed Dec 03, 2008 12:29 pm    Post subject:
Reply with quote

Much obliged....Didn't expect it to work my way...
I was asking if there is any other way....

Thanks for the info.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Wed Dec 03, 2008 12:44 pm    Post subject:
Reply with quote

Quote:
I was asking if there is any other way
Can be answered only when you explain what you are trying to do. Post a few sample records and describe the rules for getting the output along with input/output file attributes.
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Dec 04, 2008 11:21 am    Post subject:
Reply with quote

Thanks for the clarification Arun
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Thu Dec 04, 2008 1:04 pm    Post subject:
Reply with quote

Quote:
Thanks for the clarification Arun
JayC,

It was not a clarification. It was a request from me asking you to post some more details about your requirement. icon_biggrin.gif
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Dec 04, 2008 2:23 pm    Post subject:
Reply with quote

I understood that Arun, icon_smile.gif
It was a general doubt that struck me, I frankly don't have a requirement that I am trying to get to. I

ts just that I was trying to do some thing and this just struck me.
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 CICS transaction slow response time vasanthz All Other Mainframe Topics 1 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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