The problem IMHO is being addressed the wrong way here. Note:
1. The PIC for the last field has to accommodate the largest
possible length.
2. One needs a record code somewhere in the record indicating
the format of the record giving a clue to the length of the
last
field.
3. Failing that you can pre fill the last field with a character
that will never appear in the input record and then after
reading
the record search the field from left to right looking for
the
fill character. Ergo you know the record length and what
part of
the field contains data from the file.
That's how I used to do it. Maybe others have a better way?
Nick D.