guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
U can use following DFSORT statements:
Code: |
//SYSIN DD *
** Put special key of '1' in 81 for data records.
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1')),
** For header record, put special key of '0' in 81.
IFTHEN=(WHEN=(1,4,CH,EQ,C'HEDR'),
OVERLAY=(81:C'0')),
** Sort by special key ('0', '1') and then regular key.
SORT FIELDS=(81,1,CH,A,14,10,CH,A)
** Remove special key.
OUTREC BUILD=(1,80)
/* |
Here I assume that ur header record contain HEDR at first 4 bytes & key is at 14 the position & offset is of 10 bytes |
|