boukaka
asked on
ftp truncating records
Hi,
I have a vba application that is sending an ascii file via ftp to a server. There is a header, records and a footer in the file. Each record consists of a certain amount of text and ends with 1600 blank spaces. The ftp sends the file but truncates from the first blank space of the 1600 space section in the first record in the file right through to the footer but INCLUDES the footer.
I am sending using the following where nChars = 6047 (each record is 6046 chars long)
SendCommand("site lrecl=nChars recfm=fb cy pri=1000 sec=150")
So instead of, for example: (stuff in curly brackets is information - not actual data)
test header
test record1 {space}{space}{space}{spac e}{space} {etc...}
test record2 {space}{space}{space}{spac e}{space} {etc...}
test record3 {space}{space}{space}{spac e}{space} {etc...}
test footer
The ftp transfer is sending this:
test header
test record1 {no space}
{all other records truncated}
test footer
Can anyone help me send this file without truncating all that data?
I have a vba application that is sending an ascii file via ftp to a server. There is a header, records and a footer in the file. Each record consists of a certain amount of text and ends with 1600 blank spaces. The ftp sends the file but truncates from the first blank space of the 1600 space section in the first record in the file right through to the footer but INCLUDES the footer.
I am sending using the following where nChars = 6047 (each record is 6046 chars long)
SendCommand("site lrecl=nChars recfm=fb cy pri=1000 sec=150")
So instead of, for example: (stuff in curly brackets is information - not actual data)
test header
test record1 {space}{space}{space}{spac
test record2 {space}{space}{space}{spac
test record3 {space}{space}{space}{spac
test footer
The ftp transfer is sending this:
test header
test record1 {no space}
{all other records truncated}
test footer
Can anyone help me send this file without truncating all that data?
ASKER
Have tried using multiple clients - same issue
I am sending using vba code. We don't think it's the structure its just a basic text file - no special characters etc and if I send it using wraprecord, the whole file goes across (but of course with a line feed every 256 chars which is no good).
Have to send the blank spaces because the file format IBM is insisting on includes those blank spaces. They aren't about to change their ingestion program to accommodate little old me :(
I tried SendCommand("site trim=0 lrecl=nChars recfm=fb cy pri=1000 sec=150") but that didn't work either...
I am sending using vba code. We don't think it's the structure its just a basic text file - no special characters etc and if I send it using wraprecord, the whole file goes across (but of course with a line feed every 256 chars which is no good).
Have to send the blank spaces because the file format IBM is insisting on includes those blank spaces. They aren't about to change their ingestion program to accommodate little old me :(
I tried SendCommand("site trim=0 lrecl=nChars recfm=fb cy pri=1000 sec=150") but that didn't work either...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As a test, I just tried sending the file with no trailing spaces and it still says that it was truncated. I am attaching a sample of the file with spaces and without.
T3-spaces.txt
T3.txt
T3-spaces.txt
T3.txt
ASKER
Binary seems to have worked!!! I will confirm and then award points.
ASKER
That worked - the file is not humanly readable but we can work with it. Thank you.
I would also check the transmission method; ASCII or binary. You should be using ASCII.
And as a side issue why all the blanks spaces?
Jim.