Page 1 of 1

CPYTOIMPF?

Posted: Tue Sep 15, 2009 3:43 pm
by BillTW
Support,

I am using the CPYTOIMPF command to build a text file that can be sent to a CC company. The CC company uses a Unix based system. They requested the file I send them be in a PC ASCII format. I am using FTP over SSH to send the file.

I am using the following command to build the text file.

CPYTOIMPF FROMFILE(ISDIDCFDV5/IDCA4DP) TOSTMF('/dirname/filename') MBROPT(*REPLACE) STMFCODPAG(*PCASCII) RCDDLM('*LF') DTAFMT(*FIXED) STRDLM(*NONE) STRESCCHR(*NONE) RMVBLANK(*NONE) FLDDLM(',')

I expect them to get a Hex character for line feed at the end of each record. They say they are getting 0D0A, which is incorrect. I don't think this is a Linoma issue but I thought I would ask. Could the software be inserting the extra end of line character?

Thank you,

Bill

Re: CPYTOIMPF?

Posted: Tue Sep 15, 2009 5:35 pm
by Support_Duane
We can't really answer the question without seeing the files involved.

Please contact Support either by phone - (800)949-4696
or by e-mail - support@linomasoftware.com

Re: CPYTOIMPF?

Posted: Tue Sep 15, 2009 5:56 pm
by Support_Sai
The only thing that would convert LF (0A) to CRLF(0D0A) is if you are FTP'ing the file in ASCII format. The default transfer type under the FTP tasks is "auto", which sets the transfer type to ASCII or Binary based on the extension of the file. For example, if your TOSTMF file was named with an extension of ".txt", then the "auto" mode will choose ASCII transfer type. In order to prevent this from happening, edit the project, and change the transfer type to binary under the SFTP task -> Put sub-task. This ensures no data conversion no matter what and the file is sent as is to the remote server.

Hope this helps.

Re: CPYTOIMPF?

Posted: Tue Sep 15, 2009 6:42 pm
by BillTW
Support_Sai wrote:
The only thing that would convert LF (0A) to CRLF(0D0A) is if you are FTP'ing the file in ASCII format. The default transfer type under the FTP tasks is "auto", which sets the transfer type to ASCII or Binary based on the extension of the file. For example, if your TOSTMF file was named with an extension of ".txt", then the "auto" mode will choose ASCII transfer type. In order to prevent this from happening, edit the project, and change the transfer type to binary under the SFTP task -> Put sub-task. This ensures no data conversion no matter what and the file is sent as is to the remote server.

Hope this helps.
Sai,

That is good information. I checked the project and the Put sub-task is set to Binary mode. I will call support tomorrow.

Thank you,

Bill