The struggling grocery chain told employees Friday morning that it plans to discontinue pharmacy operations and has sold customer prescription files to a national drug store chain.

Marsh Supermarkets told employees Friday morning that it will close all in-store pharmacies on Wednesday, the latest effort by the struggling grocery chain to cut costs amid declining market share.

Locally based Marsh operates 37 pharmacies in its 64 stores, including one at its Marsh Hometown Market, 3075 E. 25th St., in Columbus, according to its website.

As part of its decision to stop providing pharmacy services, the company has sold customer prescription accounts to Woonsocket, Rhode Island-based CVS.

A Marsh spokesman didn’t respond to messages seeking comment. But CVS confirmed Friday morning that it has agreed to acquire the prescription records and pharmacy inventory from the 37 Marsh pharmacies in Indiana. The files will be transferred to nearby CVS locations between Wednesday and Friday.

“CVS and Marsh will work together to ensure that pharmacy patients experience a seamless transition with no interruption of service,” CVS spokesman Mike DeAngelis said via email.

Each Marsh store will have signage informing customers of the nearest CVS location, DeAngelis said, although any CVS pharmacy will fill prescriptions for Marsh customers.

CVS’ purchase of Marsh prescription accounts follows its acquisition in December 2015 of Target’s pharmacy and clinic businesses for about $1.9 billion. CVS obtained Target’s 1,672 pharmacies across 47 states and operates them through a store-within-a-store format, branded as CVS Pharmacy. Target’s 79 clinic locations were rebranded as Minute Clinic.

Marsh’s internal announcement Friday to exit the pharmacy business comes after the grocery chain earlier this month said it would close more stores in May.

Marsh Supermarkets, founded by the Marsh family in 1931, has struggled to compete in recent years with larger chains such as Kroger, Meijer and Walmart—making its stores less attractive to potential buyers.