[Migrated content. Thread originally posted on 07 December 2009]
Hi,Using INSPECT statement to search a record for exact text works like:
77 my-field pic x(100).
INSPECT my-field TALLYING mycounter FOR all 'test'
if the word 'test' exists in my-field, the mycounter will be incremented by 1.
this works fine.
But mycounter is never incremented by 1 when using the statement like:
77 my-field pic x(100).
77 my-search-field pic x(10).
inspect my-field TALLYING mycounter FOR all my-search-field
where my-seach-field is a data-field in the WS contains what the user types.
I've tried to replaces all the trailing spaces in my-search-field by Nulls but it didn't work also.:mad:
Any tips?
Thanks



