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
 

 

How to use DFSORT/ICETOOL for specific requirements

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

New User


Joined: 30 Nov 2006
Posts: 14
Location: Banglore

PostPosted: Thu Nov 30, 2006 12:47 pm    Post subject: How to use DFSORT/ICETOOL for specific requirements
Reply with quote

Hi,

I have a requirement. I have two input files. Both have keys in positions 1-2.
I need data if the keys for both files matches, the output file should have the matching key,remaining data in file1 and remaining data in file2.

File1
-----
A1 X1
B1 Y1
C1 Z1
C2 Z2

File2
-----
A1 X2
A2 X2
B1 Y2
A2 X2
C2 Z3


I want the output file as

Output
-------
A1 X1 X2
B1 Y1 Y2
C2 Z2 Z3

How to use DFSORT/ICETOOL to get the requirement done. I don't want to write a program.

I tried to merge the files into a single file and sort it.
I will get the corresponding duplicate records. but how to sort it to output file.
Back to top
View user's profile Send private message

subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Thu Nov 30, 2006 4:53 pm    Post subject: Re: How to use DFSORT/ICETOOL for specific requirements
Reply with quote

Hi,
Here is the solution you asked for
Code:

//STEP0100 EXEC PGM=ICETOOL
//*                         
//TOOLMSG  DD SYSOUT=*     
//DFSMSG   DD SYSOUT=*     
//IN1      DD *             
A1 X1                       
B1 Y1                       
C1 Z1                       
C2 Z2                       
/*                         
//IN2      DD *             
A1 X2                       
A2 X2                       
B1 Y2                                                                 
A2 X2                                                                 
C2 Z3                                                                 
/*                                                                   
//T1       DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
   COPY FROM(IN1) TO(T1) USING(CTL1)                                 
   SORT FROM(IN2) TO(T1) USING(CTL2)                                 
   SPLICE FROM(T1) TO(OUT) ON(1,2,CH) WITH(7,2)                       
//CTL1CNTL DD *                                                       
   OUTREC FIELDS=(1:1,2,4:4,2,6:5X)                                   
//CTL2CNTL DD *                                                       
   SORT FIELDS=(1,2,CH,A)                                             
   SUM FIELDS=NONE                                                   
   OUTREC FIELDS=(1:1,2,7:4,2)                                       
/*
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 DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Route a product's job to specific lpar vasanthz All Other Mainframe Topics 9 Thu Mar 02, 2017 2:22 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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