Read the publication:Ring-opening polymerization of lactams. Living anionic polymerization and its applications. http://www.sciencedirect.com/science/article/pii/S0079670000000186
Linear amide from lactam with carboxylic acid can obtained by heating lactum with ammonia in aqueous ethanolic solution.. Ring opening occurs to get open chain linear amide.