View previous topic :: View next topic
|
Author |
Message |
csai1987
New User
Joined: 18 Jul 2011 Posts: 3 Location: chennai
|
|
|
|
Hi!
I have string called 'male'.here i need to know how many male candiates are in this member. Thanks in Advance
[/Search] |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Csai,
Your Question doesn't make sense. can you rephrase it. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What have YOU tried already.
This can be accomplished by a basic ISPF command.
Either in batch or foreground. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
a badly posed question just deserves a generic reply
in ISPF browse/view/edit just issue the command ...
Code: |
FIND <Yourstring> ALL |
You will get back a short and long messages telling how many time the <thing> was found
Code: |
EDIT ENRICO.ISPF.EXEC(ARGS) - 01.01 2 WORD 'PARSE'
Command ===> f Parse word all Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /* */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "O"
000005
000006 Parse Source _sys _how _cmd .
000007
000008 Parse arg args
000009 strdel = left(args,1)
000010 strstr = 2
000011 if verify(strdel,"""'","M") = 0 then do
000012 say "no starting string delimiter"
000013 exit
000014 end
000015 strend = pos(strdel,args,strstr)
000016 if strend = 0 then do
000017 say "no ending string delimiter"
000018 !—————————————————————————————————————————————————————!
000019 end ! WORD 'PARSE' - found 2 times within columns 1 to 80 !
000020 str !—————————————————————————————————————————————————————!
000021 string = substr(args,strstr,strlen)
|
|
|
Back to top |
|
|
csai1987
New User
Joined: 18 Jul 2011 Posts: 3 Location: chennai
|
|
|
|
Hi enrico-sorichetti,
After your valuable reply i got the good solution for my query.
Thanks |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
But if you have:
and you do
then you have 2 hits!
So you should use:
|
|
Back to top |
|
|
|