There is no need to send multiple PMs, when someone gets the time, they will help.

First thing I see, it looks like you copy/pasted from at least two different programs, but that was it. You did not do any re-write to make them work. The duplicate "END"s is what I am getting at.

Next,
then it prompt the user to enter high setpoint
You say the program does this, but I do not see where.

Then I do not see where the code goes from the main loop to the keypad routine.

Without doing a complete re-write for you, I will suggest that you work on one thing at a time. Maybe start with the keypad. Get it working, then move on to saving a value.

Do not try to write the whole thing at once and then try to figure out where it went wrong.

I normally use a shift register for keypads, so if you want to do it the way you have it, go back and read http://www.picbasic.co.uk/forum/showthread.php?t=3250

That should get you going there. Then we can work on saving a value.