Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Wed Nov 16, 2005 5:18 am Post subject:
DGM,
Using the traditional way of horizontal merging, the above requirements can be easily accomplished provided you have fixed number of records for a PO.
Code:
Maximum 10 unique changes can be done to a PO and Maximum of 15 changes can be done to same PO.
If the number varies from 1-10 unique entries & 1-15 rows for each unique entry, you need to have latest version of syncsort which supports SPLICE (ver 1.1 or 1.2).
Code a dummy sort job (PGM=SORT) and go to sysout and see what version of sort you have. The version is displayed in the first line of sysout.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Nov 16, 2005 9:13 am Post subject:
Quote:
Hi
I can use splice operator by SYNCTOOL. That works in my JCL. I have SYNCSORT 1.1 . But How can I get my desired output.
DGM,
It can be done but it would involve at least a minimum of 4 passes of the data. you need to assign seqnum to each record first and then re-format the record for splice to work.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue May 12, 2009 11:53 am Post subject:
Martin,
Solution for what? The original post is 3 and half years old. Moreover OP wanted a syncsort solution, I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort. _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
Posted: Fri May 15, 2009 6:21 am Post subject:
Hi Alissa,
Looking into the solutions, I have few questions in my mind:
1. Can you please explain me how exactly the duplicates records are coming as single record. Means The how the BUILD is happening in this case.
2. And what if the I don't know the possible number of duplicate records occurences.
The IFTHEN/BUILD statements are reformatting the records with embedded binary zeros at various positions dependant upon the SEQNUM value.
(In order to see exactly what is being done here, you can run the job without the OUTFIL statement.)
Once the records have been reformatted, the OUTFIL TRAILER3 will total or accumulate the data for each key into a single record. With NODETAIL specified, only these TRAILER records will be written out.
In order for this code to work, you need to know the maximum possible number of equally-keyed records. _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum