I think that I have understood what you require. But before that let me point out that your do doesn't have an associated while.

If all that you wish to do is to print an appropriate message when...