Unziping file from Windows environment
Moderators: chulett, rschirm, roy
Unziping file from Windows environment
Hi Gurus,
I want to Unzip files which are in specified directory using routine or someother way (and once Unzipping is done next job will extract those files). If anyone have idea about on this pl guide me.
Both DataStage client and Server are installed in Windows environment.
Kind Regards
Luk
I want to Unzip files which are in specified directory using routine or someother way (and once Unzipping is done next job will extract those files). If anyone have idea about on this pl guide me.
Both DataStage client and Server are installed in Windows environment.
Kind Regards
Luk
Try before/after routine call to ExecDOS and use the zip/unzip command line program. Or, use a Command stage in a Sequence.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Don't even attempt it. It's an additional and unnecessary layer because, in the routine, you'd be invoking the appropriate operating system command (via DSExecute()).
Use an Execute Command activity in a job sequence, or use a before-job subroutine, either ExecDOS or ExecDOSSilent or a clone of either.
Or use a filter command in a Sequential File stage to perform the unzip; the output of that command is picked up by the Sequential File stage.
Use an Execute Command activity in a job sequence, or use a before-job subroutine, either ExecDOS or ExecDOSSilent or a clone of either.
Or use a filter command in a Sequential File stage to perform the unzip; the output of that command is picked up by the 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.
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
Hi Ray,
Thanks for the response.....
I m executing following command to Unzip files from Before job subroutine
d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\
Here c:\ is my source file path and i want to keep the unzipped file in the same path itself .
When i execute above command, i m getting the following error message (From director)
Test11..BeforeJob (ExecDOS): Error when executing command: d:\progra~1\winzip\winzip32.exe -min -e
*** No output from command ***
Job stopped - before-job routine returned error: Error 1 returned from BEFORE routine DSU.ExecDOS
Can anyone tell me is there anything wrong in my command....and Pl correct me
Thanks in Advance
Regards
Luk
Thanks for the response.....
I m executing following command to Unzip files from Before job subroutine
d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\
Here c:\ is my source file path and i want to keep the unzipped file in the same path itself .
When i execute above command, i m getting the following error message (From director)
Test11..BeforeJob (ExecDOS): Error when executing command: d:\progra~1\winzip\winzip32.exe -min -e
*** No output from command ***
Job stopped - before-job routine returned error: Error 1 returned from BEFORE routine DSU.ExecDOS
Can anyone tell me is there anything wrong in my command....and Pl correct me
Thanks in Advance
Regards
Luk
What happens if you force some output, i.e. add "| dir" to your command line?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Currently your DOS command is "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\ ", I wanted to have this command force some sort of text into the buffer, so I wondered what would happen if you changed that to "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\ | dir"
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Examine the source code for ExecDOS. It requires that there be some output from the command. Arnd's suggestion, of adding a dir command, forces there to be some output. A hostname command or a cd command (with no command line arguments) would have done as well.
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.
I was under the impression that multiple files need to be unzipped and hence i advised to go for a routine where a substantial amount of error handling can be coded. But if the unzipping is for a single file then yes, no need for a routine.
Regards,
Regards,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
After appending " | dir " to the command "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\", the problem still remains.
As I understand, the command "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\ |dir" actually opens the winzip32.exe but the unzipping process is not happening.
When I killed the WINZIP32.exe process in Task Manager, the process returned CODE = 0 which means the command has unzipped the file.
But actually the unzipping process has never really happened.
A simple command like copy works fine but when I tried to execute unzip, postie commands via DS, the routine simply hangs...
Any idea if I am missing out on something????
As I understand, the command "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\ |dir" actually opens the winzip32.exe but the unzipping process is not happening.
When I killed the WINZIP32.exe process in Task Manager, the process returned CODE = 0 which means the command has unzipped the file.
But actually the unzipping process has never really happened.
A simple command like copy works fine but when I tried to execute unzip, postie commands via DS, the routine simply hangs...
Any idea if I am missing out on something????
Hello All,
Any idea about this problem???
We are using
DataStage version 7.1,
O/S: Windows 2000,
WinZIP version: 9.0 with command line support.
If anyone has ever tried this one, please let me know how to go about this problem.
I have tried all the options
1. Calling ExecDOS in before Job Routine by passing the command as the input value
2. Using the Execute command stage in a sequence job
3. Passing the command as parameter to the Filter Command in Sequential File Stage after checking the option "Stage uses filter commands"
But none of them worked for me...
Any idea about this problem???
We are using
DataStage version 7.1,
O/S: Windows 2000,
WinZIP version: 9.0 with command line support.
If anyone has ever tried this one, please let me know how to go about this problem.
I have tried all the options
1. Calling ExecDOS in before Job Routine by passing the command as the input value
2. Using the Execute command stage in a sequence job
3. Passing the command as parameter to the Filter Command in Sequential File Stage after checking the option "Stage uses filter commands"
But none of them worked for me...
If I recall my WinZip correctly, you cannot use the normal executable from the command line but need to download the command-line version of the code (available on their website); I've used that from DOS before with no problems but can't recall what the executable is called, but I don't think that it is WinZip32.exe.
Doesn't it make sense to test the command line version directly to make sure that it works before trying it from inside of DataStage?
Doesn't it make sense to test the command line version directly to make sure that it works before trying it from inside of DataStage?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>