Error while execute unix command via basic program

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
times29
Premium Member
Premium Member
Posts: 202
Joined: Mon Sep 22, 2008 3:47 pm

Error while execute unix command via basic program

Post by times29 »

Hi,

I have below program which call the shell script if i execute it it gives me below warning but if i execute via execute command it works so any idea
what can be wrong in below program.

csh /ds01/app/scripts/custom/FIN/wrappers/cubes_quarter.wpr: not found

Program is:

Code: Select all

*Initialize variables

vShellCommand = DSGetParamInfo(DSJ.ME, "ShellCommand", DSJ.PARAMVALUE)

call DSLogInfo ("Shell Command: " : vShellCommand, "Debug")
call DSExecute("UNIX", vShellCommand, vOutput, vRtnCode)
call DSLogInfo ("Script Output: " : vOutput, "Debug")
call DSLogInfo ("Return Code: " : vRtnCode, "Debug")

If vRtnCode <> 0 or ISNULL(vRtnCode) = 1 Then
  vErrCode = DSLogEvent (DSJ.ME, DSJ.LOGWARNING, "Script completed with a non-zero valued return code:" : vRtnCode)
 * Call DSLogFatal ("RUNFAILED with return code: ", vRtnCode)
End
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Let me guess!! Typing mistake??

Generally not found means the script is not there or the path is no correct or you do not have permission to one of the folders in hierarchy.

Since you can run the command from execute command activity so should not be a permission issue.

First two are more or less same as if the path is not correct the script will not be there.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perhaps it's csh that can't be found, and you need to provide the full pathname of its executable because its parent directory is not in the command search list ($PATH) of the user under whose identity the job runs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply