Quote:
Originally Posted by
SundarGampa
Is there a way to read the file and write it to a fixed length format.
Undoubtedly it can be done (Perl, for example, is often used for this type of application), but you would have to provide a detailed description of both file formats, the current and the desired.
For example, you mention that each record is preceded by its length but neglect to specify how the length is encoded. With regard to the output format, how should the fixed width be determined? Should it be equal to the longest record? Should it be some other value? If that value is insufficient to accommodate a record, should that record be truncated? How should records be padded? Should the output be newline terminated? Should the records be modified in any way, such as unpacking binary values?
Again, if you would like assistance, you will have to do a much more thorough job of describing the file formats and the conversion process.
If the file formats you're working with utilize some mainframe standard, a link that explains them would be invaluable for those who are not familiar with them but could otherwise assist.
Regards,
Alister