I am loading a flat file in an RPGLE program. The file will be downloaded to a server and converted to .txt and .dbf. The receipient, a benefits provider, states in the file specifications that their must be a carriage return/linefeed at the end of each record.
Can you provide some direction on how to do this.
Thank you for your time and information.
Software/Hardware used:
ASKED:
June 21, 2006 10:45 AM
UPDATED:
December 10, 2009 8:26 AM
It depends on how you transfer the file to the server. If that is a PC server you can use FTP to transfer the file and FTP will insert CR/LF in the end of each line (in ASCII mode). The problem with FTP is that it trims each line and removes trailing spaces. If that is a problem and the vendor requires fixed length records you can convert your file from EBCDIC to ASCII in RPG program and attach CR/LF (X’0D0A’ in EBCDIC) in the end of each line. Then you will have to FTP the file in binary (BIN) mode.
You also can use IBM Client Access file transfer. I don’t use it too often but I believe you can specify wheather you want to trim trailing spaces or not.
If you decide to traslate the file into ASCII I can send you a source of a little program that I wrote a while ago.
Hope it helps
Sergey
sevas@usa.net