Page 1 of 3

Need your help ....compare 2 files using ICETOOL and SPLICE

Posted: Fri Aug 19, 2011 1:46 pm
by chanakya
fgdfg

Posted: Fri Aug 19, 2011 9:51 pm
by Frank Yaeger
Could you please help me to solve this issue?
Not with the information you supplied. I suspect JOINKEYS would be a better choice here than SPLICE, but I'd need more information to show you how.

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

Code: Select all

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*

Posted: Sun Aug 21, 2011 1:11 pm
by chanakya
ghjgh

Posted: Sun Aug 21, 2011 1:23 pm
by DikDude
You can refer Animesh Prasad's Informatin because I am working on same query. You will get SYSOUT information from his post.
Quite inconsiderate. . .

Also, you spent more typing your "directive" than simply pasting the link to that topic in your reply or simply running the job and postng the output :(

Posted: Mon Aug 22, 2011 10:04 am
by chanakya
gdfgf

Posted: Mon Aug 22, 2011 11:03 pm
by Frank Yaeger

Code: Select all

05/15/2011 KX010 INS 000004 8935201 
You've shown me an output record, but not the input records that produce that output record. You say you want INS, UPD and DEL in the output records, but you've only shown an INS output record, not the others, and not the input records that produce each case.

So I'm still not clear what you're trying to do. I asked you for an example of your input records and expected output records, but you didn't supply it. I need to see what your records look like in each input file for each case you want to deal with and what the expected output should look like. I can't guess and shouldn't have to.

Your level of DFSORT supports JOINKEYS, so I suggest you read up on it and see if you can figure out how to do what you want yourself. Complete details of JOINKEYS can be found at:

http://www.ibm.com/support/docview.wss? ... g3T7000174
You can refer Animesh Prasad's Informatin because I am working on same query. You will get SYSOUT information from his post.
I have no idea where to find that information, but it would only help if it has examples of input and output, and/or a clearer explanation of what you're trying to do.

Posted: Tue Aug 23, 2011 10:24 am
by chanakya
asdfsdf

Posted: Wed Aug 24, 2011 12:50 am
by Frank Yaeger
You can use a DFSORT job like the following to do what you asked for (hopefully, I got the field positions right):

Code: Select all

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
CRDATE,'05/15/2011'
//IN1 DD DSN=...  Prior file
//IN2 DD DSN=...  Current file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//OUT3 DD DSN=...  output file3
//OUT4 DD DSN=...  output file4
//SYSIN DD *
  JOINKEYS F1=IN1,FIELDS=(19,12,A),SORTED
  JOINKEYS F2=IN2,FIELDS=(19,12,A),SORTED
  JOIN UNPAIRED,F1,F2
  REFORMAT FIELDS=(F1:1,222,F2:1,222,?)
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(445,1,CH,EQ,C'2'),
    BUILD=(CRDATE,223,11,C'INS',SEQNUM,6,ZD,253,192)
  OUTFIL FNAMES=OUT2,INCLUDE=(445,1,CH,EQ,C'1'),
    BUILD=(CRDATE,1,11,C'DEL',SEQNUM,6,ZD,31,192)
  OUTFIL FNAMES=OUT3,INCLUDE=(445,1,CH,EQ,C'B',AND,
    (31,192,BI,NE,253,192,BI)),
    BUILD=(CRDATE,1,11,C'UPD',SEQNUM,6,ZD,253,192)
  OUTFIL FNAMES=OUT4,INCLUDE=(445,1,CH,EQ,C'B',AND,
    (31,192,BI,EQ,253,192,BI)),
    BUILD=(CRDATE,1,11,25:SEQNUM,6,ZD,31,192)
/*

Posted: Wed Aug 24, 2011 12:51 pm
by chanakya
dshsd

Posted: Wed Aug 24, 2011 2:19 pm
by chanakya
jkgh

Posted: Wed Aug 24, 2011 4:00 pm
by chanakya
Will it support if Both the input files have close to 1 million records each ?

Posted: Wed Aug 24, 2011 10:03 pm
by Frank Yaeger
The system shoud take the date automatically on which comparison has happened.

For example, if comparison is done on 08/24/2011 then in output file, it should take the date as 08/24/2011 automatically. We should not hard code the value as below.

//SYMNAMES DD *
CRDATE,'05/15/2011'
You can use:

Code: Select all

//SYMNAMES DD *                    
CRDATE,S'&LMON./&LDAY./&LYR4'      

Posted: Wed Aug 24, 2011 10:05 pm
by Frank Yaeger
Will it support if Both the input files have close to 1 million records each ?
Yes.

Posted: Wed Aug 24, 2011 10:10 pm
by Frank Yaeger
You've changed your requirement so many times now that I don't know what you want any more.
Your code is working properly to create these 3 files.

Only I have a question for OUTput file1 to 4 as described in previous post. And date issue.
I've answered the date question above.

I don't know what your question about Output file 1 to 4 is.

Posted: Thu Aug 25, 2011 7:54 pm
by chanakya
gfhj