I am having an issue with preparing a text file for one of our vendors. They are having problems reading the file; according to what I was told, the file must be in “80 byte wrapped format”. I believe they are using a mainframe system so I’m sure it has something to do with that.
When I created the file, I just used a simple StreamWriter with WriteLine() to do it, but if anyone has heard of this issue before, I could use some advice or a short code snippet on what I would need to do differently/add to accomdate their request.
Thanks for any help that you can provide.
That brings back memories (of COBOL, EDI and other uglyness).
That usually means that each “record” is terminated with an 0x0d+0x0a (CRLF) or 0xa (LF) on it’s own which translate to the following code:
Do not use writer.WriteLine. In the case of 80 byte wrapped format, it depends on the vendor. It usually means that “a record” should be max 80 bytes (inclusive of the CRLF chars) otherwise it’ll blow up the input buffer on the mainframe.
Hoever, I would approach the company and ask them to provide a specification of the format they require precisely so there is no ambiguity. They should be able to either provide this or point you to the relevant vendor’s documentation on the file format.
You will also probable require a specific encoding i.e. ASCII or EBCDIC if you are unlucky.