ftp

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

ftp

Post by sainath »

Hi
I have files in remote location. these files are inserted daily.
after that i run the ETL job to process these files.
I used ftp to get the files form remote location to datastage location.

but i want to process only NEW files daily.


IS THERE ANY FTP command which do .

please share your thoughts
thks
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

How do you identify the new files?
Do the files get overwritten everytime?
Does the file name remain the same or do you rename them with the datetime?

If you can have a fixed name for the file all the time, or you can have a script that renames the new file before you do the ftp then you will be fine.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

Post by sainath »

Hi
1.My idea is to store the processed files in hash file and comepare with input files and delete those matched records.

2. How can i delete the match files in remote location using ftp.
thks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Better to store them in a database table... then pull them into a hashed file to use for checking in the actual process run.

Do you have the permissions you'd need to delete files from the ftp server? If so, you would just issue a del command inside the ftp session - your scripted ftp session.

The only way to do something like this using the dreaded FTP stage is via the before or after Telnet command options... and just because you can ftp to a server doesn't imply that you can also telnet to it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sun786
Participant
Posts: 34
Joined: Mon Feb 07, 2005 5:48 am

Post by sun786 »

1) ?
2) You have to write a remote shell script which will execute on the remote unix machine- Also u need to pass file-name parameters to this shell ........try

remsh servername -l userid 'test.sh'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

sun786....the OP happens to sit on a windowz box.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply