in reply to MCP Format Data

Questions from the Gallery --
  1. Are the output records to be a fixed length (ie 94 characters)?
  2. Are the line terminations included in that length?
  3. Is there _anything_ funny about the encoding? You aren't trying to do ASCII in one side and EBCDIC out the other?

Assuming the answers are 'yes', 'yes', and 'no', then the logic runs like this pseudo code:

open input_file open output_file while (get-next-record) { rec_length = length(record) if (rec_length > 92) { Throw A Fit And Exit With An Error } else { record = " " x (92 - rec_length) . record ."crlf" write record to output_file } }
English Explaination --

Read each record in your input, pad it on the left to 92 characters, append your line termination, and write the resultant string to a new file. Repeat until done-enough.

----
I Go Back to Sleep, Now.

OGB