Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
I ran a trace of the following logic. I was looking for blank, blank, blank, SORT FIELDS=COPY in positions 1 through 19. REXX found blank SORT FIELD=COPY and called it a match. I know I can change the starting position and fix the issue, but when looking for 3 blanks and and some fixed characters, why would it match to a single blank, SORT FIELD=COPY followed by two other blanks? It just seems like it should be exact.
For all the other comparison operators, if both terms involved are numeric, a numeric comparison (in which leading zeros are ignored, and so forth—see “Numeric comparisons” on page 188) is effected. Otherwise, both terms are treated as character strings (leading and trailing blanks are ignored, and then the shorter string is padded with blanks on the right).
The strict comparison operators all have one of the characters defining the operator doubled. The ==, \==, /==, and ¬== operators test for an exact match between two strings. The two strings must be identical (character by character) and of the same length to be considered strictly equal.
So. . .to test for EXACT equality you have to double the = sign - i.e.