extracting a zip file from a job
Moderators: chulett, rschirm, roy
extracting a zip file from a job
Hi,
i have a zip file which will be created in a folder.
i need to watch for the zip file.
once,this zip file is existing in a folder, extract the files to a particular folder..
these extracted files are necessary for some other operations..
eg:
lets say i have folder called "Inbox"
at some period of time, a zip file is created in the folder "Inbox".
I need to watch for this zip file in "inbox" folder,extract files to some other folder.
all these are done before running a job.
my server is running on Unix.datastage client tools are on Windows.
i apologize for any spelling mistakes
Thanks
vsi
i have a zip file which will be created in a folder.
i need to watch for the zip file.
once,this zip file is existing in a folder, extract the files to a particular folder..
these extracted files are necessary for some other operations..
eg:
lets say i have folder called "Inbox"
at some period of time, a zip file is created in the folder "Inbox".
I need to watch for this zip file in "inbox" folder,extract files to some other folder.
all these are done before running a job.
my server is running on Unix.datastage client tools are on Windows.
i apologize for any spelling mistakes
Thanks
vsi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This will be quite a tricky exercise if DataStage really is on a UNIX server. Do you use samba or some similar protocol to make Windows folders visible to UNIX? Unless this is the case, I doubt that DataStage-on-UNIX is the correct tool for this task.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
More concerned for now how to use a Wait For File activity on UNIX to await the appearance of a file in a Windows folder, which it appears is what vsi wants to do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I'm not aware that any of the putty command line utilities gives you a Wait For File capability. You could, I guess, script a ptcp command to attempt to copy the file, and only proceed if it succeeds, otherwise sleep for a while and try again, but it's not a pretty solution.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
HOW can you use a Wait For File activity?
That's been my point. Unless you can "see" the Windows folder where the zip file will arrive from your UNIX machine on which DataStage is running, you will wait in vain.
That's been my point. Unless you can "see" the Windows folder where the zip file will arrive from your UNIX machine on which DataStage is running, you will wait in vain.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi ray,ray.wurlod wrote:HOW can you use a Wait For File activity?
That's been my point. Unless you can "see" the Windows folder where the zip file will arrive from your UNIX machine on which DataStage is running, you will wait in vain.
FYI,
from Datastage Designer,
in sequence, WaitForFile activity,
when i click "Browse for File",i am able to see all the folders
which are existing in UNIX system.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In that case you CAN use a Wait For File activity. Then an Execute Command activity to run a UNIX-based unzip or - alternately - use the same command as a filter in a Sequential File stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.