Casimir invariants and characteristic identities for generators of the general linear, special linear and orthosymplectic graded Lie algebras