That's interesting. Thanks! I did think of what CUSE would be perfect for: what I know as "vertical compression" but Google does not seem to know the term. Think of standard run length compression as "horizontal." Picture something like that, but where a code indicates "the next 'n' bytes of this record are identical to the bytes in the same position in the previous record." Only works for sequential files, because you need the previous record to decode this records. But works well where there are a lot of repeating fields.
Charles -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Wednesday, March 14, 2018 10:56 AM To: [email protected] Subject: Re: Two string instruction questions On 2018-03-14, at 09:51:22, Charles Mills wrote: > 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? > BTW, the classic technique is Boyer-Moore. But see: https://en.wikipedia.org/wiki/String_searching_algorithm This might easily be done in microcode. And I once coded a case-insensitive variant of Boyer-Moore. -- gil
