Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
Posted: Tue Sep 28, 2004 11:58 am Post subject:
vivek,
The reversal of records is quite simple, but a starting the key from 1 fresh every time a key changes is a bit tricky. With DFSORT'S SPLICE operator it is quite easy to acheive the desired results. The latest version of syncsort also supports splice operator. check this link for the solution.
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Sep 28, 2004 12:24 pm Post subject:
Quote:
//SYSIN DD *
* CHOOSE CASEKEY,REC-TYPE, REC-COUNT, CASE STATUS DATE, CASE STATUS CODE
* REC STATUS CODE , CASE STATUS REASON CODE.
INREC FIELDS=(1,13,14,1,15,4,23,8,31,2,58,1,59,2)
That's can't be all of it - you're missing a SORT, MERGE or COPY statement. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Sep 28, 2004 2:26 pm Post subject:
When I ran the equivalent of your job with DFSORT, I got the two B records.
Post your //SYSOUT output. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
i ran the job several times changing sysin card.
1. without inrec.
2. moved include before sort fields line and it worked fine. then moved include back to original place and it worked now. i am not sure why it didnt work first time.
coming to earlier problem,
using sort how do i generate sequence number for a group of keys like.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 29, 2004 10:22 am Post subject:
The order in which you specify the INCLUDE and INREC statements doesn't matter. The INCLUDE statement is always processed BEFORE the INREC statement. See the following for details on the order in which DFSORT statements and parameters are processed:
I really don't understand what you're asking about the sequence numbers. Which field is the key? Which field is the sequence number you're talking about? Please explain in more detail what you're trying to do. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You can use TOTAL in the TRAILERx parameter of the OUTFIL statements. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
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