If all those spaces are consistently in the place you show them, use the >> operator when reading the file. It will read everything between the spaces, one set at a time.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
But I want the strings only after EXEC and before END-EXEC... ie from POLICY_NO to CAN_PROCESSED...
So read the strings up to EXEC and don't do anything with them.
Then read the strings up to END-EXEC and use them.
Hint: two loops.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944