View previous topic :: View next topic
|
Author |
Message |
alakshmipathi
New User
Joined: 24 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
I have two input files for different LRECL..
File 1: Lrecl = 80
layout:
A1 A2 A3
----------
aa 2345 4567
bb 1111 1000
File 2: LRECL = 90
B1 B2 B3
----------
aa 1000 2000
cc 2000 3000
Output file should be:
-------------------------
field1 field2 field3
A1 A2+A3+B2 B3
that is for above example,
output would be:
aa 7912 2000
Is it possible to do this using SYNCTOOL??
all records in both the input files will be unique there not be any duplicates. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
alakshmipathi,
You can achieve this using the below SyncSort JOIN application.
Code: |
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN= Input-1
//SORTJNF2 DD DSN= Input-2
//SORTOUT DD DSN= Output file
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,2,A)
JOINKEYS FILE=F2,FIELDS=(1,2,A)
REFORMAT FIELDS=(F1:1,12,F2:3,10)
INREC FIELDS=(1,3,4,4,ZD,ADD,9,4,ZD,ADD,14,4,ZD,M11,LENGTH=4,18,5)
SORT FIELDS=COPY |
Note: I assumed the numeric field as a displayable-4 byte field as shown in your example. You might need to increase the LENGTH parameter value if you're expecting the sum to go beyond 4 digits. |
|
Back to top |
|
|
alakshmipathi
New User
Joined: 24 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
Arun,
Thanks for the solution. I'm aware of the join keys, but I'm interested to know whether there is any possibility using SYNCTOOL as here they want me to do using SYNCTOOL instead of Join keys. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
alakshmipathi wrote: |
any possibility using SYNCTOOL as here they want me to do using SYNCTOOL instead of Join keys. |
Really? First time heard on this forum to appraoch on such things from other way round . . . |
|
Back to top |
|
|
alakshmipathi
New User
Joined: 24 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
May be..
but Join keys take more CPU time when compared to CObol comparison, I just wanted to know there is any solution using SYNCTOOL that would take lesser time than Join keys. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
alakshmipathi wrote: |
but Join keys take more CPU time when compared to CObol comparison, I just wanted to know there is any solution using SYNCTOOL that would take lesser time than Join keys. |
I'd guess that SORT with JOINKEYS does just about what SYNCTOOL (if it can) does under the covers.....
I'm still waiting for a PDF documenting SYNCTOOL...... |
|
Back to top |
|
|
alakshmipathi
New User
Joined: 24 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
CICS Guy wrote: |
I'd guess that SORT with JOINKEYS does just about what SYNCTOOL (if it can) does under the covers..... |
I just want to confirm whether Synctool takes same time/ more / lesser time than Joinkeys. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
alakshmipathi wrote: |
I just want to confirm whether Synctool takes same time/ more / lesser time than Joinkeys. |
No matter how you do it, SORT/JOINKEYS, SYNCTOOL or COBOL, the inputs will each have to be sorted by the mutual keys....... |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I just want to confirm whether Synctool takes same time/ more / lesser time than Joinkeys. |
alakshmipathi,
I am not sure what you're trying to compare here. You can do the JOIN operation in SYNCTOOL also with exactly the same control card. Are you looking for a SYNCTOOL/SPLICE solution? |
|
Back to top |
|
|
alakshmipathi
New User
Joined: 24 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
yes Arun !!! |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Huh, Thanks for 'revealing' this at least now.
IMHO, your requirement might require multiple data passes if you go for a SYNCTOOL/SPLICE solution. I wonder why you have been asked to go for a SPLICE solution given that you already have SyncSort JOIN. I would suggest doing a volume test for both the approaches and convince your managers. |
|
Back to top |
|
|
alakshmipathi
New User
Joined: 24 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
let me check !! anyways thanks !! |
|
Back to top |
|
|
|