You have more than 1 option, and we find that there is no one size fits all solution.
If you know the company ticker symbols, our CRSP Names Tool is a good starting point.
A 'Method 2' input file with one row per ticker would be as shown below, with Company names simply added for your own reference (the tool will only read the first column until it finds a space.)
AAA AAA Incorp
GE General Electric
Each matching CRSP PERMNO can then be linked to Compustat GVKEY using the CRSP/Compustat Merged tables. Note you can find more than 1 linked Ticker Symbol, and it is rare that 100% of your cases will be matched.
If you only have the 'Name', this tool can not be used. But we do have a more general Company Search. See WRDS Dataset Tools. This tool can also be used to find cases not matched by Ticker Symbol, or to either find or verify a CRSP-PERMNO to Compustat GVKEY link.
In this case, you will need to enter each of the Company Names one at a time and probably need to study each screen of results to determine the right match. (We recommend simply using a sheet of paper to write down the matching GVKEY, PERMNO, CUSIP etc, or either cut and paste or type directly into an EXCEL spreadsheet next to each name)
Finally, a SAS program could be written to effectively perform the same type of Company name search as a loop, with a selection of the 'best' match.
In several cases, the 'Company Search' option might be the best, although potentially time-consuming. Writing a custom SAS program for a handful of cases is usually not worth the effort, but would be recommended for 200 or more cases.