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

Related to sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 26, 2010 8:37 pm
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

Moderator Emeritus


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

PostPosted: Tue Oct 26, 2010 8:52 pm
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
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

Superior Member


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

PostPosted: Tue Oct 26, 2010 8:59 pm
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

Moderator Emeritus


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

PostPosted: Tue Oct 26, 2010 9:05 pm
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

Superior Member


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

PostPosted: Tue Oct 26, 2010 9:09 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 26, 2010 9:14 pm
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
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Wed Oct 27, 2010 1:19 am
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
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: 2481
Location: @my desk

PostPosted: Wed Oct 27, 2010 11:49 am
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
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
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

Superior Member


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

PostPosted: Wed Oct 27, 2010 3:00 pm
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

Moderator Emeritus


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

PostPosted: Wed Oct 27, 2010 7:19 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top