My car runs and shuts then off completely without any warning. on 1998 Saturn SL1

It was sitting for six months, we replaced the battery and it fired right up, it seems to purr and drive good until it just shuts off. It did it before it was sitting for six months and does it still.
Could there be something in the fuel tank clogging, or the fuel relay be broken? When i try to start it again after it shuts off it wont only trys to start.

Asked by for the 1998 Saturn SL1
How long does it run before it shuts off? It could be so many things, you would need to verify if the engine looses spark or fuel. If it shuts off and immediately cranks over strongly, head lights are bright then the battery and charging system are likely to be OK. One thing to check if the engine seems to "load up and falter" before it stalls is make sure rodents have not built a nest in the air filter housing during the time the car was laid up, have seen this several times.
1 more answer
Have alternator tested it sounds like this is the problem.