I tried to execute the below command from unix and it works fine.
I need to use job control to execute this because "TWN_MthlyFiles_MI.tar" and "dwh" is a parameterized value. DSEE v7.1 doesn't support usage of parameter in Execute Command stage. And I was not allowed to create user defined environment variable./usr/bin/tar -xvf /dwh/ftp/TWN/TWN_MthlyFiles_MI.tar
Below is my control job file that execute any unix command.
Code: Select all
Command = "/usr/bin/" : szUnixCmd
Parameter = szParameter
UnixCmd = Command: " " : Parameter
Call DSExecute("UNIX", UnixCmd, Output, SystemReturnCode)
If SystemReturnCode <> 0 Then
Call DSLogFatal("Unix Execution Failed : " : UnixCmd,"Notice1")
End
Call DSLogInfo("Unix Execution Successful : " : UnixCmd,"Notice1")
Parameter = "-d /":pEnv:"/ftp/TWN/":szGzipFile:".tar.gz"
Environment = pEnv
Aborted : Command = "tar"
Parameter = "-xvf /":pEnv:"/ftp/TWN/":szGzipFile:".tar"
Environment = pEnv
I am able to execute gzip command but not tar command. I suspect datastage cannot recognise "tar". Please help... I am totally lost of ideas..