For a more compact and maybe easier to code the command and data be at defined length.

So command 9 would be 09 and data 9 (this is extreme but for the sake of discussion) would be 00009.

So there is no need for extra termination character.

Also I think word or long variable may not be helpful here. Better an array, since the data are distinct in meaning so a 433925 would mean 433,925MHz in reality as an absolute value.

The beeps would help user to step with confidence entering the commands and data.

I think stuffing an array and then select case is the way to do it.

Ioannis