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

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

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

Post by chanakya » Fri Aug 19, 2011 1:46 pm

fgdfg
Last edited by chanakya on Mon Oct 03, 2011 7:36 pm, edited 1 time in total.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Fri Aug 19, 2011 9:51 pm

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
/*
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

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Sun Aug 21, 2011 1:11 pm

ghjgh
Last edited by chanakya on Mon Oct 03, 2011 7:37 pm, edited 1 time in total.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Aug 21, 2011 1:23 pm

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 :(
Last edited by DikDude on Tue Aug 23, 2011 9:21 am, edited 1 time in total.
Have a good one

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Mon Aug 22, 2011 10:04 am

gdfgf
Last edited by chanakya on Mon Oct 03, 2011 7:39 pm, edited 1 time in total.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

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

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.
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

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Tue Aug 23, 2011 10:24 am

asdfsdf
Last edited by chanakya on Mon Oct 03, 2011 7:40 pm, edited 1 time in total.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Aug 24, 2011 12:50 am

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

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Wed Aug 24, 2011 12:51 pm

dshsd
Last edited by chanakya on Mon Oct 03, 2011 7:35 pm, edited 1 time in total.

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Wed Aug 24, 2011 2:19 pm

jkgh
Last edited by chanakya on Mon Oct 03, 2011 7:43 pm, edited 1 time in total.

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Wed Aug 24, 2011 4:00 pm

Will it support if Both the input files have close to 1 million records each ?

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Aug 24, 2011 10:03 pm

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'      
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
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Aug 24, 2011 10:05 pm

Will it support if Both the input files have close to 1 million records each ?
Yes.
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
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Aug 24, 2011 10:10 pm

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.
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

chanakya
Member
Posts: 21
Joined: Thu Aug 18, 2011 7:34 pm

Post by chanakya » Thu Aug 25, 2011 7:54 pm

gfhj
Last edited by chanakya on Mon Oct 03, 2011 7:44 pm, edited 1 time in total.

Post Reply

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



Other References
Mainframe Tools and others