Loop final value not numeric

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
kari0ca
Participant
Posts: 2
Joined: Wed Nov 03, 2010 9:38 am
Location: Lisbon

Loop final value not numeric

Post by kari0ca »

Hi there, i'm having a problem that already was discussed here, but none of the solutions presented solve my problem :cry:
So here i am to ask for some help on this problem.


I'm having this message on a loop:
"Loop final value not numeric (29-1) - cannot execute it"

I've already tried to use this: Trim(Convert(@FM,"",CmdQtdLinhasCalc.$CommandOutput)) - Not working
Oconv(Ereplace(trim(CmdQtdLinhas.$CommandOutput),@FM,""), "MCN") - Not working
Iconv(Ereplace(trim(CmdQtdLinhas.$CommandOutput),@FM,""), "MCN") - Not working

Can someone give me some hints to solve this problem?

Thanks in advance,
Higor
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is the actual command output? From the error message, it would appear that the line "29-1" appears in it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, I would be curious what exactly you are trying to loop thru and how it is being generated.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kari0ca
Participant
Posts: 2
Joined: Wed Nov 03, 2010 9:38 am
Location: Lisbon

Post by kari0ca »

@ray.wurlod, the error message was: "Loop final value not numeric (29-1) - cannot execute it", i cant remember it now, i've managed to workaround this problem

@chulett, i was setting the loop this way: From: 2, Step: 1, To: Oconv(Ereplace(trim(CmdQtdLinhas.$CommandOutput),@FM,""), "MCN") -1

the result of Oconv(Ereplace(trim(CmdQtdLinhas.$CommandOutput),@FM,""), "MCN") would be 29, so i assume that i cant use an expression on TO field...
i've made this calc on a variable and send it to the loop.

Thanx for your answer and your time trying to help me
Post Reply