To compare two files (SSN fields)

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

vikasbs
Member
Posts: 8
Joined: Mon Apr 17, 2006 5:17 pm

To compare two files (SSN fields)

Post by vikasbs » Wed Apr 19, 2006 10:27 pm

Hi Frank

Thanks again ,but could you please give me in two step for example

STEP01

FILEA compares FILEC compares and gives FILED as output.

STEP02

FILEB compares with FILEC and gives FILEE as output.

Frank since i have a requirement to send FILED and FILEE as report it would be great if you could give me in two step.

Regards
Vikas

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 Apr 19, 2006 11:15 pm

I'm kind of confused now.

The last job I gave you creates four permanent data sets as follows:

FILEA - records in IN1, but not in IN2.
FILEB - records in IN2, but not in IN1.
FILED - records in FILEA, but not in FILEC.
FILEE - records in FILEB, but not in FILED.

Do you need FILEA, FILEB, FILED and FILEE to all be permanent data sets, or do you only need FILED and FILEE to be permanent data sets?

Why does your "requirement to send FILED and FILEE as report" mean you need multiple steps? My one step job creates FILED and FILEE as separate permanent data sets - you can do whatever you like with them in the same way you could do it if you used multiple steps. You could even change the OUTFIL statements for FILED and FILEE to do more processing (e.g. for reports). So what exactly are you going to do with these output files that requires extra steps?

If you really need multiple steps, wouldn't you need:

STEP01
Create FILEA and FILEB (do they need to permanent or can they be temporary?)

STEP02
FILEA compares FILEC compares and gives FILED as output.

STEP03
FILEB compares with FILEC and gives FILEE as output.
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

vikasbs
Member
Posts: 8
Joined: Mon Apr 17, 2006 5:17 pm

To compare two files (SSN fields)

Post by vikasbs » Tue Apr 25, 2006 7:11 pm

Hi Frank

Hope you are doing fine well the jcl is working fine and i am getting the desired result but i've a small doubt on this syntax.

COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(FILEA) ON(424,9,CH) WITH(433,1) -
USING(CTL3) KEEPNODUPS
COPY FROM(IN3) TO(T2) USING(CTL4)
SPLICE FROM(CON) TO(FILED) ON(424,9,CH) WITH(433,1) -
USING(CTL5) KEEPNODUPS

The question i have is when the icetool perfoms this syntax

COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)

could you please explain me does both the files from IN1 and IN2 gets copied to T1 .

Though i've understood the logic i would request you to please explain me the working of the entire code in words.

Regards
Vikas

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

Post by Frank Yaeger » Tue Apr 25, 2006 8:47 pm

could you please explain me does both the files from IN1 and IN2 gets copied to T1 .
Yes. First the IN1 records are copied to T1. Then the IN2 records are copied to T1 (after the IN2 records). Note that MOD is used on the T1 DD to allow that:

Code: Select all

//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(MOD,PASS) 
Though i've understood the logic i would request you to please explain me the working of the entire code in words.
See this Smart DFSORT Trick for an explanation:

http://www.ibm.com/servers/storage/supp ... 2.html#t05

For complete details on how the SPLICE operator of DFSORT's ICETOOL works, see:

http://publibz.boulder.ibm.com/cgi-bin/ ... 0222160456
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

abhishek.pradhan
Member
Posts: 11
Joined: Wed Nov 08, 2006 4:57 pm

need help:comparing two datasets

Post by abhishek.pradhan » Thu Nov 09, 2006 1:02 pm

Frank,

I have a similar requirment, but the LRECL for both the input files are different. for FILEA its 478 and for FILEB its 435.

Comparision Criteria:

The field is of length 14, but the position of the key in FILEA is col# 13th and in FILEB its on col# 23.

Now, I have to compare FILEA & FILEB and write FILEC with the records present only in file FILEA. (i.e. if the same record is also present in FILEB,eliminate this record from FILEC)

The FILEC should contain the full record present in the fileA

Pls advise.

Abhishek

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

Post by Frank Yaeger » Thu Nov 09, 2006 9:55 pm

You started a new Topic for this new question (a good idea) so let's discuss it there. I'm closing this thread.
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

Locked

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