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

Need to find the starting position of the 2nd word


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jun 04, 2010 3:18 pm
Reply with quote

donateeye,

your code presupposes the knowledge of the first word in the string.

My interpretation of Sundardudos's requirement is:

find the position of the second word in any string,

I find that enrico's solutions provide that info
Actually, they provide a complete answer to an unasked question:

what are the starting and ending positions of all words in a string.

If Sundardudos only wants to know the attributes of the second word,
he can modify enrico's code.

using your code, you would have to add a routine to run previous that
would extract the first word.

Now, analyzing the complete string (all the words),
is something that is often done -
but, if for some reason, the TS only wants the 2nd,
truncating enrico's code will provide the info.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 04, 2010 3:20 pm
Reply with quote

Hi Robert
Quote:
Why doesn't anyone mention "VERIFY", now with the option of starting in the middle of the string?


because the manual version I was looking at did not have the 3 args version

and I would have had anyway to use a trick icon_biggrin.gif
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Fri Jun 04, 2010 4:47 pm
Reply with quote

Yes, Sundarkudos has clear said

If the first word in the source is xxxxxx then...

which clearly means that he should be aware of the first word...

considering that, the code just needs to find only the starting position of the second word.

Interesting is that, the man who started this topic is no where here to read all the suggestions and codes for him....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jun 04, 2010 5:00 pm
Reply with quote

donateeye,

you are pounding sand.

one assumes the program is to handle more than one input,
thus the first word is not always known.

enrico and the other seniors do not write code for simple accept/display cobol programs.
their examples are an attempt to drag those
with little experience
out of the dark chasm of ignorance that they seem to reside
and provide insight to the world of professional programming.
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Fri Jun 04, 2010 5:12 pm
Reply with quote

well.... you are right.... My apologize to enrico....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jun 04, 2010 5:29 pm
Reply with quote

donateeye wrote:
well.... you are right.... My apologize to enrico....


if that is sincere,
then I take back my comment about your membership and maturity.

have a good weekend.
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Fri Jun 04, 2010 5:36 pm
Reply with quote

It is serious icon_smile.gif

Happy weekend everyone.... icon_wink.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 04, 2010 5:40 pm
Reply with quote

OK I' ll clean up the topic from the unpleasant remarks icon_biggrin.gif
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 -> PL/I & Assembler Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
Search our Forums:

Back to Top