MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Eliminate All Duplicates in a file
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Apr 01, 2004 7:29 am    Post subject: Reply with quote

Kolusu,

This is regarding the solution that you have provided above. I'm just copying the solution that u gave me for reference.

Code:

//STEP0100  EXEC  PGM=ICETOOL                                           
//TOOLMSG   DD SYSOUT=*                                                 
//DFSMSG    DD SYSOUT=*                                                 
//IN1       DD *                                                       
AAAAA     111222333                                                     
BBBBB     444                                                           
CCCCC     111                                                           
//IN2       DD *                                                       
AAAAA     111333                                                       
BBBBB     555                                                           
CCCCC     222                                                           
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)             
//T2        DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)             
//CON       DD DSN=&T1,DISP=OLD,VOL=REF=*.T1                           
//          DD DSN=&T2,DISP=OLD,VOL=REF=*.T2                           
//OUT       DD DSN=YOUR OUTPUT FILE,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(X,Y),RLSE)
//TOOLIN    DD *                                         
  COPY FROM(IN1) USING(CTL1)                               
  COPY FROM(IN2) USING(CTL2)                               
  SORT FROM(CON) USING(CTL3)                               
//CTL1CNTL  DD *                                         
  OUTFIL FNAMES=T1,OUTREC=(1,10,11,3,C'0001',/,           
                            1,10,14,3,C'0001',/,           
                            1,10,17,3,C'0001',/,           
                            1,10,20,3,C'0001',/,           
                            1,10,23,3,C'0001',/,           
                            1,10,26,3,C'0001',/,           
                            1,10,29,3,C'0001',/,           
                            1,10,32,3,C'0001',/,           
                            1,10,35,3,C'0001',/,           
                            1,10,38,3,C'0001')             
//CTL2CNTL  DD *                                         
  OUTFIL FNAMES=T2,OUTREC=(1,10,11,3,C'0002',/,           
                            1,10,14,3,C'0002',/,           
                            1,10,17,3,C'0002',/,           
                            1,10,20,3,C'0002',/,           
                            1,10,23,3,C'0002',/,           
                            1,10,26,3,C'0002',/,           
                            1,10,29,3,C'0002',/,           
                            1,10,32,3,C'0002',/,           
                            1,10,35,3,C'0002',/,           
                            1,10,38,3,C'0002')             
//CTL3CNTL  DD *                                         
  OPTION EQUALS                                           
  SORT FIELDS=(1,5,CH,A,11,3,CH,A)                         
  SUM FIELDS=(14,4,ZD)                                     
  OUTFIL FNAMES=OUT,INCLUDE=(14,4,ZD,EQ,1),OUTREC=(1,13)   
/*


The question that I have is that can we make the output look like the one shown below

Code:

Input 1:
AAAAA      111222333
BBBBB      444
DDDDD      555

Input2:
AAAAA     222
BBBBB     444
CCCCC     333

Current solution will write the output as shown below
AAAAA     111
AAAAA     333
CCCCC     555

Desired Output:
AAAAA     111333
CCCCC     555


Please help,
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12404
Topics: 75
Location: San Jose

PostPosted: Thu Apr 01, 2004 8:19 am    Post subject: Reply with quote

Phantom,

where is
Code:
CCCCC 555
record coming from the sample input you have shown? Shouldn't it be

Code:

DDDDD      555



Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Apr 01, 2004 8:46 am    Post subject: Reply with quote

You are correct Kolusu. Really sorry. what I gave was wrong...It should be DDDDD 555 as you said.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12404
Topics: 75
Location: San Jose

PostPosted: Thu Apr 01, 2004 9:13 am    Post subject: Reply with quote

Phantom,

It will be some work to get the results you want. I know that SPLICE operator of DFSORT will be handy in this case, but unfortunately none of our shops have DFSORT. If easytrieve is an option then I can code it for you.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Apr 01, 2004 9:22 am    Post subject: Reply with quote

Oh okay kolusu,

I just wanted to know whether this could be done via sort. The solutions that you and Frank provide have really impressed me. I want to learn more on SORT. I want to explore things...Thanks for all your help,
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12404
Topics: 75
Location: San Jose

PostPosted: Thu Apr 01, 2004 9:33 am    Post subject: Reply with quote

Phantom,

Just go thru the questions in the sort forum and you will learn a lot. The more you try to solve a question the more you learn.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group