My MAin concern is to write a JCL for comparing two PS files so that the common elements are present in a third PS file
Is this useful for the case of Pds Datasets also?
How to write a JCL using IEBCOMPR
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 4
- Joined: Wed Mar 08, 2006 12:43 pm
Comparing files
Hi
I wanted to know the strings which comes after the comparision. In 3.13 I will get the number of strings which are same.... But not the strings which are same....
Could you plz tell me a Jcl for the same so that I could get the strings which pass the comparision... i.e. which are same in two files
Thanks & Regards,
Shashank
I wanted to know the strings which comes after the comparision. In 3.13 I will get the number of strings which are same.... But not the strings which are same....
Could you plz tell me a Jcl for the same so that I could get the strings which pass the comparision... i.e. which are same in two files
Thanks & Regards,
Shashank
Shashank,
If I had to do the compare between two PDS members then I would open a member (MEMBER1) first and issue the below command:
" COMPARE YOUR.PDS.NAME(MEMBER2)"
and it will list all the compared and common lines online there itself.
Here is the example.........
At present, I am not getting an idea on how to achieve it using a JCL!! But, probably a REXX utility should help you. Sorry, I am not a REXX pro.
HTH.
If I had to do the compare between two PDS members then I would open a member (MEMBER1) first and issue the below command:
" COMPARE YOUR.PDS.NAME(MEMBER2)"
and it will list all the compared and common lines online there itself.
Here is the example.........
Code: Select all
1). Open your member (EX. SHASH01) in View or Edit mode.
2). The content of SHASH01 suppose:
EDIT XXXXX.XXXXXX.XXX(SHASH01) - 01.00 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
000002 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
000003 000000000000000000000000000000000000000000000000000000000000000000000000
000004 111111111111111111111111111111111111111111111111111111111111111111111111
****** **************************** Bottom of Data ****************************
3). The content of SHASH02 suppose:
EDIT XXXXX.XXXXXX.XXX(SHASH02) - 01.01 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
000002 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
000003 999999999999999999999999999999999999999999999999999999999999999999999999
000004 222222222222222222222222222222222222222222222222222222222222222222222222
****** **************************** Bottom of Data ****************************
4). Issue the command "COMPARE XXXXX.XXXXXX.XXX(SHASH02)" at Command ==> prompt.
5). This is how your compares would look like...
EDIT XXXXX.XXXXXX.XXX(SHASH01) - 01.00 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
000002 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
====== 999999999999999999999999999999999999999999999999999999999999999999999999
====== 222222222222222222222222222222222222222222222222222222222222222222222222
.OAAAA 000000000000000000000000000000000000000000000000000000000000000000000000
.OAAAB 111111111111111111111111111111111111111111111111111111111111111111111111
****** **************************** Bottom of Data ****************************
HTH.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)
Shashank,
Would you try this JCL?
Courtesy: Ravi
HTH.
Would you try this JCL?
Code: Select all
//STEP0001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SAVEDD DD SYSOUT=*
//IN DD *
12345 RAM
33333 SENTHIL
78888 VENU
// DD *
12345 RAM
21156 MAHESH
33333 SENTHIL
78900 PRAKASH
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,5,CH) FIRSTDUP
HTH.
========
Ranga...:-0)
========
Learn Which You Don't Know - Teach Others Which They Don't Know.
Ranga...:-0)
========
Learn Which You Don't Know - Teach Others Which They Don't Know.
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page