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
 

 

Comparex utility - COPYSPLIT option

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

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Mon Sep 01, 2008 10:53 am    Post subject: Comparex utility - COPYSPLIT option
Reply with quote

Can anyone help me with how to use Comparex utility with copysplit option ?


I want to compare 2 files of diff format but with same key in diff positions. I need 3 output dataset, one with common records & the other 2 with the different records ( present in file 1 & not in file 2 and vice versa).

i found COPYSPLIT option in COMPAREX online help tutorial, in which more output files like output datasets (SYSUT3A-SYSUT3E) are possible.

Couldnt find further info.. Can anyone help me ?
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Sep 01, 2008 11:22 am    Post subject:
Reply with quote

kothai,

You can achieve this using syncsort/dfsort. Do you have any of these products installed in your shop?

Thanks,
Arun
Back to top
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Mon Sep 01, 2008 11:24 am    Post subject:
Reply with quote

Hi,

yes, I have them installed.
Syncsort uses 2 -3 steps to acheive this isnt?
Is it possible in a single step ?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Sep 01, 2008 11:28 am    Post subject:
Reply with quote

Quote:
Is it possible in a single step ?

I think it's possible.
Can you post here the LRECL/RECFM of the input/output files, position of the key field and some sample records.

Thanks,
Arun
Back to top
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Mon Sep 01, 2008 11:35 am    Post subject:
Reply with quote

Hi Arun,

Thanks first of all for replying.

File 1 - FB - LrecL = 10 key (1,7)
File 2 - FB - LecL = 216 Key (207,7)

I need output datasets as

file 3 lecL = 216 Common records
File 4 lecl = 216 ( present in file 2 not in file 1)
File 5 LecL = 10 ( present in file 1 not in file 2)


Thanks ,
kothai. E
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Sep 01, 2008 12:04 pm    Post subject:
Reply with quote

Kothai,

If your shop has SYNCSORT FOR Z/OS 1.2 or above, you can try the below JCL.

Code:
//STEP1    EXEC PGM=SORT                                               
//SORTOUT  DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SORTJNF1 DD DSN=file-1 --------> FB,LRECL=10                         
//SORTJNF2 DD DSN=file-2 --------> FB,LRECL=216                       
//NOMATCH1 DD DSN=file-3 --------> FB,LRECL=10 (Non matching in file-1)
//NOMATCH2 DD DSN=file-4 --------> FB,LRECL=216(Non matching in file-2)
//MATCH    DD DSN=file-5 --------> FB,LRECL=216(Matching records)     
//SYSIN    DD *                                                       
  JOINKEYS FILE=F1,FIELDS=(1,7,A)                                     
  JOINKEYS FILE=F2,FIELDS=(207,7,A)                                   
  JOIN UNPAIRED                                                       
  REFORMAT FIELDS=(F1:1,10,F2:1,216),FILL=X'FF'                       
  SORT FIELDS=COPY                                                     
  OUTFIL FNAMES=NOMATCH1,INCLUDE=(11,1,BI,EQ,X'FF'),                   
         BUILD=(1,10)                                                 
  OUTFIL FNAMES=NOMATCH2,INCLUDE=(1,1,BI,EQ,X'FF'),                   
         BUILD=(11,216)                                               
  OUTFIL FNAMES=MATCH,SAVE,                                           
         BUILD=(11,216)       


If this does n't satisfy your requirement, you need to provide more inputs.

Thanks,
Arun
Back to top
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Mon Sep 01, 2008 12:08 pm    Post subject:
Reply with quote

Thanks for the response. I will try & let u know Arun
Back to top
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Mon Sep 01, 2008 1:28 pm    Post subject:
Reply with quote

Hi arun . I am getting


JOINKEYS FILE=F1,FIELDS=(1,7,A)
$
STATEMENT DEFINER ERROR
JOINKEYS FILE=F2,FIELDS=(207,7,A)
$
STATEMENT DEFINER ERROR
JOIN UNPAIRED
$
STATEMENT DEFINER ERROR


I couldnt proceed further as I am not able to follow the code.

Help if u find time
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Sep 01, 2008 2:00 pm    Post subject:
Reply with quote

kothai,

Can you post here the relevant error messages from your SYSOUT.

Thanks,
Arun
Back to top
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Mon Sep 01, 2008 2:19 pm    Post subject:
Reply with quote

STATEMENT DEFINER ERROR
REFORMAT FIELDS=(F1:1,10,F2:1,216),FILL=X'FF'
$
STATEMENT DEFINER ERROR
SORT FIELDS=COPY
OUTFIL FNAMES=NOMATCH1,INCLUDE=(11,1,BI,EQ,X'FF'),
BUILD=(1,10)
SORTIN NOT DEFINED
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Sep 01, 2008 2:40 pm    Post subject:
Reply with quote

Quote:
SORTIN NOT DEFINED

kothai,

As the message indicates, does your jcl have a SORTIN dd statement?
SYNCSORT messages start with WER. Do you have any such messages?

Post your entire sysout messages as well as the JCL you used using the "Code" tag given. After typing your message, use "Preview" to make sure everything's fine and then do a "Submit".

Thanks,
Arun
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 DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm


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