Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 16
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
References
PostPosted: Mon Apr 28, 2008 12:09 pm    Post subject: Re: Eliminating Duplicates along with the Original Entry Reply with quote

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: 16
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: 16
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: 4236
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: 16
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1