This error is caused if the size of your file is larger than the allowed filesize. Suppose the system has a limit of 1 Gb. If you tar and zip twenty 100 Mb files, then the size of the tarred file would be approximately 2 Gb. So the system would give you this error:
tar: 0511-194 Reached end-of-file before expected
To solve this problem, you would need to increase your filesize or remove the limitation as follows:
$ vi /etc/security/limits
Change fsize = -1 and save file
If you don’t have permissions to make this change and the admin will not make this change, you can work around by doing a zip tar instead of a tar zip as follows:
$ cd mydir
$ gzip *.txt
$ tar cvf myfile.gz.tar *.gz