How to write a JCL using IEBCOMPR

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
IEBCOMPR

How to write a JCL using IEBCOMPR

Post by IEBCOMPR » Thu Mar 30, 2006 12:36 pm

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?

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

3.13

Post by arrbee » Thu Mar 30, 2006 1:39 pm

How about using ISPF option 3.13? It should be easier.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

sss_shashank12
Member
Posts: 4
Joined: Wed Mar 08, 2006 12:43 pm

Comparing files

Post by sss_shashank12 » Mon Apr 03, 2006 9:24 am

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

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

Post by arrbee » Mon Apr 03, 2006 10:27 am

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.........

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 ****************************
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.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

User avatar
rangab
Active Member
Posts: 56
Joined: Fri Mar 17, 2006 3:21 pm

Post by rangab » Mon Apr 03, 2006 12:23 pm

Shashank,

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
Courtesy: Ravi

HTH.
========
Ranga...:-0)
========
Learn Which You Don't Know - Teach Others Which They Don't Know.

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Feb 01, 2016 10:59 pm

<< Content deleted By Admin >>

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