View previous topic :: View next topic
|
Author |
Message |
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
I need to find the number of occurance of '&' in this string.
'&HLQV&VER&SYS..POST20.TEMP.LTRQ.CLUSTER'
Is there any command available or can any one help me in doing it. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Code: |
/* REXX */
thevar = '&HLQV&VER&SYS..POST20.TEMP.LTRQ.CLUSTER'
cnt = 0
Do n = 1 To Length(thevar)
If Substr(thevar,n,1) = '&' Then cnt = cnt + 1
End
Say cnt
thevar = Translate(thevar,' ','&')
Say Words(thevar)
Exit
|
|
|
Back to top |
|
|
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
thank you very much ... |
|
Back to top |
|
|
|