The nonlinear optical properties of semiconductors near an excitonic resonance are investigated theoretically by using the macroscopic J model [Ostreich and Knorr, Phys. Rev. B 48, 17811 (1993); 50, 5717 (1994)] based on the microscopic semiconductor Bloch equations. These nonlinear properties cause modulational instability of long light pulses with large gain and give rise to a self-induced transmission of short light pulses in a semiconductor. By an example of the latter well-studied effect, the validity of the used macroscopic model is demonstrated, and good agreement is found with both existing theoretical and experimental results