I saw the following documentation in Splunk:
https://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Installdatabasedriv
This said that: "IBM DB2 is supported when the database is running on Linux. Splunk doesn't test or support DB2 on AS/400 or Windows."
Is there a solution for that?
That is a solution. Use a Linux box.
You can literally install Ubuntu or RH into Windows now - I have (and do in a testing environment) run Splunk that way and while it's not ideal, it works fairly well. I don't know for sure it would work with DB Connect, but I see no reason it wouldn't, and if it doesn't you are only out a little time.
Or, a small VM big enough to be an HF and run DB connect and send the results to your indexers. Depending on the data sizes involved, that's probably just 2-4 cores on a 4-8 GB VM. (Don't take that as gospel, you might get away with quite a bit less, it might take a bit more, but it shouldn't be onerous requirements).
Also - "doesn't test or support..." doesn't mean it won't actually work. You could try it on Windows and see. You'll have to make the decision if it's worth running 'unsupported' software for this. You can always ask for help here, but ... AS/400, DB2 ... there's only a few folks doing that that I know of.