You are creating dynamic sql to change the password.
How do you expect the password to get changed if the command soen't get spool to the screen?

What about creating a procedure to change the password with an execute immediate?