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
 

 

Eliminating Duplicates along with the Original Entry

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Eliminating Duplicates along with the Original Entry
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    Post subject:
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    Post subject: Reply to: Eliminating Duplicates along with the Original Ent
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    Post subject:
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    Post subject: Reply to: Eliminating Duplicates along with the Original Ent
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 Moderator


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

PostPosted: Mon Apr 28, 2008 9:55 pm    Post subject:
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    Post subject: Reply to: Eliminating Duplicates along with the Original Ent
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts Automation of data entry using Rexx i... zingy.rajeev CLIST & REXX 4 Mon Aug 22, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Automation of data entry using Rexx i... zingy.rajeev CICS 0 Mon Aug 22, 2016 4:11 pm
No new posts Matching files, retaining original so... Andy N SYNCSORT 6 Tue Sep 09, 2014 3:19 pm


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