Quantcast
Channel: Toad Data Point Forum - Recent Threads
Viewing all articles
Browse latest Browse all 2544

RE: Retry availability for FTP Action in TDP?

$
0
0

Generally when something succeeds it returns the value 0 as the result.  Anything else is an error number.  So set up a variable to hold the return value intiailly set to 999 (just not zero) and your while loop to keep looping until the result value = 0 or a loop counter exceeds maxNoOfTries (I would create a variable for that too).  Make sure you use the correct variable tool (Set Variable for intial creation outside of the loop, and Set Variable Value to update the value specially inside the loop,  if you use Set Variable again inside the loop it will create it as a completely different variable with a limited scope of inside the loop even though it has the same variable name as the one outside the loop).  You can even use an if condition after the loop to test and see if it exited due to reaching max count (send error email message) or if the return value was 0 on exit of the loop (keep processing).  If have used this before with a Pause activity inside the loop so it tries again after x number of minutes.  This can save you a lot of time manually running a job for files that don't get generated consistently at the same time every day.  Have fun!


Viewing all articles
Browse latest Browse all 2544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>