Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
You can use the POS function in REXX.
CHK = POS('???',FIELD)
IF CHK > 0 THEN DO......
There are two parameters for POS. The 1st parameter is the pattern you are searching for and the 2nd parameter (in your request) would be the variable representing the sequence numbers. If the CHK variable is greater than zero, it found what you were looking for. The valued of the variable CHK is equal to the position of the sequence number where it found a match.
X = POS('DAY','SATURDAY')
In this example, X would have the value of 6, the position in SATURDAY where the word DAY is found.