‎2007 Dec 18 11:30 AM
Hi all,
I am trying to create a file on application server in legacy binary mode. I have specified the end of line as given below -
data : begin of fs1,
name(10),
cr_lf(2) type X value '000A',
end of fs1.
statement used to open the file -
Open dataset gname for output in legacy binary mode.
when I download the file as .txt and open it using notepad, the length of the record is 11 instead of 10. Whereas if the same file is opened in excel, the record length shown is 10. I guess notepad is treating the end of line (000A) as a separate character.
This is causing a problem during the file import in the legacy system. My application server OS is Unix.
I cannot use legacy text mode as the record length has to be same as the output structure (fs1) i.e. of length 10 irrespective of the length of the data present.
Can anyone tell me how to avoid the extra character appearing at the record end when the file is opened in notepad.
Thanks in advance.
Shoma
‎2007 Dec 18 11:56 AM
Hi,
Do you download it from application server(unix)?
Any how, You have declared FS1 with name of length 10 and cr_lf of lenght 2. But I think it has been taking first 10 chars as name and blank for cr_lf. And it will be displayed name as 10 length and cr_lf as 1 standard length and standard value.
check it once.
Regards,
Subbu
‎2007 Dec 18 3:21 PM
Yes..I do download the file from the application server (Unix).
Your assumption is correct. The file does contain record of 11 characters length instead of 10 due to crlf at the end. Because of this extra space, the legacy system identifies the record length as 11 and the file gets rejected during import.
I odnt want this extra space to appear at the record end when the file is saved as .txt and opened in notepad.
Shoma