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
 

 

compare only on specific fields

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

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Wed Jun 29, 2011 2:13 pm    Post subject: compare only on specific fields
Reply with quote

The reqmt is to compare two 1200 bytes FB datasets.
compare positions :
1- 600
750 - 900
910-1200

Please help me to acheive this in sort. Thanks.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 29, 2011 3:37 pm    Post subject:
Reply with quote

1) I assume that you have SYNCSORT as you have posted in the JCL forum
2) Which release level is the product
3) What research have you performed yourself, and what errors did you receive
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Wed Jun 29, 2011 6:44 pm    Post subject: Reply to: compare only on specific fields
Reply with quote

ICETOOL also accepted in my shop.
Through fileaid compare utility(online) Iam able to perform.
I wanted to do it in the batch/jcl.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 29, 2011 7:08 pm    Post subject:
Reply with quote

You say ICETOOL, yet this may well be an alias for SYNCTOOL, so if you would care to post the output of a sample run of your SORT program we can be sure of what we are dealing with.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Wed Jun 29, 2011 7:54 pm    Post subject:
Reply with quote

radhakrishnan82,
What do you want to do after comparison? What do you intend to do if the fields match and what if they don't? Are you needing comparison report?

If possible, provide sample input and expected output.

Thanks,
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jun 29, 2011 8:25 pm    Post subject:
Reply with quote

Quote:
Through fileaid compare utility(online) Iam able to perform.
I wanted to do it in the batch/jcl.


The ISPF interface in File-Aid provides an option to run the comparison in batch - why not use this?

Garry.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jun 29, 2011 9:12 pm    Post subject:
Reply with quote

Garry wrote:
The ISPF interface in File-Aid provides an option to run the comparison in batch - why not use this?


the TS probably figured it was easier to get someone to supply him with the sort control cards,
instead of learning something new- via PF1, by the way.
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Wed Jun 29, 2011 11:22 pm    Post subject:
Reply with quote

Have you tried SuperCompare (ispf option 3.13) ? It can be run in batch. By using compare statements you can control what columns it compares. Below will compare just the columns you require.
Code:
CMPCOLM 1:600,750:900,910:1200
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Thu Jun 30, 2011 11:32 am    Post subject:
Reply with quote

Thanks for all solutions.

The intention is to put a comparison step in a scheduled batch process.
Based on comparison results, validation is done seperately for matching and unmatching file through a batch cobol db2 program.
The output file format for both matching and non-matching files are same.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 30, 2011 12:05 pm    Post subject:
Reply with quote

radhakrishnan82

You have been asked to provide output from your SORT utility so that the people who know the product can help you.

We do not ask for information just to give you something to do, so please go away and come back with the required information requested from ALL POSTERS
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Thu Jun 30, 2011 6:46 pm    Post subject:
Reply with quote

Below is jcl that will compare 2 files and set the condition code based on results:
Code:
//SUPERC  EXEC PGM=ISRSUPC,                 
//  PARM=(NOLISTL,LINECMP)                   
//NEWDD  DD DSN=?.FB1200.A,   
//          DISP=SHR                         
//OLDDD  DD DSN=?.FB1200.B,   
//          DISP=SHR                         
//SYSIN  DD *                               
 CMPCOLM 1:600,750:900,910:1200

RC=0 means they are the same. RC=1 means they are different. It does not produce any output therefore there is no SYSPRINT dd.
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 Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm
No new posts How to calculate an specific transact... lind sh CICS 2 Tue Sep 13, 2016 9:20 pm


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