Compare two PS files

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

Post Reply
fero
Member
Posts: 1
Joined: Tue Jul 22, 2014 8:20 am

Compare two PS files

Post by fero » Tue Jul 22, 2014 8:35 am

Hi all,

I need to know the best way to compare two PS files for my regression testing of batch files. Here is my criteria

1. Both the files are not sorted.

2. The files are around 1500 rec length fixed or variable

3. I need the result to show where the actual difference is w.r.t fields, inserts, deletes, matches and unmatches.


Please suggest me the best way of achieving this. I tried IEBCOMPR with WORD option, SUPERCC. I need to know other good options esp the batch means of compare. I explored many posts here and would be thankful to anyone if they suggest the best approach!

:D

dhiraj
Member
Posts: 48
Joined: Tue May 06, 2014 11:22 am

Post by dhiraj » Thu Jul 24, 2014 3:16 pm

First You need to Sort both files using same key.
Then You can use FileAid Tool with "COMPARE file" option. there You can define different files(Inserted , Udated,deleted,match etc..)
Thanks,
--Dhiraj Mishra

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu Jul 24, 2014 8:49 pm

You do NOT want to sort anything! If the files are meant to match exactly then sorting them could hide a problem. The simplest way would be to use SUPERC. If they match then you do not have the problem of the limited display length of SUPERC. If they do not match then you can SUPERC them again (several times) restricting the columns to be matched.

You could also try the JOINKEYS facility of your sort product - the key would be the entire record length - and write out unmatching records.

Possibly use both - SUPERC to see if any differences and JOINKEYS to get the non-matching records if SUPERC finds differences.
Regards
Nic

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