I was just absolutely convinced I had lung cancer, and the doctor basically said that if I had symptoms that were that bad, I'd be in hospice care. So, if you've had this pain for that long, you don't have lung cancer! I get those stabbing pains you describe. Sometimes it's a spastic colon, other times I think it's just muscle or nerve pain. It's happened my entire life, sometimes to the point where I can't even breathe in or out for a few seconds. So don't worry! It's totally the anxiety.
Also, do you smoke? If not, your chances of having lung cancer are exceedingly low. If you do smoke, quit and your chances will drop every day thereafter.