FTP issues between mainframe and UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users FTP issues between mainframe and UNIX
# 1  
Old 09-12-2009
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?
# 2  
Old 09-12-2009
HI Hareesh,

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

Regards,
Sanjay
# 3  
Old 09-12-2009
I am trying to ftp a dataset that looks like this in mainframes
Quote:

00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000007103103225414200000071031R11 approved for reversal per Andrew.Kun00000071031
00041161058B.A.R.T.E.R / AMC / FLC 0984000040600293868638900000020592004195945500000205920R11 reversal approved per TSS BA, Andrea00000205920
00041161058B.A.R.T.E.R / AMC / FLC 0984000040600885054738900000019712004195949200000197120R11 reversal approved per TSS BA, Andrea00000197120
00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000001428004201667800000014280R11 approved for reversal per Andrew.Kun00000014280
but i get it as

Quote:
00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000007103103225414200000071031R11
approved for reversal per Andrew.Kun00000071031
00041161058B.A.R.T.E.R / AMC / FLC 0984000040600293868638900000020592004195945500000205920R11
reversal approved per TSS BA, Andrea00000205920
00041161058B.A.R.T.E.R / AMC / FLC 0984000040600885054738900000019712004195949200000197120R11
reversal approved per TSS BA, Andrea00000197120
00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000001428004201667800000014280R11
approved for reversal per Andrew.Kun00000014280
that is all data after column 105 comes in a new line...
# 4  
Old 09-12-2009
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 ...
# 5  
Old 09-12-2009
Hi Sanjay,
Please find the result of the command below

Quote:
cat -n T_vcs_ref_jun27.txt.090627091929
1 00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000007103103225414200000071031R11
2 approved for reversal per Andrew.Kun00000071031
3 00041161058B.A.R.T.E.R / AMC / FLC 0984000040600293868638900000020592004195945500000205920R11
4 reversal approved per TSS BA, Andrea00000205920
5 00041161058B.A.R.T.E.R / AMC / FLC 0984000040600885054738900000019712004195949200000197120R11
6 reversal approved per TSS BA, Andrea00000197120
7 00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000001428004201667800000014280R11
8 approved for reversal per Andrew.Kun00000014280
it shoudt have been

Quote:
1 00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000007103103225414200000071031R11 approved for reversal per Andrew.Kun00000071031
2 00041161058B.A.R.T.E.R / AMC / FLC 0984000040600293868638900000020592004195945500000205920R11 reversal approved per TSS BA, Andrea00000205920
3 00041161058B.A.R.T.E.R / AMC / FLC 0984000040600885054738900000019712004195949200000197120R11 reversal approved per TSS BA, Andrea00000197120
4 00041171967ARCO TOYS LTD. / FLC 0874000040600795927238900000001428004201667800000014280R11 approved for reversal per Andrew.Kun00000014280
I am also puzzled as to where the things are going wrong. :-(
# 6  
Old 09-12-2009
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
# 7  
Old 09-17-2009
are you copying in binary mode?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP from AIX to Mainframe

Hi All, This is the scenario:- I am writing a script to automate FTP files from AIX to Mainframe. ( Binary mode, passive connection) FTP the currently available files(poll a directory to find the list) and put it to mainframe in one connection instance Verify if all the files are copied... (24 Replies)
Discussion started by: TechGyaann
24 Replies

2. UNIX for Dummies Questions & Answers

Sftp from UNIX to mainframe

Hi, I have many scripts where i have used sftp for file transfer from unix box to unix box.. Now that we have to sftp files from unix to mainframe, i would like to know if that is possible. I just tried in the same way i did from unix to unix, but i got the error as connection refused. Are... (2 Replies)
Discussion started by: dnat
2 Replies

3. UNIX for Dummies Questions & Answers

UNIX sftp from mainframe

I have the following UNIX script which copies a file from a UNIX server in Canada to a UNIX server in the UK. LOG=/data/proj/sftp/canada.log DAT=`date "+%d/%m/%y %H:%M"` HOMEDIR=/data/proj/sftp TGTFILE=P_DATA.csv cd $HOMEDIR echo "\nStarting retrieval of Canadian Data at $DAT" >> $LOG ... (1 Reply)
Discussion started by: mishnok
1 Replies

4. Shell Programming and Scripting

FTP files to target Mainframe system

Hi Experts... Greetings for the day..! I just want to FTP the files to mainframe system.. my code is not working..and also i need to put the files in a particular directory in a specific naming format... ftp -i -n ${HOST_NAME} << END_FTP user ${USER_NAME} ${PASSWORD} put ${FILE_NAME}... (3 Replies)
Discussion started by: spkandy
3 Replies

5. UNIX for Dummies Questions & Answers

FTP'ing EBCDIC Characters from Mainframe

Hi All, I am new to this site, I have a requirement where in i have to FTP a file from mainframe to Unix box. The catch here is there are few Spanish characters like N with tilde(~) and a with ` etc., all other characters are coming fine but those mentioned above are not coming in a proper... (1 Reply)
Discussion started by: harikiranr
1 Replies

6. UNIX for Advanced & Expert Users

ftp file from unix to mainframe

thanks (2 Replies)
Discussion started by: ashishabhishek
2 Replies

7. UNIX and Linux Applications

ftp from unix to Mainframe

suppose i have a file named xyz(-1) and i have to transfer(ftp) it on a Mainframe from unix,how should i do it as whenever i try to do so it says use MVS naming conventions (1 Reply)
Discussion started by: ashishabhishek
1 Replies

8. HP-UX

ftp from unix to mainframe

hi suppose i have a file named xyz(-1) and i have to transfer(ftp) it on a Mainframe from unix,how should i do it as whenever i try to do so it says use MVS naming conventions (1 Reply)
Discussion started by: ashishabhishek
1 Replies

9. Shell Programming and Scripting

mainframe FTP error

Hi when i am trying to ftp to a newly cretaed mainframe GDG for the first time,i am getting the following error... Verbose mode on. 200 Representation type is Ebcdic NonPrint 200 Port request OK. 550-SVC99 Return code=4 S99INFO=0 S99ERROR=38668 HEX=970C S99ERSN code X'00004379'). 550... (1 Reply)
Discussion started by: sam99
1 Replies

10. UNIX for Dummies Questions & Answers

USS (unix) on the Mainframe

Does anyone work with USS on an IBM Mainframe computer on this msg board? (2 Replies)
Discussion started by: Javagate
2 Replies
Login or Register to Ask a Question