Algebraic structure of codes over Fq , closed under arbitrary abelian group G of permutations with exponent relatively prime to q, called G-invariant codes, is investigated using a transform domain approach. In particular, this general approach unveils algebraic structure of quasicyclic codes, abelian codes, cyclic codes, and quasi-abelian codes with restriction on G to appropriate special case...