1835865 Members
4161 Online
110085 Solutions
New Discussion

file getting truncated

 
MAYIANAN
Advisor

file getting truncated

Hi frns,

I am trying to FTP a file from unix to mainframe. but the length of the line is getting trucated while FTPing.

Here is the piece of code that i used for FTP


user $FTPUSER $FTPPWD
prompt
asc
site LRECL=${LineLength} RECFM=VB CYL PRI=100 SEC=100 BLK=0
put ${SRCFILE} \'${SRCFILE}\'
dis
bye
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: file getting truncated

Shalom,

Two possibilities spring to mind.

1) Timeout for inactivity on the receiving server. That may need to be adjusted.
2) filesystem on the receiving server limits maximum file size.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: file getting truncated

> the length of the line is getting trucated while FTPing.

Do you mean that each record at the mainframe is truncated? If so, then the SITE command will have to be fixed. HP-UX (and Unix in general) have no real concept of a line length -- only the applications define a line (ie, cat, vi, grep, wc, etc). And since this is an ASCII transfer, the definition for the line termination codes will be handled locally on both sides. Each mainframe has its own JCL to define file characteristics and you'll need some help from the mainframe admins here. Note that you'll need to verify that the file description (SITE) command works correctly for the subsequent PUT command. Start with simple test files.


Bill Hassell, sysadmin
MAYIANAN
Advisor

Re: file getting truncated

@Bill

What u meant is correct. its getting truncated for every line. I am getting a file of line length 490 in which the last 10chars are getting truncated. No problem with site command. its working fine for small files.
Bill Hassell
Honored Contributor

Re: file getting truncated

> I am getting a file of line length 490 in which the last 10chars are getting truncated.

So it looks like the SITE file descriptor specified a record length of 480. You'll need to work with the JCL gurus at the mainframe to see what needs to be changed. This is likely an OS setting or limitation for the filetype definition. Be sure to look at the definitions for RECFM=VM and other record format choices.


Bill Hassell, sysadmin