According to John Ehrman's "Assembler Language Programming for IBM System zT
Servers Version 2.00," the CUSE instruction searches only for matches at the
same offset.  In the case you describe, it would not find a match unless the
second string was "xxxxis" so that the word you are looking for is at offset
4 in both strings.

> -----Original Message-----
> From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
> On Behalf Of Charles Mills
> Sent: Wednesday, March 14, 2018 8:51 AM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Two string instruction questions
> 
> 1.       Is there a machine instruction that will find one string within
> another? That given "Now is the time" and "is" would find the "is" and
> return a pointer to it? A machine instruction analog of Rexx POS?
> 
> 2.       Searching the PoOp for such an instruction led me to CUSE. It
does
> not seem that CUSE could be used for this - is that correct? If I am
reading
> CUSE correctly, then given "Now is the time", "All is well" and 2 or 3
would
> return the position of "is". Is my reading correct? What would that be
good
> for? What would be a reasonable real-world use?

Reply via email to