I need to get hashed value with rotine and I dont knoe exactly how keys in hashed value separated .
I try HashKey=Key1:@TM:Key2
and i isnt work .
Any ideas ?
Hashed file key separation
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Variable names are case sensitive.
You have assigned a value to ANS, but the routine wants to return Ans.
You must use Ans throughout (because you can not change the RETURN(Ans) function).
You have assigned a value to ANS, but the routine wants to return Ans.
You must use Ans throughout (because you can not change the RETURN(Ans) function).
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.
Hi,ray.wurlod wrote:Variable names are case sensitive.
You have assigned a value to ANS, but the routine wants to return Ans.
You must use Ans throughout (because you can not change the RETURN(Ans) function).
Sorry Ray but I beg to differ regarding the must use Ans part.
There is no limit on using your own RETURN(ANS) as long as the ANS variable was assigned a value (or using any other variable/constant in a RETURN(x) command).
I do agree that this was not what the writer intended and should have used Ans.
For clarity,readability and maintainability I recomend using the standard Ans variable for returned value from routines.
As Ray said DS Basic is case sensitive.
It also demands that any use of variables not being assigned must be previously declared or assigned a value.
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you rely on the generated RETURN(Ans) function, which lives in a little greyed-out area at the bottom of the Routine, you can't change it.
Roy is correct in that you can make it redundant by preceding it with your own. However, the problem as originally posted was that ANS was not being assigned a value. It was based on this error message that I posted my solution.
Roy is correct in that you can make it redundant by preceding it with your own. However, the problem as originally posted was that ANS was not being assigned a value. It was based on this error message that I posted my solution.
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.