VB data has a 4 byte RDW at the begining of each record. You will have to consider this 4 byte RDW while creating your sort card.
Assuming the above SORT fields and INCLUDE cond are used for a FB file, change it as shown below to use it for a VB file:
Code:
SORT FIELDS=(5,15,CH,A)
INCLUDE COND=(21,5,EQ,C'H2004'),FORMAT=CH
Do note that in the SORT fields and INCLUDE cond the starting byte position has been changed from 1 to 5 and from 17 to 21 to accommodate the 4 byte RDW.
VB Files can both be sorted into... and sorted from, please do a search and you will find countless samples. Just be sure to manage appropiatedly the RDW, which is located in the first four bytes of each record. Also if you use the LIKE parm in your DD def, you are 'copying' an existing DCB, therefore if your 'Model' is not VB your resulting one won't be either. _________________ Best wishes,
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jan 16, 2006 11:07 am Post subject:
Andy,
For FB input, the first data byte is in position 1. For VB input, the first data byte is in position 5 - you have to add 4 bytes for the RDW in positions 1-4.
prakal wrote:
Quote:
Do note that in the SORT fields and INCLUDE cond the starting byte position has been changed from 1 to 5 and from 17 to 22 to accommodate the 4 byte RDW.
1+4 = 5 for SORT statement.
17+4 = 21 for INCLUDE statement (not 22).
I edited your post to correct the error. _________________ 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