External File Information like File Size,Record count

Reply
New Contributor
Posts: 4

External File Information like File Size,Record count

Hey all,

I needed to get the External File Information like File Size after the file has been FTPed,sort of File transfer validation.I am FTPing the file to the remote server using the Filename FTP Statement.

I tried to use the FINFO function to get the File size of the File at remote server but except FILE SIZE all other Information has been provided like LRECL,created Date,Modified Date.Hostname,FileName.

If we can use the output of RCMD Functionality it would also serve the purpose but unable to get the output of RCMD file without writing to a dataset.Remote Command "size" used with RCMD will give the necessary File Size information but unable to capture the output of Filename FTP with RCMD option.

Thanks in Advance

Kishore Kaushal

Trusted Advisor
Posts: 2,113

Re: External File Information like File Size,Record count

You could use the FTP 'la -a" command to get the information displayed.  Note that the file size may vary depending on data format and platform (e.g. a text file on Windows is "N" characters bigger than the same text file on Unix due to the difference in <EOL> designation (where "N" is number of lines).  It is even messier between other platforms.

Ask a Question
Discussion stats
  • 1 reply
  • 385 views
  • 0 likes
  • 2 in conversation