I need to extract the $25,000 value before increments in the above text. I know i have to move this value to an array n search for the 3rd $ and take the next numeric value.
But is there any sub-routine or any function like inspect etc which extracts the values based on the $ and i can use it in short.
Joined: 06 Jun 2008 Posts: 8201 Location: Dubuque, Iowa, USA
Your "explanation" is as clear as mud. "$25,000 to $100,000 in $25,000 increments" is not a requirement -- it's not even a specification, but merely part of a specification. Increment how -- in a loop? Is the variable numeric or numeric edited or alphanumeric or what? What "3rd $" are you going to search for? What are you storing in the array (which is called a TABLE in COBOL, by the way)? Is there a key to search on? And the questions go on and on and on ...
Start all over. Post a clear and concise statement of what you want to accomplish, what you have done so far, and what is not working for you. Have a coworker or friend read your statement BEFORE you post it. If that person does not understand what you are writing without your saying a word, rewrite it until they do understand -- because we won't have anything but what you write to go by.
Based upon the garbage you've posted so far, INSPECT or FUNCTION NUMVAL could be possible solutions, but who knows for sure since you've not described anything remotely like an issue you are trying to solve.