in reply to Re^2: IF and GREP Question
in thread IF and GREP Question

"That will not work because the NB_FILE handle will exhaust the records in the first loop."

The OP has not provided sufficient information for you to make that statement.

I stated what I didn't know as well as the assumptions I had made.

For all you or I know, that first "..." contains an open statement which reuses the NB_FILE filehandle. The for loop was a stated assumption; perhaps the code doesn't look like that at all; perhaps it's in a subroutine which opens the NB_FILE filehandle every time it's called.

Anyway, the point is now moot: the OP's subsequent response ("Thank you sir, the code worked great!") rather suggests you're wrong.

-- Ken