1 EXHIBIT 5.1 [COOLEY GODWARD LLP LETTERHEAD] September 19, 1997 DataWorks Corporation 5910 Pacific Center Blvd. San Diego, CA 92121 Ladies and Gentlemen: You have requested our opinion with respect to certain matters in connection with the filing by DataWorks Corporation (the "Company") of a Registration Statement on Form S-3 (the "Registration Statement") with the Securities and Exchange Commission (the "Commission") covering the offering of 417,185 shares of the Company's Common Stock to be sold by a certain shareholder, as described in the Registration Statement (the "Common Stock"). In connection with this opinion, we have examined and relied upon the Registration Statement, the Company's Amended and Restated Articles of Incorporation and Amended and Restated Bylaws and the originals or copies certified to our satisfaction, of such records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. On the basis of the foregoing, and in reliance thereon, we are of the opinion that the Common Stock, when sold in accordance with the Registration Statement, will be validly issued, fully paid and nonassessable. We consent to the reference to our firm under the caption "Legal Matters" in the Prospectus included in the Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, COOLEY GODWARD LLP /s/ THOMAS A. COLL Thomas A. Coll, Esq.