Page 1 of 1

FTP files from UNIX server to DataStage server

Posted: Mon Jun 01, 2009 12:28 am
by srai
Hi All,

I have a requirement to FTP a set of csv files from SFTP server to DataStage server.

Requirement detail is below-

When DataStage job lunched-
1) DataStage job should check for complete set of csv file. Each set of files will be named with prefix of 'YYYYMMDD_ as follow

a)YYYYMMDD_file1
b)YYYYMMDD_file2
c)YYYYMMDD_file3

And if completed set of file present , proceed, otherwise check at a 5 minute interval to check whether a complete set of files exixts. If job run for 60 minutes and complete set of file not present, Job should terminate.
After identifying complete set files for processing file should be copied to DataStage server via SFTP from ftp server.

Thanks in advance,
Santosh.

Posted: Mon Jun 01, 2009 12:40 am
by ray.wurlod
How would you do this without DataStage? You use precisely the same means when DataStage is in the mix.

Posted: Mon Jun 01, 2009 1:14 am
by srai
ray.wurlod wrote:How would you do this without DataStage? You use precisely the same means when DataStage is in the mix. ...

Hi Ray,

I just wanted to know how to implement it using DataStage?


Thanks
Santosh

Posted: Mon Jun 01, 2009 1:30 am
by ray.wurlod
Invoke the script that you would use if you didn't have DataStage, probably using Execute Command activity in a sequence or a before-job subroutine invoking ExecSH.

There is nothing in DataStage itself that does what you require. The FTP stage does have before/after ("telnet") commands, but no real capacity to wait in the way that you envisage.