Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Comparison of 2 Files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Mon Oct 08, 2012 7:11 pm    Post subject: Comparison of 2 Files
Reply with quote

Hi,
I wanted to know if the following requirement can be sufficed through JCL - DFSORT.
I have to compare 2 files - Current file and the prior version file and find out if the records mismatch for a particular person.
So, my prior File may have the following records for a particular person:
B630101REC....(Identification record)
B631601REC....(some data)
B631602REC....(some data)
B631701REC....(some data)
B631702REC....(some data)
B631703REC....(some data)
B631801REC....(some data)

My current file reads like this for the same person:
B630101REC....(Identification record)
B631601REC....(some data)
B631701REC....(some data)
B631702REC....(some data)
B631801REC....(some data)

Now, if there is any mismatch between the prior file and the current file record for a person then I need to take the entire record of the person from the current file and then write it into the 3rd file. I can do this through a program but I am wondering if DFSORT can identify the mismatches and collectively write the records into a separate file.

Please let me know if you have any questions. Thanks in advance!! icon_biggrin.gif
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Oct 08, 2012 11:55 pm    Post subject:
Reply with quote

rahuindo,

It is definitely do-able with DFSORT JOINKEYS. You need to provide more details

1.What is the LRECL and RECFM of file1
2.What is the LRECL and RECFM of file2
3. What is the significance of Identification record?
4. What is the desired output?
5. Run the following JCL and show us the complete sysout, so that we can determine the level of DFSORT you running.
Code:

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *           
//SORTOUT  DD SYSOUT=*     
//SYSIN    DD *           
  SORT FIELDS=COPY         
//*
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Tue Oct 09, 2012 1:06 am    Post subject: Reply to: Comparison of 2 Files
Reply with quote

Hi Skolusu,
Thanks for the info. Let me learn more about JOINKEYS. Meanwhile, please find the info below:
Quote:

1.What is the LRECL and RECFM of file1
2.What is the LRECL and RECFM of file2

==> The RECFM and LRECL for File 1 and File2 will remain the same.

Quote:

3. What is the significance of Identification record?

==> The identification record has information for a identification details for a particular person like Name, ID# etc. The rest of records contain specific information for that ID#. So, it will always be there for each person. Additionally, each record will begin with the ID#.

Quote:

4. What is the desired output?

The desired output is to actually find if there is any information which has changed for a person. So, if there is any difference in any of the record for a ID#, then all the records of that person has to be written in the File# 3.

Quote:

5. Run the following JCL and show us the complete sysout, so that we can determine the level of DFSORT you running.

I ran the SYSOUT and here is the output from SYSOUT:
Code:

1 SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 20
SYSIN :                                                                 
  SORT FIELDS=COPY                                                     
WER276B  SYSDIAG= 164151, 2524723, 2524723, 4820100                     
WER415I  DSM FACILITY ACTIVE:  STORAGE ADJUSTED BY 0 BYTES             
WER164B  9,052K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER164B     0 BYTES RESERVE REQUESTED, 272K BYTES USED                 
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                         
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80           
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80           
WER410B  7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B     0 BYTES RESERVE REQUESTED, 156K BYTES USED                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                           
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           
WER416B  BSAM WAS USED FOR SORTIN                                       
WER416B  BSAM WAS USED FOR SORTOUT                                     
WER054I  RCD IN          0, OUT          0                             
WER169I  RELEASE 1.3 BATCH 0506 TPF LEVEL 2.1                           
WER052I  END SYNCSORT - UTSPUFI,STEP0100,,DIAG=A800,62CA,80AE,004C,E052,



Let me know if you need any additional details. Thanks in advance.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Tue Oct 09, 2012 1:31 am    Post subject:
Reply with quote

Quote:
Quote:

1.What is the LRECL and RECFM of file1
2.What is the LRECL and RECFM of file2

==> The RECFM and LRECL for File 1 and File2 will remain the same.

that's handy to know.

you are a syncsort user,
and Kolusu is a DFSORT developer.

this thread will be moved to JCL forum.
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Tue Oct 09, 2012 1:40 am    Post subject: Reply to: Comparison of 2 Files
Reply with quote

An update: I tried an example on the JOINKEYS and found that it works in here. Let me give a try on how it will work in my scenario and then I will post the updates on my progress.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 09, 2012 8:17 am    Post subject:
Reply with quote

Hello,

If there are any "surprises" when you test, be aware that your system is Not running the current release of Syncsort.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us