User's Guide for converting CUSIPs to 6-digit CUSIPs or 8-digit CUSIPs using cusiper program |
|||
| About the program | |||
| Title: | cusiper | ||
| Description: | Prefix zeros to CUSIPs whose preceding zeros were truncated in MS Excel, and then 1) Convert 6-digit CUSIPs to 8-digit CUSIPs for CRSP, I/B/E/S and Execucomp. 2) OR keep it as 6-digit CUSIPs for Compustat. 3) OR from 8-digit CUSIPs from, say, Thomson, to 8-digit CUSIPs with leading zeros and replaced zeros for last digit. 4) OR from 8-digit CUSIPs to 6-digit CUSIPs. |
||
Important things to remember:
If you encounter any problems, please contact Bobray Bordelon at bordelon@princeton.edu.
|
|||
Here are steps to convert CUSIPs |
|||
| Step 1: Download the cusiper program | |||
If you didn't download the cusiper program yet, please go to http://firestone.princeton.edu/econlib/cusip/cusiper.wsf Note: DON'T double click the file, or it will execute and display an error message. Please right click on the URL to save the file to your local computer, e.g. your H: drive. DON'T save the file to My Documents, desktop, or any folders with names that are longer than 8 characters. |
|||
Example: In this example, I saved my cusiper program in H:\cusip folder on my computer. So the path of the cusiper program is H:\cusip\cusiper. But if you save it in difference folder or drive, for example, Z drive thesis folder, then the path of the cusiper program is Z:\thesis\cusiper. Here is content of my6cusip.txt that I want to convert, which is in folder C:\temp. I suggest you saving your CUSIP file in the same folder as the cusiper program to reduce errors. BE SURE to include .txt in the command, such as H:\cusip\cusiper C:\temp\my6cusip.txt
|
|||
| my6cusip.txt | 3.b Converted 6-digit CUSIPs using command: H:\cusip\cusiper C:\temp\my6cusip.txt /digflag:6to6 |
3.a Converted 8-digit CUSIPs using command: H:\cusip\cusiper C:\temp\my6cusip.txt |
|
|---|---|---|---|
387472 90921V 172529 402734 577767 30405 423666 440327 64938P 78074G 344912 518074 74371R 49513 320103 75086K 892335 37857 461142 69514V 701645 37564 |
![]() |
387472 90921V 172529 402734 577767 030405 423666 440327 64938P 78074G 344912 518074 74371R 049513 320103 75086K 892335 037857 461142 69514V 701645 037564 |
38747210 90921V10 17252910 40273410 57776710 03040510 42366610 44032710 64938P10 78074G10 34491210 51807410 74371R10 04951310 32010310 75086K10 89233510 03785710 46114210 69514V10 70164510 03756410 |
Step 2: Go to Start -> Run, then type in “cmd” in the box and click OK.
|
|||
Step 3: a. Command to convert 6-digit CUSIPs to 8-digit CUSIPs: [path of cusiper program]cusiper [absolute path of your .txt file to convert from] Type the command H:\cusip\cusiper C:\temp\my6cusip.txt after the > and press enter |
|||
b. Command to convert 6-digit CUSIPs to 6-digit CUSIPs [path of cusiper program]cusiper [absolute path of your .txt file to convert from] /digflag:6to6 Note: /digflag:6to6 is exactly what it should be typed in the command line Type the command H:\cusip\cusiper C:\temp\my6cusip.txt /digflag:6to6 after the > and press enter Example of results is displayed in table above for comparison. |
|||
|
|||
| Another example for convert 8-digit CUSIPs from, say Thomson Financial, to proper 8-digit CUSIPs by restoring leading zeros and replace last digit with zero. | |||
| my8cusip.txt | c. Converted 6-digit CUSIPs using command: H:\cusip\cusiper C:\temp\my8cusip.txt /digflag:8to6 |
d. Converted 8-digit CUSIPs using command: H:\cusip\cusiper C:\temp\my8cusip.txt /digflag:8to8 |
|
88610 |
![]() |
000886 000912 000914 000937 000973 000975 001055 001084 001204 001250 001547 001674 001693 001765 001853 001957 M87915 N07045 N07059 N19808 N20935 N22717 N50919 N5424G N6748L N72482 P8797T V7780T Y02516 |
00088610 00091210 00091410 00093710 00097310 00097510 00105510 00108410 00120410 00125010 00154710 00167410 00169310 00176510 00185310 00195710 00195720 M8791510 N0704510 N0705910 N1980810 N2093510 N2271710 N5091910 N5424G10 N6748L10 N7248210 P8797T10 V7780T10 Y0251610 |
c. Command to convert 8-digit CUSIPs to 6-digit CUSIPs with leading zeros and last digit truncated [path of cusiper program]cusiper [absolute path of your .txt file to convert from] /digflag:8to6 Note: /digflag:8to6 is exactly what it should be typed in the command line Type the command H:\cusip\cusiper C:\temp\my8cusip.txt /digflag:8to6 after the > and press enter |
|||
d. Command to convert 8-digit CUSIPs to 8-digit CUSIPs with leading zeros and replaced zeros for last digit [path of cusiper program]cusiper [absolute path of your .txt file to convert from] /digflag:8to8 Note: /digflag:8to8 is exactly what it should be typed in the command line Type the command H:\cusip\cusiper C:\temp\my8cusip.txt /digflag:8to8 after the > and press enter Example of results is displayed in table above for comparison. |
|||
You will see a popup box with message “New CUSIPs file: NEWCUSIPS.txt was created successfully! NEWCUSIPS.txt will be in the same folder in which you ran the program, which is the folder before > when you entered the command line. If you couldn't find it, do a search for NEWCUSIPS.” when conversion is finished. NEWCUSIPS.txt is the output file that has 8-digit or 6-digit CUSIPs. NEWCUSIPS.txt will be in the same folder as you ran the cusiper program, which is the path or folder before > when you enter the command line. For example, in step 3.a of the first example below, the path before > is C:\Documents and Settings\jianbai, then NEWCUSIPS.txt will be in that folder, not where you saved the cusiper program. But for step 3.b, the path before > is H:, then NEWCUSIPS.txt will be in the root of H: drive, not where you saved the cusiper program. I encourage you run the program from the same folder where you saved it to avoid confusion. Please read the message on the pop up message box to find out where NEWCUSIPS.txt is. If you couldn't find it,just do a search for file named "NEWCUSIPS". |
|||
Good luck!