Can someone tell me how unix works out file lenghts please? If I'm ftp'ing a file from a mvs mainframe to a unix box will the file be replicated line by line? I'm looking at the file on the unix box and it's telling me the recl is almost 4000 but it's not that on the mvs side. Should a txt file on unix be a fixed length?
On a UNIX system, the size of a file is the offset in the file of the last byte in the file. Text files on UNIX Systems can be any size from 0 bytes to several terabytes depending on available disk space, file system limitations, and system administrator imposed file size limits for each user on the system.
Note that if you're copying a file from an MVS system (with an EBCDIC code set) to a UNIX system with an ISO 8859-*, ASCII, or UTF-8 codeset, you may need to use:
dd if=mvs_filename of=unix_filename conv=ascii
after getting the MVS file moved onto your UNIX System.
It's best to think about UNIX files as not blocked, think more like a single data stream for the entire file content. File size on UNIX is a total byte count, so if you have 50 lines of block size 80 that will come out to about 4000 bytes. Like Don says above, make sure you convert to ascii format using the appropriate ftp commands.
Assuming that recl means Record Length, this suggests that the entire file has been moved as one 4000-byte record, or that the block size was 4000.
No sizing was posted for the IBM file.
No detailed sizing was posted for the unix/Linux? file.
What ftp mode did you use? ASCII or BINARY or something else which was IBM-specific?
It always helps if you post what Operating System and version you have and what Shell you are using.
In this post it would help if we saw the ftp commands and it was made 100% clear which computer processed the commands.
Footnote: When IBM is involved, it can be easier to issue the ftp commands from the IBM computer.