They can do a urinalysis to make sure the kidneys are okay, which occasionally urine can back up into the prostate
and cause pain. There are a million things a doc can test for if he's got the symptom of constant anal pain, especially when standing.
Dear Basman and Berry:
Please see the star* portions of the below points I make. You two may both have an anal abscess of some kind, and I think you should both pursue this idea, as it can get fairly serious if left untreated.