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
 

 

Related to sort

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

New User


Joined: 12 Oct 2010
Posts: 13
Location: Pune

PostPosted: Tue Oct 26, 2010 7:08 pm    Post subject: Related to sort
Reply with quote

Need your help as It is urgent required for my project. icon_rolleyes.gif

I get file from my upstream which contains data of fixed length.
I want to create other file , which will eliminate all duplicate records taking key as starting position = 1 and length =10 .
That key should use first 10 column for search for duplicate.

If I use sort fields = ( 1,10,CH,A) SUM FIELDS=NONE then as it takes first 10 column as key to find duplicate in whole file , instead of that I want , key should use only 10 column of file to search duplicate!!

Input :
12345678901234567890
56789678901234567890
12345678902162061853
12345678901234567850
34545678911234567890

current output :
12345678901234567890
12345678902162061853
12345678901234567850

My Expected output :
12345678901234567890
56789678901234567890
34545678911234567890
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Oct 26, 2010 8:37 pm    Post subject: Reply to: Related to sort - Urgent
Reply with quote

Quote:
Need your help as It is urgent required for my project.


we do not do urgent,

remember... replying is
on voluntary basis,
on the responders time and equipment
free of charge

if You want things done according to Your timings You should get a paid consultant !
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: Tue Oct 26, 2010 8:52 pm    Post subject:
Reply with quote

Hello,

Move the SUM FIELDS to the next line. It is being ignored. . .
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 26, 2010 8:55 pm    Post subject:
Reply with quote

great catch, Dick!

i was thinking about telling him to provide a sysout display,
but this being Frank's domain,
i hesitate to post,
but since you did, i will/have.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 26, 2010 8:59 pm    Post subject:
Reply with quote

With this input:
Code:
12345678901234567890
56789678901234567890
12345678902162061853
12345678901234567850
34545678911234567890
and considering only first 10-digits as key to eliminate duplicates, you'll get:
Code:
12345678901234567890
34545678911234567890
56789678901234567890
and not what you show. In the output I show, 2nd and 3rd record are shuffled with each other compared to what you show. So, what do you want?
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: Tue Oct 26, 2010 9:05 pm    Post subject: Reply to: Related to sort - Urgent
Reply with quote

Hi Dick,

Quote:
great catch,
Thanks icon_smile.gif

I also suspect that Syncsort is being used. . . .

d
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 26, 2010 9:09 pm    Post subject: Re: Reply to: Related to sort - Urgent
Reply with quote

dick scherrer wrote:
Quote:
great catch,
Thanks icon_smile.gif
Do you guys watch Cricket in U.S.? icon_biggrin.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Oct 26, 2010 9:14 pm    Post subject:
Reply with quote

Baseball catch, maybe?

Football (American) catch?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 26, 2010 9:15 pm    Post subject:
Reply with quote

chriwho?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 26, 2010 9:16 pm    Post subject:
Reply with quote

as in ' i caught him *******-up'!
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: Wed Oct 27, 2010 1:07 am    Post subject:
Reply with quote

Quote:
i was thinking about telling him to provide a sysout display,
but this being Frank's domain,
i hesitate to post,
but since you did, i will/have.


JCL Forum is NOT my "domain", DFSORT Forum is. I always try to make sure that posts in the DFSORT Forum are answered. I sometimes post in the JCL Forum.
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 Oct 27, 2010 1:19 am    Post subject:
Reply with quote

Hello,

I just wonder if Narendra Sahebrao Bade has this working now. . .
Back to top
View user's profile Send private message
Narendra Bade

New User


Joined: 12 Oct 2010
Posts: 13
Location: Pune

PostPosted: Wed Oct 27, 2010 10:32 am    Post subject:
Reply with quote

Hi Dick ,
Looking at your catch , I suggest ,you should learn Gilli-Danda to know what is exactly catch means icon_lol.gif .

Hi Anuj,
Can you give me sort card which will only eliminate duplicates in the first 10 columns of file.

Sort Card that i have used:
SORT FIELDS=(1,10,CH,A)
SUM FIELDS=NONE

Here , it is using first 10 columns ro remove duplicates in whole file ?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Oct 27, 2010 11:49 am    Post subject:
Reply with quote

Quote:
using first 10 columns ro remove duplicates in whole file
What do you mean by this? Your sort will remove duplicate keys in pos 1-10 as shown above by Anuj.

If that is not what you want show some example with input records and the expected output.
Back to top
View user's profile Send private message
Narendra Bade

New User


Joined: 12 Oct 2010
Posts: 13
Location: Pune

PostPosted: Wed Oct 27, 2010 12:12 pm    Post subject:
Reply with quote

I get my answer.
Thank you Dick , Anuj , arun , frank , enrico.
Back to top
View user's profile Send private message
Narendra Bade

New User


Joined: 12 Oct 2010
Posts: 13
Location: Pune

PostPosted: Wed Oct 27, 2010 12:29 pm    Post subject:
Reply with quote

Sorry for giving incorrect information.
SORTIN file is in VB format and SORTOUT file is in FB format.
To get expected output , I should used

SORT FIELDS=(5,10,CH,A)
SUM FIELDS=NONE

Sorry guys for wasting your time icon_cry.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 27, 2010 3:00 pm    Post subject: Reply to: Related to sort
Reply with quote

Well, you're not making much sense, Naren.

In your first post, You showed us some sample records from input - I, for one, will pick them up as in-stream data for SORTIN (or IN) and will try to get a SORT card on the fly to get the expected-output. In-stream data will be treated as FB/80; so yes, it was incorrect information since start.

Also, you did not notice the other post of mine in this thread which talks about the order of records. I'm not sure if you got it really working for you or not but I was thinking that you might need to use EQUALS possibly, per the output you show.

Just an aside, EQUALS will keep the duplicate records in their original order, but will not keep all of the records in their original order. For that, you need two passes over the data. Though it can get site-specific but I thought it's worth mentioing about it here.
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 Oct 27, 2010 7:19 pm    Post subject: Reply to: Related to sort
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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