Peter,
You're welcome.
>Sergey,
>
>Thank you for your help.
>
>It works like a charm. Had a hard time getting the CLEAR on the mainframe to work, no documentation available, but in the end got it right.
>
>For anybody else with a similar problem, here's a snippet of the code.
>
<snip>>
>
--sb--