By surface analysis, im (“in the”) + allgemein (“general”, adjective). Allgemeinen can be viewed as the substantivized dative form of allgemein.
im Allgemeinen