Thanks. It s working. But i dont want the record to o/p file for the following case.
BICKFO RD ALFRED
Here the length of name BICKFORD ALFRED is 15 and there is no occurence of X'0040' within that length. After that i dont want to check for X'0040'. So i want to check the condition X'0040' only within the name. For each record the length of the name may change. The maximum length is 30.
For each record the length of the name may change.
And what exactly is the "rule" for determining the length of the name (that is, where the name ends)?
Here the length of name BICKFORD ALFRED is 15
And how can we determine that programmatically? What indicates that the name ends after 15 characters?
I gave you a solution based on what you told me. Was I supposed to read your mind to know that the names "end" based on some "rule" that you didn't tell me about and still haven't explained? In the future, please try to describe your "requirement" completely in your first post to save us all time.