Hi,
I am executing the below command in execute command activity.The output from the command is 4
expr `date +%Y` - 2007
and passing the output of this command to start loop activity. i want the loop to be executed the number of times the output from above command.
But i am getting the below error.
Loop final value not numeric (4)
I have searched the forum i got 4 unique solutions. tried all of them but was not succesful. Please find the solution from forum and my job output. I used all the below expressions in Start loop activity.
Convert(@FM,"",#Execute_Command_20.$CommandOutput#)--Convert(@FM,"",4 - cannot execute (i double checked the paranthesis and they are correct)
Trim(Convert(@FM,"",#Execute_Command_20.$CommandOutput#))--Trim(Convert(@FM,"",4)-cannot execute
Convert(@FM,"",Execute_Command_20.$CommandOutput)--My job wasnot compiling at all.
DSGetUserStatus--I was not able to find this routine and dont know how to use it.
I used the below expressions in Execute command activity which is coming as input to start loop activity
Convert(@FM,"",expr `date +%Y` - 2007)--SH: 0403-057 Syntax error at line 1 : `(' is not expected.) - cannot execute
Please help in getting the solution and please correct me if my understanding is wrong .-
Loop final value not numeric
Moderators: chulett, rschirm, roy
Loop final value not numeric
vishal
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The result of the command includes a newline. Try eliminating it, for example by changing the command to
Code: Select all
expr `date +%Y` - 2007 | tr -d '\n'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Probably because the command was typed in rather than using the expression builder and/or because parameters were included in the Command field (they may only appear in the Parameters field). These are my guesses. I don't know for certain what the OP did.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.