Invalid whole number when returning a string
Posted: Thu Dec 18, 2014 5:41 pm
I wrote a subroutine in Rexx, the code works, it does what it is meant to, but at the end I get this message:
IRX0026I Error running R12, line 129: Invalid whole number
My code:
n="Paul"
n = mobile(n)
say n
mobile:
PARSE ARG name
select
when name="Paul"THEN DO
name="Paul Smith"
END
when name=="Robert"THEN DO
name="Robert Smith"
end
otherwise nop
end
RETURN name
EXIT
I worry when I get messages, I cannot have this Rexx fail on me. I spent a long time Googling this message but I did not get any clarification, any advice is much appreciated!
Thank you!
IRX0026I Error running R12, line 129: Invalid whole number
My code:
n="Paul"
n = mobile(n)
say n
mobile:
PARSE ARG name
select
when name="Paul"THEN DO
name="Paul Smith"
END
when name=="Robert"THEN DO
name="Robert Smith"
end
otherwise nop
end
RETURN name
EXIT
I worry when I get messages, I cannot have this Rexx fail on me. I spent a long time Googling this message but I did not get any clarification, any advice is much appreciated!
Thank you!