DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
Lucky
Participant



Joined: 10 Oct 2005
Posts: 31

Points: 296

Post Posted: Wed Sep 27, 2006 1:35 am Reply with quote    Back to top    

Hi,

I have the compatible command line support installed on the machine and as I have already mentioned, the command works when executed from the command prompt.

But I am not successfull in doing the same from DS.
Rate this response:  
Not yet rated
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 13833
Location: Germany
Points: 78216

Post Posted: Wed Sep 27, 2006 2:54 am Reply with quote    Back to top    

I missed that, sorry. You will need to specify absolute pathnames for all objects, since the cwd from inside datastage is that of the project unless you explicitly change it in the command. I would look in your project directory on DOS and I'm certain you'll find the uncompressed objects.

_________________
Image
Rate this response:  
Not yet rated
Lucky
Participant



Joined: 10 Oct 2005
Posts: 31

Points: 296

Post Posted: Wed Sep 27, 2006 10:27 pm Reply with quote    Back to top    

Hi ArndW, Ray , DSGuru2B
Thanks for u r responses,
I think i m giving complete path in the command, will u pl tell me where i have to give paths other than d:\progra~1\winzip\ , c:\ in "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\ |dir


Regards
Rate this response:  
Not yet rated
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 13833
Location: Germany
Points: 78216

Post Posted: Thu Sep 28, 2006 2:01 am Reply with quote    Back to top    

Have you tried doing a search on Windows drives c:\ and d:\ for the missing files just to make sure that they were not extracted elsewhere? Also, try creating a file "C:\test.txt" and instead of issuing the WinZip from DS try just an ExecDOS of "move test.txt done.txt" to see if this is executed.

_________________
Image
Rate this response:  
Not yet rated
Lucky
Participant



Joined: 10 Oct 2005
Posts: 31

Points: 296

Post Posted: Thu Sep 28, 2006 2:37 am Reply with quote    Back to top    

Hi ArndW ,

I have searched c:\ and d:\ ,files are not extracted any where else,
And I m able to do copying file form one location to another location using ExecDOS from Before job subroutine
and also using the command "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\ |dir" from command line i m able to Unzipping the files, but if i m using the same command from the DS Job before job subroutine , DS job is just hanging and if kill Winzip32.exe process from task bar then i m getting the error message

Test11..BeforeJob (ExecDOS): Error when executing command: d:\progra~1\winzip\winzip32.exe -min -e
*** No output from command ***


Appriciate for u r resonse.

Regards
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 28418
Location: Denver, CO
Points: 146801

Post Posted: Thu Sep 28, 2006 3:01 am Reply with quote    Back to top    

When it works for you from the command line, does it prompt you for anything, a question you need to answer perhaps? That is the typical cause of a 'hang' like this as there's no-one there to answer it when run from a job.

If so, look to see if there are any additional command line options to override or automatically answer the question.

_________________
-craig

Sarchasm: The gulf between the author of sarcastic wit and the person who just doesn't get it.
Rate this response:  
Not yet rated
Lucky
Participant



Joined: 10 Oct 2005
Posts: 31

Points: 296

Post Posted: Thu Sep 28, 2006 3:40 am Reply with quote    Back to top    

It is not prompting anything when i run from command line and working fine

Regards,
Rate this response:  
Not yet rated
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 13833
Location: Germany
Points: 78216

Post Posted: Thu Sep 28, 2006 3:45 am Reply with quote    Back to top    

Lucky,

in your case note that the DS job is not hanging, it is just waiting for your WinZip to return control to it; so actually WinZip is hanging. In 99 out of a 100 cases this is because it has issued some command and is waiting for input, as Craig has already suggested. Could it be that the output file/directory is already there {because you tested it by hand} and it is asking whether or not you want to overwrite the file(s)? If this is the case since the DS job is a background process it cannot respond to that question and will wait forever.

_________________
Image
Rate this response:  
Not yet rated
Lucky
Participant



Joined: 10 Oct 2005
Posts: 31

Points: 296

Post Posted: Thu Sep 28, 2006 4:30 am Reply with quote    Back to top    

Thanks Craig and ArndW,

I m sure that there is no existing files in the directory, also i have corss checked and there is no file with that name to ask for replacing the existing file.


Regards,
Rate this response:  
Not yet rated
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 13833
Location: Germany
Points: 78216

Post Posted: Thu Sep 28, 2006 6:31 am Reply with quote    Back to top    

Try writing your own routine as follows:

Code:
Command = "d:\progra~1\winzip\winzip32.exe -min -e c:\File_Name.zip c:\"
EXECUTE 'SH -c "':Command:'"' CAPTURING Ans RETURNING ErrorCode
Ans = 'Error Code "':ErrorCode:'", Output "':Ans:'".'


Compile and run - if the routine returns then you must be doing something different in your job. If the routine execution "hangs" then enter the TCL and do a PORT.STATUS command to ensure that a process is indeed executing your WinZip32.exe program. Check the most recent file in the &PH& subdirectory of the project and see if there is any text in there.

Now that I think about it, you could just enter TCL and execute the SH -C "d:\...." command and see if it prompts you for something - this is better than writing a routine to do the same thing.

_________________
Image
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 40572
Location: Melbourne, Australia
Points: 226407

Post Posted: Thu Sep 28, 2006 3:27 pm Reply with quote    Back to top    

You might also investigate using the START command in DOS for running your command.

_________________
Zenith Solutions (Australia) Pty Ltd
-- from obscurity to clarity
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours