How would you make a patch cord to go from a 220V 30-amp 4-wire generator to run a 220V 20-amp 3-wire portable compressor?

Identify the neutral wire on the generator. This will be the unused conductor to run the compressor. The ground and line1, line 2 are all that are needed.