Maching file with ICETOOL



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

Maching file with ICETOOL

Postby pulcinella » Tue Apr 20, 2010 1:59 pm

Hello,

I want maching two files. This maching executed all days and compare the changes produced at two days (after day, before day)... Two files have been ordered and have the same key. The files have one only record by key

After day (16 position)

fieldAfterA have 4 position (the same value always is xxxx)
fieldAfterB have 8 position (the key)
fieldAfterC have 4 position

Before day (16 position)

fieldBeforeA have 4 position (the same value always is xxxx)
fieldBeforeB have 8 position (the key)
fieldBeforeC have 4 position

I want obtain a third file (OUTPUT) with 17 position

fieldoutputA have 4 position (the same value always is xxxx)
fieldoutputB have 8 position
fieldoutputC have 4 position
fieldoutputD have 1 position (values: A (new record), b (old record), m (modification record)

If fieldAfterB equal to fieldBeforeB, I must be compare fieldAfterC with fieldBeforeC. If not the same, I must write OUTPUT file with the after day record and the value 'M' at field fieldoutputD

If fieldAfterB greather than fieldBeforeB, I write OUTPUT file with the after day record and the value 'A' at field fieldoutputD

If fieldAfterB less than fieldBeforeB, I write OUTPUT file with the before day record and the value 'B' at field fieldoutputD

Thanks
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Maching file with ICETOOL

Postby Frank Yaeger » Tue Apr 20, 2010 10:29 pm

Please show a better example of input records and expected output records, with actual values, covering all cases.

What is the RECFM and LRECL of the input files?

Please run the following DFSORT job and show the //SYSOUT messages so we can see what level of DFSORT you're at:

//S1    EXEC  PGM=SORT           
//SYSOUT    DD  SYSOUT=*         
//SORTIN DD *                     
RECORD                           
//SORTOUT DD DUMMY               
//SYSIN    DD    *               
    OPTION COPY                   
/*     
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: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Maching file with ICETOOL

Postby pulcinella » Wed Apr 21, 2010 11:56 am

Sorry Frank,

RECFM = FB, LRECL = 16 (Input files); LRECL = 17 (Output files)

Afterday file

xxxx000000010001
xxxx000000020004
xxxx000000040006
xxxx000000050006
xxxx000000090006
xxxx000000100001
xxxx000000110001

Beforeday file

xxxx000000010001
xxxx000000020005
xxxx000000030006
xxxx000000050006
xxxx000000090006
xxxx000000100001
xxxx000000110001

Output file

xxxx000000020004M (the record today has been modified respect before day. Write the record after with 'M')
xxxx000000030006B (the record before not exist today. Write the record before after 'B')
xxxx000000040006A (the record today is new. Write the record after with 'A')


The sysout with your sentence is:

BLOCKSET COPY TECHNIQUE SELECTED
VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
- CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 08:06 ON WED APR 21, 2010
OPTION COPY
RECORD TYPE IS F - DATA STARTS IN POSITION 1
C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE E5-K44563 E7-K44563
ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
JOBEX001.S1 . , INPUT LRECL = 16, BLKSIZE = 27984, TYPE = FB
MAIN STORAGE = (MAX,6291456,6286430)
MAIN STORAGE ABOVE 16MB = (6220190,6220190)
OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VS
OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,ERET=ABEND,MS
OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=
OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y
OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDD
OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE
OPTIONS: NULLOUT=RC0
BSAM ACCESS METHOD USED FOR SORTOUT
EXCP ACCESS METHOD USED FOR SORTIN
EF-K10929 F0-K49037 E8-K44563
OUTPUT LRECL = 16, BLKSIZE = 27984, TYPE = FB
INSERT 0, DELETE 0
RECORDS - IN: 1825638, OUT: 1825638
END OF DFSORT
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Maching file with ICETOOL

Postby skolusu » Wed Apr 21, 2010 9:19 pm

pulcinella,

*sigh* we wanted to see the sysout with message numbers on the left like show below . The message we are interested to see is ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1


ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                       
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, E
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 08:15
            SORT FIELDS=COPY                                         
            INREC FINDREP=(INOUT=(X'25',X'40'))                       
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1               
ICE751I 0 C5-K51706 C6-K51706 C7-K54602 C8-K51706 E9-K51706 C9-BASE   
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SE
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)                       
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6165214,6165214)                 
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,
ICE129I 0 OPTIONS: VIO=N,RESDNT=NONE,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIF
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTR
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,C
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLO
ICE235I 0 OPTIONS: NULLOUT=RC0                                       
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT                         
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN                         
ICE751I 1 EF-K49534 F0-K49037 E8-K51706                               
ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB                 
ICE055I 0 INSERT 0, DELETE 0                                         
ICE054I 0 RECORDS - IN: 3, OUT: 3                                     
ICE052I 0 END OF DFSORT                                               
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Maching file with ICETOOL

Postby pulcinella » Wed Apr 21, 2010 10:01 pm

Excuse me... It's is:

ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 18:29 ON WED APR
OPTION COPY
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE E5-K44563
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 PROCES01.STEP010 . , INPUT LRECL = 16, BLKSIZE = 27984, TYPE =
ICE093I 0 MAIN STORAGE = (MAX,6291456,6286430)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6220190,6220190)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN
ICE751I 1 EF-K10929 F0-K49037 E8-K44563
ICE090I 0 OUTPUT LRECL = 16, BLKSIZE = 27984, TYPE = FB
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 1825638, OUT: 1825638
ICE052I 0 END OF DFSORT
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Maching file with ICETOOL

Postby skolusu » Thu Apr 22, 2010 1:06 am

Pulcinella,

Use the following DFSORT JCL. I assumed that neither file has duplicates on the composite key ( pos 5 for 8 bytes + pos 13 for 4 bytes)

//STEP0100 EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD *                                                     
//SORTOUT  DD DSN=&&HDR,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)         
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                 
  OUTFIL REMOVECC,NODETAIL,BUILD=(16X),HEADER1=(C'$$$')             
//*                                                                 
//STEP0200 EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=&&HDR,DISP=SHR,VOL=REF=*.STEP0100.SORTOUT         
//         DD DSN=your Afterday file,DISP=SHR
//         DD DSN=&&HDR,DISP=SHR,VOL=REF=*.STEP0100.SORTOUT         
//         DD DSN=your Beforeday file,DISP=SHR
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(17:C'1')),                       
  IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'$$$'),PUSH=(18:ID=1))       
  SORT FIELDS=(5,12,CH,A),EQUALS                                   
  SUM FIELDS=(17,1,ZD)                                             
                                                                   
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(20:SEQNUM,8,ZD,RESTART=(5,8))),
  IFTHEN=(WHEN=GROUP,BEGIN=(20,8,ZD,EQ,1),PUSH=(19:18,1,28:13,4)), 
  IFTHEN=(WHEN=(18,2,ZD,EQ,11),OVERLAY=(32:C'A')),                 
  IFTHEN=(WHEN=(18,2,ZD,EQ,21),OVERLAY=(13:28,4,32:C'M')),         
  IFTHEN=(WHEN=(18,2,ZD,EQ,22),OVERLAY=(32:C'B'))                   
                                                                   
  OUTFIL OMIT=(17,1,ZD,EQ,2),BUILD=(17X),                           
  REMOVECC,NODETAIL,SECTIONS=(5,12,TRAILER3=(1,16,32,1))           
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Maching file with ICETOOL

Postby pulcinella » Fri Apr 23, 2010 11:48 am

Skolosu,

thanks for your answer but i have a problem... When I executed I obtain this:

INPUT file 1 (after)

.......
xxxx027445130443
xxxx027445260003
xxxx027445550091
xxxx027445710148
xxxx027446100443
xxxx027446230026
xxxx027446490054
xxxx027446520154
xxxx027447750443
xxxx027448270154
xxxx027448690037
xxxx027448720443
xxxx027448980037
xxxx027449080443
xxxx027449240074
......

INPUT file2 (before)

...........
xxxx027445260003
xxxx027445550091
xxxx027445710148
xxxx027446100443
xxxx027446230026
xxxx027446490054
xxxx027446520052
xxxx027447750443
xxxx027448270154
xxxx027448690037
xxxx027448720443
xxxx027448980037
xxxx027449080443
xxxx027449240074
............

OUTPUT file

xxxx001644700077M
xxxx007429990005M
xxxx027446520052B
xxxx027446520154
xxxx056949160128M
xxxx065226210041B
xxxx099726340056B
xxxx099726340116

How you can see I have two records duplicate: (xxxx027446520052B, xxxx027446520154),
(xxxx099726340056B, xxxx099726340116). The correct would be xxxx027446520154M and xxxx099726340116M.

What's wrong?... I copy the execution:

SYSOUT STEP0100

ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 07:52 ON FRI APR
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,BUILD=(16X),HEADER1=(C'$$$')
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE E5-K44563
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 PEAIBG99.STEP100 . , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6262784)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200910,6200910)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=2097152,SOLRF=Y,VLLONG=N
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 22528, ABOVE 16M = 2124800
ICE210I 0 SORTOUT : EXCP USED, LRECL = 16, BLKSIZE = 27984, TYPE = FB (SDB)
ICE751I 1 EF-K10929 CB-K90013 F0-K49037 E8-K44563
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 0, OUT: 0
ICE227I 0 SORTOUT : DELETED = 0, REPORT = 1, DATA = 0
ICE228I 0 SORTOUT : TOTAL IN = 0, TOTAL OUT = 1
ICE174I 0 NO DATA RECORDS FOR AN OUTFIL DATA SET - RC=0
ICE052I 0 END OF DFSORT

SYSOUT STEP0200

ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 07:55 ON FRI APR
INREC IFTHEN=(WHEN=INIT,OVERLAY=(17:C'1')),
IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'$$$'),PUSH=(18:ID=1))
SORT FIELDS=(5,12,CH,A),EQUALS
SUM FIELDS=(17,1,ZD)

OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(20:SEQNUM,8,ZD,RESTART=(5,8))),
IFTHEN=(WHEN=GROUP,BEGIN=(20,8,ZD,EQ,1),PUSH=(19:18,1,28:13,4)),
IFTHEN=(WHEN=(18,2,ZD,EQ,11),OVERLAY=(32:C'A')),
IFTHEN=(WHEN=(18,2,ZD,EQ,21),OVERLAY=(13:28,4,32:C'M')),
IFTHEN=(WHEN=(18,2,ZD,EQ,22),OVERLAY=(32:C'B'))

OUTFIL OMIT=(17,1,ZD,EQ,2),BUILD=(17X),
REMOVECC,NODETAIL,SECTIONS=(5,12,TRAILER3=(1,16,32,1))
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE E5-K44563
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 1 EXECUB01.STEP200 . , INPUT LRECL = 16, BLKSIZE = 27984, TYPE =
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6215824,6215824)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=Y,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=2097152,SOLRF=Y,VLLONG=N
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN
ICE750I 0 DC 58486560 TC 0 CS DSVNN KSZ 16 VSZ 16
ICE752I 0 FSZ=3655410 RC IGN=0 E AVG=24 0 WSP=113946 C DYN=552 53216
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 22528, ABOVE 16M = 2124800
ICE210I 0 SORTOUT : EXCP USED, LRECL = 17, BLKSIZE = 27982, TYPE = FB
ICE751I 1 DE-K24705 D5-K24705 D3-K24705 D7-K24705 CB-K90013 E8-K44563
ICE055I 0 INSERT 0, DELETE 1825615
ICE054I 0 RECORDS - IN: 3651570, OUT: 1825955
ICE227I 0 SORTOUT : DELETED = 1825955, REPORT = 327, DATA = 0
ICE228I 0 SORTOUT : TOTAL IN = 1825955, TOTAL OUT = 327
ICE174I 0 NO DATA RECORDS FOR AN OUTFIL DATA SET - RC=0
ICE134I 0 NUMBER OF BYTES SORTED: 58425120
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 585 , TRACKS USED: 0
ICE199I 0 MEMORY OBJECT STORAGE USED = 0M BYTES
ICE180I 0 HIPERSPACE STORAGE USED = 85800K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
ICE052I 0 END OF DFSORT
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Maching file with ICETOOL

Postby skolusu » Sat Apr 24, 2010 3:21 am

Pulcinella,

I already mentioned in my posting that I am not expecting any duplicates on the composite key. Also your posted input and output doesn't match .

pulcinella wrote:How you can see I have two records duplicate: (xxxx027446520052B, xxxx027446520154),
(xxxx099726340056B, xxxx099726340116). The correct would be xxxx027446520154M and xxxx099726340116M.


In the latest input I don't see a single record with key xxxx099726340116. How did you get this in the output? However I added 1 more condition to counter the sequence of records if the before file has a lower value on the second key. Use these control cards

//SYSIN    DD *                                                       
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(17:C'1')),                         
  IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'$$$'),PUSH=(18:ID=1))         
  SORT FIELDS=(5,12,CH,A),EQUALS                                     
  SUM FIELDS=(17,1,ZD)                                               
                                                                     
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(20:SEQNUM,8,ZD,RESTART=(5,8))),   
  IFTHEN=(WHEN=GROUP,BEGIN=(20,8,ZD,EQ,1),PUSH=(19:18,1,28:13,4)),   
  IFTHEN=(WHEN=(18,2,ZD,EQ,11),OVERLAY=(32:C'A')),                   
  IFTHEN=(WHEN=(18,2,ZD,EQ,12),OVERLAY=(32:C'M')),                   
  IFTHEN=(WHEN=(18,2,ZD,EQ,21),OVERLAY=(13:28,4,32:C'M')),           
  IFTHEN=(WHEN=(18,2,ZD,EQ,22),OVERLAY=(32:C'B'))                     
  OUTFIL OMIT=(17,1,ZD,EQ,2),BUILD=(17X),           
  REMOVECC,NODETAIL,SECTIONS=(5,8,TRAILER3=(1,16,32,1))               
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Maching file with ICETOOL

Postby pulcinella » Sun Apr 25, 2010 12:39 am

Skolosu,

Great! thanks for your help... Seems to work.

When I Asked me if there was duplicate keys, I have that not... The input file1 has not duplicate keys and the input file2 nor has duplicate... But If you compare both files, there is records that can be equal the key. I want compare the key of both files (5-8 position) to see if the last positions (9-13) has changed...

If you say me that you don't see a single record xxxx099726340116 is because I don't copy the 1.825.955 record that the input file... The example is the record xxxx027446520052B, xxxx027446520154. I expected to find an only record in output file: xxxx02744650154M because the last 4 position has changed (before: xxxx027446520052, after: xxxx027446520154)
I don't undertand why there is records that only have 'M' and others record have 'B' and 'M'.

Maybe I wrong the question because I think that really only want the record's that are new ('A') and the records that have modified ('M')... Excuse me!... I think that I can make an OUTREC step to delete the record's that have a 'B' because no sense that I have 'B' and 'M' records... Anyway Could me help for obtain only the 'A' and 'M' records? Thank you very much
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Maching file with ICETOOL

Postby skolusu » Tue Apr 27, 2010 4:12 am

pulcinella wrote:Maybe I wrong the question because I think that really only want the record's that are new ('A') and the records that have modified ('M')... Excuse me!... I think that I can make an OUTREC step to delete the record's that have a 'B' because no sense that I have 'B' and 'M' records... Anyway Could me help for obtain only the 'A' and 'M' records? Thank you very much


Pulicnella,

I am not really sure what you really want in here . Take the following example data.

AFTER DAY FILE :
       KEY    ID   COMMENT                                     
---- ------- ----  --------                                     
XXXX 1111111 0001  MATCH KEY AND ID - NO CHANGE - DROPPED       
XXXX 2222222 0002  EXISTS ONLY IN AFTERDAY FILE - A INDICATOR   
XXXX 3333333 0003  MATCH KEY AND ID CHANGED     - M INDICATOR   


BEFORE DAY FILE :
         
                                                               
       KEY    ID   COMMENT                                     
---- ------- ----  --------                                   
XXXX 1111111 0001  MATCH KEY AND ID - NO CHANGE  - DROPPED     
XXXX 3333333 0005  MATCH KEY AND ID CHANGED      - M INDICATOR
XXXX 4444444 0004  EXISTS ONLY IN BEFOREDAY FILE - B INDICATOR


From your requirements I gathered that your output should be as follows

Key 11111111 should be eliminated because it has the same key and id in both files
Key 2222222 should be flagged A as it only found in AFTER DAY file
Key 3333333 should be flagged M as the key matches but the ID is different
Key 4444444 should be flagged B as it only found in BEFORE DAY file

the final output should be as follows
OUTPUT FILE :
             
       KEY    ID   FLAG     
---- ------- ----  --------
XXXX 2222222 0002  A       
XXXX 3333333 0005  M       
XXXX 4444444 0005  B       


is that what you want? or you don't account for B records?
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post