Need your help ....compare 2 files using ICETOOL and SPLICE
Moderators: Frank Yaeger, DikDude, Moderator Group
Need your help ....compare 2 files using ICETOOL and SPLICE
fgdfg
Last edited by chanakya on Mon Oct 03, 2011 7:36 pm, edited 1 time in total.
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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.Could you please help me to solve this issue?
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
/*
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Quite inconsiderate. . .You can refer Animesh Prasad's Informatin because I am working on same query. You will get SYSOUT information from his post.
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
Last edited by DikDude on Tue Aug 23, 2011 9:21 am, edited 1 time in total.
Have a good one
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Code: Select all
05/15/2011 KX010 INS 000004 8935201
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
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.You can refer Animesh Prasad's Informatin because I am working on same query. You will get SYSOUT information from his post.
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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)
/*
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
You can use: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'
Code: Select all
//SYMNAMES DD *
CRDATE,S'&LMON./&LDAY./&LYR4'
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Yes.Will it support if Both the input files have close to 1 million records each ?
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
You've changed your requirement so many times now that I don't know what you want any more.
I don't know what your question about Output file 1 to 4 is.
I've answered the date question above.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 don't know what your question about Output file 1 to 4 is.
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page