As expat mentioned you can sort on the first 2 bytes of RDW if the input file is a VB File. If the file is FB then you need to convert to vb and strip off the trailing blanks and then sort.
However you output doesn't make sense. take a look at the 2 records below. Both records are of the same length and how did your output has 111 record end up at the bottom? Both records have a length of 21 bytes and the first 15 bytes are the same. For the 111 record the 16th byte is a space and the other record has P. Technically if you sort it ascending , the space record comes first followed by P record.