Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

finding numeric value in a string in rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: finding numeric value in a string in rexx
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Wed Jun 11, 2008 10:59 am    Post subject: Reply to: finding numeric value in a string in rexx
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

Site Director


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

PostPosted: Wed Jun 11, 2008 11:34 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Wed Jun 11, 2008 12:05 pm    Post subject: Reply to: finding numeric value in a string in rexx
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    Post subject: Re: Reply to: finding numeric value in a string in rexx
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Wed Jun 11, 2008 2:09 pm    Post subject: Reply to: finding numeric value in a string in rexx
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 0 Tue Jun 27, 2017 2:06 am
No new posts REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us