FTP issues between mainframe and UNIX

Hi All,
The issue is that, we have a dataset in mianframe whose record length is 153 characters. And a batch job ftpies it to the unix server(SunOS) as a test file. But the ftpied file in unix does not have a record length of 153 chars. Each record of 153 chars gets splited into two line of 105 chars and 48 chars respectively. i ftpied the file to my local desktop and it got ftpied perfectly each line had 153 chars. so the issue happends when we ftp the file to unix alone. So when we ftp to unix server alone somehow a new line char is getting inserted after the 105th char.I am not sure why!!. So is it a limit or constraint in unix to have a max of 105 as record length for a flat file? is there a way to make it 153 chars?

HI Hareesh,

could you please send some lines of that file (153 characters) you are trying to ftpies to the unix.

Regards,
Sanjay

I am trying to ftp a dataset that looks like this in mainframes

but i get it as

that is all data after column 105 comes in a new line...

HI Harees,
can you please check the file in that server(sunso) by using the command

cat -n file name and tell me what you are geting.

there is no such limit for the record i think in unix ...

Hi Sanjay,
Please find the result of the command below

it shoudt have been

I am also puzzled as to where the things are going wrong. :frowning:

hope the (..R11..) text is creating newline so you are getting the line split in your coresponding sunso server.

and mark one thing by seeing the length of the 7th line in your output file in sunso which is different that the length of other lines(1,3,5).

but the lines start spliting just after R11 text

regards,
Sanjay

are you copying in binary mode?

There is probably a line-feed character just after "R11". This is the unix text file record terminator. Suggest getting the file format corrected such that it is suitable for a text file.

i Finally found the root cause for this issue. the culprit is the mainframe part of the code. For certain rows the mainframe program creates an 'invalid character' at the 105th position. And this invalid character gets treated as newline character in transmission, taking the rest of the data in the line to a new line. I had to dig deep into the mainframe part to get find the root cause. Thanks for all your suggestions!!