Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import from 1 or more dynamic sources

Status
Not open for further replies.

skicamel

Programmer
Dec 24, 2001
126
US
I've got a package set up to pull an excel file from an ftp datasource. The format is along the lines of filename20051115.xls and changes daily based on the date.

I have a dynamic properties task that generates a filename for a date of 3 days prior. All runs fine as is.

The issue is that the ftp source does not update with new files reliably. It may update for weeks on a daily basis, then a week with no updates, then brought up to date in a single day. The source is from another company so I have no control of that side.

I have a script that can generate the filenames of the days I have yet to download. Any ideas how to go about looping through the days I need? What I've been able to find has dealt w/ Global Variables & Active X scripts, but I haven't been able to do much with what I've found.

Any help would be greatly appreciated. Good to be back. Thanks all!
 
I've got a DTS that does that but works forward only. Sorry this is a bit 'descriptive but I'm at home with no access to my work.

Step a) Use an active-x script to set a global variable to the (first) filename you're after.

Step b) Use an Active-x script and see if the file exists based on the Global variable. You can then choose to either report a failure and stop all processing if that file does not exist or move to step 'd'. If the file exists move to step 'c'

Step c) Process File.

Step D) Is there another file to look for. Yes goto step 'e' otherwise step 'f'.#

Step e) Use an active-x script to set the global variable to the next filename to look for. Goto step 'b'.

Step f) End Processing

Rhys
The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense Edsgar Dijkstra

Church of the Flying Spaghetti Monster
 
Thanks for the help. I got some good info from sqldts.com (through one of your other post's threads). I've been 'tasked a deliverable' on another project, so I'll have to play a bit more w/ this after work. Thanks again.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top