The input file FILEA doesnot contain any record with length more than 1063.
I ran the scenario you mentioned with DFSORT (no records longer than 1063 in FILEA) and got a RC=0.
The U0217 is associated with message ICE217A which you would get if FILEA did contain a record with a length of more than 1063 bytes. For example, when FILEA had a record with a length of 1064 bytes, I received this ICE217A message:
ICE217A 0 1064 BYTE VARIABLE RECORD IS LONGER THAN 1063 BYTE MAXIMUM FOR SORTOUT
I assume you received a similar message indicating that at least one of your records is longer than 1063 bytes. The LRECL for FILEB must be large enough to contain the longest record from FILEA.