position 1,2 is the record identifier, for every record type of 10 there can be multiple (20,30,40) record for it.
text in yellow can be random. 10 is something like a header record for the group
sample OUTPUT:
--------------------
10xxxx111123456GHYTUKJJND...
20XXXX111123456AABB01...
30XXXX111123456AABB01...
40XXXX111123456AABB01....
20XXXX111123456BBCC02...
30XXXX111123456BBCC02...
40XXXX111123456BBCC02....
10xxxx222234567GHYTUKJJND...
20XXXX222234567AABB01...
30XXXX222234567AABB01...
40XXXX222234567AABB01....
20XXXX222234567CCDD02...
30XXXX222234567CCDD02...
40XXXX222234567CCDD02....
could be simple to u guys..but am not able to find the answer.
let know if above post is not clear or require further info..Thanks
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
subha m,
Your post is confusing at best. Please don't put colors and definitely Not yellow color.
From what I see is that your 10 record is at the bottom of 20,30,40 records and all you need is to bring it to the top as the first record? and leave the other records as is?
my system uses syncsort 1.3.0, this doesnt seem to support..this doesnt seem to support GROUP . sorry am away from system, will try to post the exact msg later
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Hello Subha,
As pointed above, the WHEN=GROUP function is supported by the latest release of SyncSort which is SyncSort for z/OS Release 1.3.2. You said a 'Group' ends with a '10' record. Does a 'Group' always start with a '20' record?
SYNCSORT FOR Z/OS 1.3.0.2R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSO
SORTPARM :
SYSIN :
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,16X,5)),
IFTHEN=(WHEN=GROUP,END=(21,2,ZD,EQ,10),PUSH=(5:ID=8,SEQ=8)),
*
IFTHEN=(WHEN=(21,2,ZD,EQ,10),OVERLAY=(13:8C'0'))
SORT FIELDS=(5,16,CH,A)
OUTREC BUILD=(1,4,21)
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
This is the error message i am getting.
Yes, the 20,30,40 always are written in that order, I only need to bring the '10' record to the beginning of the group
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Hi CG,
As per my understanding of the requirement, there are multiple '10' records and they should come at the beginning of each group. If we sort the data as such, all the '10' records will come at the top which is not what the TS wants.
sorry to come back with some more questions. but
WHEN=INIT executes before other conditions, but can u pls explain the
BUILD=(1,4,SEQNUM,8,ZD,16X,5)), in the below code
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
subha m,
16X - leaves 16 spaces starting at pos-13, which is later on used to place sequence numbers in the subsequent IFTHEN conditions. The sequence numbers are padded in the beginning in order to 'GROUP' records.
5- Places the data portion of the VB record which starts at pos-5, Since length of a VB record is variable, you need not mention the length information
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
BUILD=(1,4,SEQNUM,8,ZD,16X,5)
You don't need to specify the output position unless you need to place it explicitly at some position. Here the first 12 bytes are already occupied by the RDW and Sequence number, hence it's quite obvious that next output postion is 13. Do you have a SyncSort manual? If you dont have one, request one from SyncSort Support or Contact/Send a PM to Alissa Margulies(JCL Moderator). They'll help you in getting you one soon.