Page 2 of 2

Posted: Thu Nov 10, 2011 1:04 am
by agathaeleanor
Job logged,


JobControl (@Execute_Command): Executed: . /u01/dstage/hpbdev/Sequential/FI/Scripts/RemoveTrailer_FI_MOH_Budget.sh "I"
Reply=0
Output from command ====>

version is

Posted: Thu Nov 10, 2011 1:13 am
by agathaeleanor
basically nothing has passed down to the shell script :(

Posted: Thu Nov 10, 2011 2:34 am
by pandeesh
Ok. Then the final test is pass a value in parameter property in Exec Command stge. In stead of passing parameter #VER_ID# , just give some value directly.
Let's see whethee thats getting passed or not.

Posted: Thu Nov 10, 2011 2:52 am
by agathaeleanor
It is still same, no value being passed to shell script.

I am wondering if the command stage supports pass-in parameter?

Posted: Thu Nov 10, 2011 7:28 am
by chulett
agathaeleanor wrote:I am wondering if the command stage supports pass-in parameter?
Of course it does and the log proves it - your parameter is clearly shown as part of what was "executed". The problem is all in your script and how you are calling it.

Code: Select all

Output from command ====> 
SH: /u01/dstage/hpbdev/Sequential/FI/Scripts/RemoveTrailer_FI_MOH_Budget.sh: not found
This error states that your path to the script is invalid; either it does not exist, is misspelled or you don't have the proper permissions... and I don't see how adding the "dot space" to the beginning makes it find it. :?

Rather than the relative path that you posted in your first post, what happens when you manually run that full path from the command line?

/u01/dstage/hpbdev/Sequential/FI/Scripts/RemoveTrailer_FI_MOH_Budget.sh "I"

Posted: Mon Nov 14, 2011 6:27 am
by agathaeleanor
thanks chulett for your reply.
This error states that your path to the script is invalid; either it does not exist, is misspelled or you don't have the proper permissions... and I don't see how adding the "dot space" to the beginning makes it find it.
somehow, the job still able to execute the shell script by echoing words from script, like "version is "

When i executed the script in command line, it works perfectly fine.

One thing i noticed from job log is when i select the log from job all the way down, there is linefeed/carriage return (not sure how to differentiate). I strongly believe this is the culprit, but how do i trim it off? The log as below,

Code: Select all

JobControl (@Execute_Command): Executed: . /u01/dstage/hpbdev/Sequential/FI/Scripts/RemoveTrailer_FI_MOH_Budget.sh M 
Reply=0 
Output from command ====> 
SH: print: not found 
version is
<linefeed>
<linefeed>
Here i provide first part of the shell script,

Code: Select all

#!/usr/bin/ssh2
TS=`date +%y%m%d.%H%M%S`

INITIALFOLDER="/u01/dstage/hpbdev/Sequential/FI/"
ARCHIVEFOLDER="/u01/dstage/hpbdev/Sequential/FI/03_Archive/"
EXCEPTIONFOLDER="/u01/dstage/hpbdev/Sequential/FI/04_Exception/"

cd $ARCHIVEFOLDER
mkdir ${TS}
cp $INITIALFOLDER`echo "FIN_*.csv"` $ARCHIVEFOLDER${TS}/
cd $EXCEPTIONFOLDER
mkdir ${TS}
EXCEPTIONFOLDER=$EXCEPTIONFOLDER${TS}/
cd $INITIALFOLDER

VEXCEPTIONCNT=0
VFILENOTFOUNDCNT=0

VERSION="$1"
echo $1
echo "version is "$VERSION""
##MOH
if [ "$VERSION" = "I" ]; then
<codes continue>
Thanks in advance for your help.

Posted: Wed Nov 23, 2011 1:23 am
by agathaeleanor
issue resolved with,
command property: exec
parameter property: <script name> <parameter>

Posted: Wed Nov 23, 2011 7:58 am
by chulett
Interesting, thanks for posting that. Usually you only need to do that if the path to the executable is parameterized, then as you've done something like 'exec' or the shell ('ksh' for example) go in the command box and everything goes into the parameter box.