Progress FTP get (file is not available till program ends)

Posted by jamali on 10-Apr-2017 08:39

We have a program that gets a file and then tries to process it. The ftp get is pretty standard:

OUTPUT STREAM ST-ftp THROUGH VALUE("ftp -v -n >> " + CH-ftp-log-file).
/* connect using username, pwd, cd etc */
PUT STREAM ST-ftp  UNFORMATTED "get " CH-server-file " " CH-host-file SKIP.

The ftp log shows everything is successful, but if I pause the program at this point, the file does not show up in the directory. Once I quit the program, it appears. Is this expected behaviour? 

I separated the program that gets the file (so I now call that program, wait for it to complete, then access the file that was received). I'm wondering why this happens and if there is some way to prevent it.

All Replies

Posted by scott_auge on 10-Apr-2017 14:58

Most likely your operating system is locking the file in some way from other users.  That way they can't begin operations on it before it is done.

Posted by Brian K. Maher on 11-Apr-2017 21:30

Where is the OUTPUT STREAM ST-ftp CLOSE statement?

This thread is closed