IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help with DFSORT/ ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Alice100

New User


Joined: 31 Aug 2010
Posts: 4
Location: Buffalo, NY

PostPosted: Tue Mar 08, 2011 12:51 am
Reply with quote

Hi!

I need help on using DFSORT / ICETOOL for merging 2 files .

This is what I need to get done :

File 1 - 280 bytes, FB. Some of the fields are in the EBCDIC format.

Key field 9 byte ( in position 23 through 31 )

Code:
   Command ===>                                                  Scroll ===> PAGE
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
11111111111111aaaaa   811111111     xx          ....%Bb                  .i.....
22222222222222aaaaa   822222222     xx          ....bbbbbbbb            .. ....
33333333333333aaaaa   833333333     xxx         .... 44444444444444aaaaa   844444444     xxx         .... 55555555555555aaaaa   855555555     xx          ....%bb                  .i.....
66666666666666aaaaa   866666666     xx          ....%


File 2 - 80 bytes, FB

Key filed 9 bytes ( in position 16 through 24 )

sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

Code:
 Command ===>                                                  Scroll ===> PAGE
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
66666666666666 811111111 10/11/1100 0 0 .Ìâî< ..â .  6 J   
77777777777777 822222222 10/10/1100 0 0 ..Á.ð ..Å..  6 D     
88888888888888 833333333 11/11/1100 0 0 .âË`% .ï.o.  0 C D 99999999999999 844444444 11/11/1100 0 0 ...À. .ñ.ø.  0 1   32243243434344 888888888 11/11/1100 0 0 ./... .lÏà.  0 1   64563456456345 899999999 11/11/1100 0 0 ..Øo% .oq..  0 1   


Expected results :

Record from File 1 ( 280 bytes ) , with updated field in position 1 through 14 from file 2, if the match between file 1 and file 2
is found on the key field .

Code:
   Command ===>                                                  Scroll ===> PAGE
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
66666666666666aaaaa   811111111     xx          ....%Bb                  .i.....
77777777777777aaaaa   822222222     xx          ....%88888888888888aaaaa   833333333     xxx         ....%99999999999999aaaaa   844444444     xxx         ....%55555555555555aaaaa   855555555     xx          ....%bb                  .i.....
66666666666666aaaaa   866666666     xx          ....%


This is how I started , but need help finishing it up :

Code:
//SEL3 EXEC PGM=ICETOOL                                           
//TOOLMSG DD SYSOUT=*                                             
//DFSMSG DD SYSOUT=*                                               
//IN1   DD DISP=SHR,DSN=FILE1       
//IN2   DD DISP=SHR,DSN=FILE2
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(10,10)),DISP=(MOD,PASS)   
//OUT DD DSN=FILE3,             
//           UNIT=SYSDA,                                           
//            DISP=(NEW,CATLG,DELETE),                             
//           SPACE=(CYL,(3000,3000),RLSE),                         
//            DCB=(LRECL=268,BLKSIZE=0)                           
//TOOLIN DD * *                                                   
COPY FROM(IN1) TO(T1) USING(CTL1)                                 
COPY FROM(IN2) TO(T1) USING(CTL1)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Mar 08, 2011 2:15 am
Reply with quote

Well, I suspect you'd want to use DFSORT's JOINKEYS function for this.

But I can't figure out what your records are supposed to look like since you seem to have some that aren't broken at the right place (e.g. are the 3s record and 4s record really in one record in file1 or in two records?).

If you want to learn about JOINKEYS, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174

If you need more specific help, you'll need to do a better job of showing your input records and expected output records, and explaining the "rules" for getting from input to output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top