Should text fields be padded with blanks and should numeric fields be padded with zeroes to their maximum length?

0
Posted

Should text fields be padded with blanks and should numeric fields be padded with zeroes to their maximum length?

0

No padding should occur. Although the record layouts list a maximum length that will be accepted, the submission is designed to be variable length. No text field should be blank- or space-padded on either the right or left, and the numeric fields should not be zero-padded to the left of a value. If this is done, it can cause your transfer rate to slow down. Even though the file to be transmitted is compressed, there is still space used to represent the blanks, spaces, and zeroes, and in a large data file, this additional space could be substantial enough to lengthen the transfer time. Also, if the fields to be encrypted have been blank-/space-padded then the encryption routine may fail (if the whole field is blank) or may not properly encrypt the value.