COMPARE 4 INPUT FILES AND WRITE OUTPUT



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

COMPARE 4 INPUT FILES AND WRITE OUTPUT

Postby jawaharsmg » Fri Apr 16, 2010 2:45 am

I NEED TO COMPARE 4 FILES

FILE 1

AAAAAAAA00000100
BBBBBBBB00000200
CCCCCCCC00000100
DDDDDDDD00000100

FILE 2

AAAAAAAA00000050
BBBBBBBB00000100
CCCCCCCC00000025

FILE 3

AAAAAAAA00000025
BBBBBBBB00000100
DDDDDDDD00000050

FILE 4

AAAAAAAA00000025
CCCCCCCC00000075
DDDDDDDD00000050


OUTPUT REQUIRED

AAAAAAAA 00000100 00000050 00000025 00000025
BBBBBBBB 00000200 00000100 00000100 00000000
CCCCCCCC 00000100 00000025 00000000 00000075
DDDDDDDD 00000100 00000000 00000050 00000050


request your help asap.

thanks
Jawahar
jawaharsmg
 
Posts: 16
Joined: Tue Feb 16, 2010 8:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COMPARE 4 INPUT FILES AND WRITE OUTPUT

 

Re: COMPARE 4 INPUT FILES AND WRITE OUTPUT

Postby Frank Yaeger » Fri Apr 16, 2010 3:03 am

Here's a DFSORT/ICETOOL job that will do what you asked for:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD *
AAAAAAAA00000100
BBBBBBBB00000200
CCCCCCCC00000100
DDDDDDDD00000100
//IN2 DD *
AAAAAAAA00000050
BBBBBBBB00000100
CCCCCCCC00000025
//IN3 DD *
AAAAAAAA00000025
BBBBBBBB00000100
DDDDDDDD00000050
//IN4 DD *
AAAAAAAA00000025
CCCCCCCC00000075
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
COPY FROM(IN3) TO(T1) USING(CTL3)
COPY FROM(IN4) TO(T1) USING(CTL4)
SPLICE FROM(T1) TO(OUT) ON(1,8,CH) WITHANY -
  WITH(10,8) WITH(19,8) WITH(28,8) WITH(37,8) USING(CTL5)
//CTL1CNTL DD *
  INREC BUILD=(1,8,10:9,8,80:X)
//CTL2CNTL DD *
  INREC BUILD=(1,8,19:9,8,80:X)
//CTL3CNTL DD *
  INREC BUILD=(1,8,28:9,8,80:X)
//CTL4CNTL DD *
  INREC BUILD=(1,8,37:9,8,80:X)
//CTL5CNTL DD *
  OUTFIL FNAMES=OUT,
    IFTHEN=(WHEN=(10,8,CH,EQ,C' '),OVERLAY=(10:8C'0'),HIT=NEXT),
    IFTHEN=(WHEN=(19,8,CH,EQ,C' '),OVERLAY=(19:8C'0'),HIT=NEXT),
    IFTHEN=(WHEN=(28,8,CH,EQ,C' '),OVERLAY=(28:8C'0'),HIT=NEXT),
    IFTHEN=(WHEN=(37,8,CH,EQ,C' '),OVERLAY=(37:8C'0'))
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: COMPARE 4 INPUT FILES AND WRITE OUTPUT

Postby jawaharsmg » Fri Apr 16, 2010 3:35 am

Thanks.. it worked exactly the way I wanted.

thank you very much.
jawaharsmg
 
Posts: 16
Joined: Tue Feb 16, 2010 8:47 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post