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
 

 

Can DFSort (Icetool ) do this???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Wed Jul 11, 2007 9:11 am    Post subject: Can DFSort (Icetool ) do this???
Reply with quote

Hi,

i have got typical question and i wonder if icetool can solve this??? i tried with splice, but no luck..
Following is just the mock up of the requirement:

Requirement:

Data in File A :
Judy Rob Harry
Judy Mona Bruce

( & rest..how many duplicates is unknown)

Data in File b :
Judy Joe Jerry Kevin Laura

The output should be

Judy Rob Harry Kevin Laura
Judy Mona Bruce Kevin Laura

Can somebody help me out here??
Thanks in advance.

ap_mainframes
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jul 11, 2007 10:10 am    Post subject:
Reply with quote

ap_mainframes
Yes it is possible with DFSORT/ICETOOL, untill and unless u have duplicates only in 1set of file(Make sure as to No duplicates in both the files!).

Check for the topic Create files with matching and non-matching records at http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/.

There are many topics similar to your reuest search in forum too.

Give a try, if didn't work let us know!
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jul 11, 2007 11:59 am    Post subject:
Reply with quote

ap_mainframes
Anyway's, DFSORT/ICETOOL solution for your request is here:
Code:
//*******************************************************               
//STEP001  EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN2      DD *                                                         
JUDY ROB HARRY                                                         
JUDY MONA BRUCE                                                         
/*                                                                     
//IN1      DD *                                                         
JUDY JOE JERRY KEVIN LAURA                                             
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
/*                                                                     
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA 
//BOTH     DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
 COPY FROM(IN1)  TO(TMP1) USING(CP01)                                   
 COPY FROM(IN2)  TO(TMP1) USING(CP02)                                   
 SPLICE FROM(TMP1) TO(BOTH) ON(1,4,CH) WITH(31,1) WITH(6,10) -         
   WITHALL                 USING(CP03) KEEPNODUPS                       
/*                                                                     
//CP01CNTL DD   *                                                       
  OUTREC BUILD=(1,26,30:C'11')                                         
/*                                                                     
//CP02CNTL DD   *                                                       
  OUTREC BUILD=(1,15,30:C'22')                                         
/*                                                                     
//CP03CNTL DD   *                                                       
  OUTFIL FNAMES=BOTH,INCLUDE=(30,2,CH,EQ,C'12'),BUILD=(1,26)           
/*                                                                     

and the O/P BOTH contains
Code:
----+----1----+----2----+-
JUDY ROB HARRY KEVIN LAURA
JUDY MONA BRUCEKEVIN LAURA
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 Jul 11, 2007 11:29 pm    Post subject:
Reply with quote

Hello,

What should happen if the inputs are:
Data in File A :
Al Rob Harry
Al Mona Bruce
Judy Rob Harry
Judy Mona Bruce
Michael Rob Harry
Michael Mona Bruce

( & rest..how many duplicates is unknown)

Data in File b :
Al Joe Jerry Kevin Laura
Judy Joe Jerry Kevin Laura
Michael Joe Jerry Kevin Laura
icon_question.gif

Should the second and third names in file 2 always be skipped? What happens if the second and/or third names are longer?

The posted solution does not appear to match the output defined by the original "requirement".
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Thu Jul 12, 2007 8:36 am    Post subject: Re: Can DFSort (Icetool ) do this???
Reply with quote

Hi..
As I mentioned in the requirement.
There can be duplicates in both the files..

Thanks,
ap_mainframes
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: Thu Jul 12, 2007 8:43 am    Post subject:
Reply with quote

Hello,

Yes, we understood that.

What about the other questions asked (length and skipping 2nd and 3rd entgry)?

What about the output that does not match your posted sample output?

Will the posted suggested do what you need or is there more to your requirement.
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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm


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