A screenshot of your code might help find the problem. I am guessing something is wrong with how you are reading PUNCH$ from the keyboard.