I have a requirement where in I receive 6 files from upstream application into a GDG. I want to compare those all 6 version with one another to see any duplicates, i.e., it is a possibility that two or more files that came in may be duplicates (erroneously sent by upstream twice or multiple times). Could you please help on providing a solution using JCL or Cobol ?
how to compare multiple files using jcl
1.8k Views Asked by tanvi doiphode At
2
There are 2 best solutions below
0
Steve Ives
On
The best thing to do is to use the ISPF compare facility (ISPF 3.13 - SuperC or 3.13 - SuperCE) to compare the files but choose background execution rather than foreground. This will create a batch job which you can use as a template for steps to include in your job:
//SUPERC EXEC PGM=ISRSUPC,PARM=(DELTAL,LINECMP,' SEQ','')
//NEWDD DD DISP=SHR,DSN=new.dataset
//OLDDD DD DISP=SHR,DSN=old.dataset
//OUTDD DD SYSOUT=*
Bear in mind that ISPF compare only compares 2 files; to compare 6 you'll need 15 steps (I think).
If your site has PDSMAN, then you can use its PDSM37 module to generate a checksum for each datasets and a small REXX to easily compare the 6 checksums.
Related Questions in SORTING
- How to sort a multi-dimensional array by the second array in descending order?
- Ignore #VALUE! error in SORT function
- What is the code of the sorted function?
- Pull out first occurrences from array
- how to keep 10 biggest integer while reading a list in java?
- IQueryable<T> OrderBy<T> Extension Fails with Foreign Key Property
- Anagram test using C++ having compile time error
- How to sort a nested dictionary by the a nested value?
- sort through text file numerically by numbers in column
- Python elegant way to sort numerically named directories
- sorting all data on multiple pages by clicking on its header
- Sort oberservableArray by multiple parameters
- 2D array, sort rows by sum
- sorting RDD elements
- Less beautifier - format code
Related Questions in COBOL
- ODBC ISAM_EOF without any reason
- ANTLR 4 - How to reduce prediction time for IF statements with optional END-IF (COBOL grammar)
- Change display format from character mode to numeric mode
- How to implement SEPARATE island grammar in ANTLR4 with correct line numbers and char index?
- how to form fields section in xfd file
- I have a variable with PIC S9(4). Whether I use COMP or COMP-3 here?
- COBOL table structure and output
- MicroFocus cobol commands cobinit,cobcall and cobtidy are throwing errors in my C program
- COBOL: Read INPUT from SYSIN and store to variable
- Error in cobol program on linux selecting from table in postgresql database
- Priority of SonarQube Cobol Plugin Copy Directories
- How to print decimal points in cobol?
- Can I write more than one structure in file?
- When a sql returns more than one value, what value will be stored in the host variable
- Parser for signed overpunch values?
Related Questions in MAINFRAME
- difference between passing control to different program using return() and calling a program using xctl
- Getting output queue via FTP of a Mainframe (zOS)
- SELECT operator
- authentication between mainframe system and .net web service
- Register a copied application to registry
- I have a variable with PIC S9(4). Whether I use COMP or COMP-3 here?
- Converting a numeric to packed-decimal in Stored Procedure
- EBCDIC to ASCII not working Properly
- Send text file from Mainframe to IBM MQ
- Submit another JCL as a step from main JCL based on RC of the previous step {via Internal Reader}
- Accessing Mainframe datasets using FTP form Python
- Access a VSAM File from Rexx
- How to print decimal points in cobol?
- Procedure was expanded as instream procedure definition
- When a sql returns more than one value, what value will be stored in the host variable
Related Questions in JCL
- JCL IF statement on multiple lines
- Submit another JCL as a step from main JCL based on RC of the previous step {via Internal Reader}
- Procedure was expanded as instream procedure definition
- How to debug JCL
- How to convert IBM file to hexadecimal using DFSORT?
- creating a vsam file using jcl
- UNIDENTIFIED OPERATION FIELD Error in JCL
- Setting PATH in IEBGENER from file
- Generation Data Groups (GDG)
- How to do Delete/Define with using IDCAMS using batch JCL (z/VSE)
- Easytrieve A010 invalid file reference
- Lexing/Parsing "here" documents
- XML handling in REXX or JCL
- are //AMSDUMP DD and //SYSPRINT DD SYSOUT=A statements same?
- RECFM =FBA when i specifed RECFM=FB
Related Questions in SYNCSORT
- Need the last entry while using XSUM in SYNCSORT JCL
- How to get the unload result in Packed decimal format if the table column is in INTEGER formmat in the DB2 table?
- Syncsort - Write UNPAIRED records to SORTOUT file, and PAIRED records to PAIRED file
- Subtract days from date with SORT
- z/OS Syncsort: omit duplicates without sort
- How can we convert YYYYWWD format date into normal date format YYYY-MM-DD?
- How to remove these duplicates?
- How can I solve "WER046A SORT CAPACITY EXCEEDED" in SYNCSORT JCL
- Sort groups of records by data on the second record in a group
- JCL SYNCSORT: OMIT and INCLUDE are not interchangeable?
- Need help understanding RIGHT Padding in syncsort
- How to get the only records from input file, having written '7' on 5th position
- Getting wrong Count of the Combinations Between Two Fields of a File thru OUTFIL
- compare RECORDS from POSITION 1 to 5, of two VB flat files and write the matching records in 3rd file JCL
- How to copy only selected column of input file to output file in jcl sort
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If they are properly strucured datasets (they are not files) then they should have header records. All you need do is compare the first record of each dataset. You could use your sort product or use ISRSUPC in batch.
JCL cannot do this as JCL only tells the operating system what programs and resources are needed to do the task. So even a COBOL solution would require JCL.
And, finally, I believe you are talking about generations no versions. Versions relate to the numbering after the GxxxxV.