Whatever you're doing, there's a pretty good chance you're doing it wrong based on the way you framed this question. If you found a blog post somewhere telling you that you needed to do this-or-that, don't just follow it without really knowing what it says. The reason why I say this is because most of the features you've asked for have nothing to do with creating a self-signed DSA certificate.
Instead, post a question asking about what you're actually trying to accomplish. It may be that the solution is not what you think it is.
But since you asked, here's how you generate a self-signed DSA certificate of 3072 bits:
openssl dsaparam -out params.pem 3072openssl gendsa -out key.pem params.pemopenssl req -new -key key.pem -out req.pemopenssl x509 -req -in req.pem -signkey key.pem -out certificate.cer