IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

finding numeric value in a string in rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Jun 11, 2008 10:49 am
Reply with quote

How do u find a numeric value in a string say

abc pic x(20)

watif i just wanted 20?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 11, 2008 10:59 am
Reply with quote

if instead of asking single questions Yo' d tell what You want to do
You might get better answers
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 11, 2008 11:34 am
Reply with quote

Hello,

Quote:
abc pic x(20)
What if this was abc20 pic x(20).

As Enrico mentioned, it will be better if you take some time and clearly describe what you are trying to accomplish rather than dumping one disconnected question after another as new topics.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Jun 11, 2008 12:02 pm
Reply with quote

what i want is to fetch the value in pic x(20).. i want to determine and display the pic value of the defined variable.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 11, 2008 12:05 pm
Reply with quote

OK go ahed , You still did not explain what You are trying to do..
I' ll try to infer it from You scarce info...
12.gif

given a cobol copybook describing a record
You want to move to the rexx variables with the proper name the record content

right ?

learn to explain Your requirement better

and do not post questions related to the same issue in multiple topics
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Jun 11, 2008 1:57 pm
Reply with quote

enrico-sorichetti wrote:
OK go ahed , You still did not explain what You are trying to do..
You want to move to the rexx variables with the proper name the record

and do not post questions related to the same issue in multiple topics



i did not get wat is sadi above....all i want is to get the value 20 in pic x(20)...ok let me come to your understanding.....say i have
a string name pic x(20)...is there any way i can retrieve the value 20...any inbuilt function???????????????????????????? icon_eek.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 11, 2008 2:09 pm
Reply with quote

Quote:
You want to move to the rexx variables with the proper name the record


the line was an inference from Your unclear posting style

for the topic tile the question is still badly posed

You do not want to find a numeric value, You want to parse a token within parentheses

here is a snippet

Code:
string = "zzz pic x(20)"
parse var string ."(" token ")" .
say token


will not work for a string with a different layout and for a different requrement
I' ll leave to You as an exercise to find and use the proper rexx builtin function to determine if the token is numeric or not

Quote:

...ok let me come to your understanding.....say i have
a string name pic x(20)...is there any way i can retrieve the value 20...any inbuilt function????????????????????????????


no need to assume that patronizing attitude ...
I am perfectly capable of understanding a simple requirement like that
and implement it
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Jun 11, 2008 2:21 pm
Reply with quote

thanx a lot buddy...iam sorry.hope to be clear from next time
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top