Just because your ancestor never served does not mean there isn't some kind of military record on him.
The Civil War, for example, used a draft. My great-great-great grand-uncle, David Still, never actually served. Yet, he did register. He is included on the Consolidated List of persons subject to military duty in East Fallowfield, Chester County, PA.
This record shows it was written up in June 1863. At that time he was 40 years old. The draft registration also confirms (since I already knew) that he was a white farmer born in Pennsylvania. There is a spot for notes or an indication of military service. He does not have any notes, nor was he sent.
An interesting note though about the draft is that if you had the means, you could send a substitute in your place. In this image, notice the two names with notes: John D. Shingle and William Sheeler. Both men have the note "Drafted. Sent substitute" included.