Well, there is some very useful and extensive DFSORT documentation. There is a Getting Started, Application Programming Guide and the Smart DFSORT Tricks.
This takes the current input record, before SORT but after any OMIT/INCLUDE, and makes a new record from it. The new record consists of positions 1,4, the RDW, from the original (this is mandatory for a VB, then DFSORT will adjust the record-length (first two bytes of the RDW) as necessary). A 7-digit sequence number is then included, which DFSORT will maintain. Then the rest of the variable-length record, from input position 5 to the end of the record, is placed after the sequence number.
The SORT then reverses the file by using the sequence number, in descending order.
The OUTREC BUILD then copies the RDW, and the original data from after the sequence number to position five on the record for output. It is now the equivalent of the original input record.
If the records were fixed-length, the sequence number would be added to the end of the record. This is not done for variable-length records, as that would make them fixed in length.
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