Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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: 2285
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: 2285
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: 2285
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: 2285
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 Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us