Can ne1 explain, in sorting a VSAM file into a VB length flat file,
position we give in SORT FIELDS is actual or it's POSition+4 ?
I want to sort VSAM file using it's first 8 bytes, into a new VBL flat file,
wat shud the values in SORT FILEDS ?
the result is same .. u provided RECORD TYPE or not
Not necessarily. It may be true in your case because of the way your job is coded (for example, if you specified RECFM=VB for SORTOUT), but you didn't show your complete job, so I gave you control statements that would assure your job worked correctly.
If you don't specify RECORD TYPE=V for a VSAM input file, then DFSORT uses a default record type of F or V depending on several factors as described here under TYPE:
So without RECORD TYPE=V, you may get the correct record type of V by default or you may not as indicated. With RECORD TYPE=V, you will always get the correct record type of V. And yes, with a record type of V, DFSORT prepends an RDW in positions 1-4, so the first data byte starts in position 5 which translates to adding +4 to the data position.