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
Pass in parameter to ExecCommand stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
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.agathaeleanor wrote:I am wondering if the command stage supports pass-in parameter?
Code: Select all
Output from command ====>
SH: /u01/dstage/hpbdev/Sequential/FI/Scripts/RemoveTrailer_FI_MOH_Budget.sh: not found
![Confused :?](./images/smilies/icon_confused.gif)
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"
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
thanks chulett for your reply.
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,
Here i provide first part of the shell script,
Thanks in advance for your help.
somehow, the job still able to execute the shell script by echoing words from script, like "version is "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.
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>
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>
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
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.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers