Depends on why you have the anemia. But yes, pernicious anemia is very serious and you need the shots as long as the doctor decides, it's often caused by a problem that can't heal itself, like that your body can't use dietary B12 properly (why you can't take a pill for it, have to have injections).
http://www.webmd.com/a-to-z-guides/v...topic-overview