Folder check on different server / FTP

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
VIDHATHA
Participant
Posts: 11
Joined: Fri Aug 24, 2012 1:57 am

Folder check on different server / FTP

Post by VIDHATHA »

I need to transfer file from Datastage unix server to other server

but ,before moving that file , need to check whether the folder is available or not, if folder not available then need to create the folder

please suggest best approach for this

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Normally I would just say "a script". But since you mentioned FTP (and I assume DataStage is doing the FTP) have you looked into the "Open command" option? From the docs:
Is required if you perform any operation besides navigating to the directory where the file exists. There can be multiple Open commands. This is a dependent property of URI.
Others will have to help with specifics or with other approaches. But seems to me you'd need something on the target server you could run to check for the directory's existence and conditionally create it, assuming your connecting user has permissions to do that, of course.

"Best approach" in my mind would be to not use DataStage if the FTP transfer is literally all the job is doing, especially with your extra requirement tacked on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply