1754311 Members
3076 Online
108813 Solutions
New Discussion

DCL script to FTP files

 
Craig A
Valued Contributor

Re: DCL script to FTP files

I developed a file trasnfer utility for one client and it ended up being used to transfer 10,000 files per day between both internal and external servers. (The latter via VPn links)

Each PUT was explicity checked for the expected output. The same goes for the RENAME command. I ASSUMED a problem and waited for evidence to demonstrate that the commands had been successful.

From time to time, an FTP would just hang. I modified the job to use a sub-process for the transfer while monitoring Direct I/O (iirc) - Anthing "stuck" was killed off and the job re-submitted.

We never once (in over 3 years) experienced a problem with remote jobs picking up incomplete files. They simply polled for the correct files and ignored everything else.

Using a flag/trigger file wouldn't be my solution. You would need to check that the flag was there and the file that it flagging on is there too. Also, what deletes the flag file? Remember that transfers will be going to many different types of servers and not all the SysAdmins of such boxes will be able to code solutions to deal with things like the housekeeping of flag files.

Personaly, I'd rather just get the main file to its ultimate destination safely, easily and reliably while being mindful of the fact that network glitches are a fact of life.

Craig.