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

Eliminating Duplicates along with the Original Entry


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Mon Apr 28, 2008 12:09 pm
Reply with quote

Hi,

Can anyone please help me to Eliminate Duplicate values along with the Original Entry using DFSORT. Please I dont want this to be done using ICETOOL.

Ex:- I am having a dataset with following Entries.
XXXXX
YYYYYY
XXXXX
ZZZZZ
AAAAA
YYYYYY
YYYYYY

My output shud contain only the unique values as shown below.
ZZZZZZ
AAAAAA

Can anyone please provide a DFSORT code for this scenario.

Regards
Ashok.
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 28, 2008 5:00 pm
Reply with quote

Well, you can use an ICETOOL card with the NODUPS option

//TOOLIN DD *
SELECT FROM(INP) TO(OUT) ON(1,6,CH) NODUPS


Denis
Back to top
View user's profile Send private message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Mon Apr 28, 2008 6:45 pm
Reply with quote

Hi Denis,

I know this can be done in ICETOOL using NODUPS option. But, thats the challenge here, it should be done without ICETOOL. Here, in my office, ICETOOL cannot be used in production region.

Regards
Ashok.
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 28, 2008 8:39 pm
Reply with quote

Sorry Ashok,

That's was what I use mostly in these cases. For another way of eliminating DUPS with ICEMAN or SORT is better to ask directly to Mr. Yaeger. I'm sure if he has time will resolve your problem.

Regards
Denis
Back to top
View user's profile Send private message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Mon Apr 28, 2008 8:54 pm
Reply with quote

Hi,

Mr.Dennis - Thanks for your way. But no need of sorry here.

Mr.Yaeger. Could you please help on this case. Is there any other way using JCL (Excluding ICETOOL).

Anyone, please throw your lights.

Regards
Ashok.
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: Mon Apr 28, 2008 9:55 pm
Reply with quote

Ashok,

You can use a DFSORT job like this to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
XXXXX
YYYYYY
XXXXX
ZZZZZ
AAAAA
YYYYYY
YYYYYY
/*
//SORTOUT DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//SYSIN    DD    *
  INREC OVERLAY=(81:C'00000001',89:SEQNUM,8,ZD)
  SORT FIELDS=(1,10,CH,A)
  SUM FIELDS=(81,8,ZD)
  OUTFIL INCLUDE=(81,8,ZD,EQ,+1)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=&&T1,DISP=(OLD,PASS)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  SORT FIELDS=(89,8,ZD,A)
  OUTREC BUILD=(1,80)
/*
Back to top
View user's profile Send private message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Tue Apr 29, 2008 7:49 pm
Reply with quote

Hi Frank,

Your code worked fine.
Thanks a lot for your immediate response.

Regards
Ashok.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
This topic is locked: you cannot edit posts or make replies. Compare files with duplicates in one ... DFSORT/ICETOOL 11
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
No new posts COUNT the number of duplicates DFSORT/ICETOOL 3
This topic is locked: you cannot edit posts or make replies. SUM FIELDS=NONE in reverse - Get dupl... DFSORT/ICETOOL 9
Search our Forums:

Back to Top