ksh case problem

I'm trying to run a ksh script with a case condition to handle parameters.

#!/bin/ksh
db_start(){
*code
}
db_shut(){
*code
}

case "$1" in
    up)
       db_start TRNG
        ;;
    down)
        db_shut TRNG
        ;;
    *)
        echo "Usage: $0 { up | down }"
        ;;
    esac

Why is it that when I run the program without passing any
parameters (such as up, down), the program executes the first function (db_start TRNG) it comes to. It should display the echo info. What is wrong with my syntax?

I tried your code and I get the usage message if I don't supply a parameter.

I tried your code and it works as required.

thanks...i just copied the script to another name and now it works for some reason.