Eighty characters a line, and the blanks count.
AES commodity lines on the shipment, the AESTIR file written to the byte, and the ITN or the rejection read back onto the shipment through ACE WebLink.
A fixed-width file is not a text file with numbers in it.
There are no commas holding the fields apart. Column 41 is column 41, a value one place to the left is a different field entirely, and the file that results is not rejected — it is accepted, and it says something else.
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
CL00074407110120USCN000000012PCS000000045000000000122KGSLAX20260830
SR0001X20260830123456ACC202608301602PT The trailing blanks are part of the record
Both lines above run the full eighty characters. The second one is mostly spaces after column 38 and those spaces are not decoration — a reader counting fields will find them, and a file that stops early is a file that has lost its last fields rather than left them empty.
And the response comes back
When it is accepted, the ITN lands on the shipment. When it is rejected, the reason lands on the shipment, where the person who has to fix it will see it.
A rejection with nowhere to live is a rejection that gets forgotten
This is the ordinary shape of the failure. Someone forwards the rejection to the desk, the desk fixes it, and three weeks later nobody can say whether that shipment ever went out clean, because the only record of the problem was in a mailbox that belongs to one person.
So the rejection is a field on the shipment. It has a date, a reason and a line number, it exports with everything else, and it is visible to whoever opens the shipment next rather than whoever happened to be on the email.
Fixed width forgives nothing, so the code does the counting.
Seven hundred lines to write a text file sounds excessive until a one-character offset has been chased through a file that was accepted.
There is no delimiter to fall back on
In a CSV, a missing value shifts one row and the parser complains. In a fixed-width record, a value that is one column short pushes everything after it left, and the file still parses. The receiving system reads a valid record that means something nobody intended. Nothing errors, nothing bounces, and the mistake surfaces days later as a rejection whose reason points at the wrong field.
So padding is a decision, not a detail
Left-pad or right-pad, zero-fill or space-fill, truncate or refuse — each field has one right answer and the wrong one is invisible. That is what the seven hundred lines are: those answers, written down once, in one place, so that no screen anywhere gets to improvise a substitute.
Four things it will not do.
An export that was rejected makes a useful demonstration.
The commodity lines are built and the file written during the call, then opened so the columns can be counted. Forty-five minutes, on a demonstration company or on a copy of the forwarder’s own spreadsheet.