You are on page 1of 12

FTP GUIDE

Updating CRSP Products Using File Transfer Protocal

Updated August 31, 2009

105 West Adams, Suite 1700 Chicago, IL 60603 Tel: 312.263.6400 Fax: 312.263.6430 Email: Support@crsp.ChicagoBooth.edu

ConTEnTs
Chapter 1: Using File transFer protoCal .............................. 5 IntroductIon. ..............................................................................................5 . FtP.oPtIons.....................................................................................................5 downloadIng.the.uPdate.......................................................................5 InstallIng.the.uPdate...............................................................................7 Post-InstallatIon........................................................................................8 troubleshootIng........................................................................................9

appendix a: installation ......................................................... 10 automated.database.uPdate:.InstallatIon.For.wIndows.XP system.requirements.................................................................................. 10 creating.the.scheduled.task........................................................................ 10 setting.the.scheduled.tasks.Properties....................................................... 12 Performing.an.example.run....................................................................... 13 contact.Information................................................................................... 13

ChaPTEr 1: UsInG FIlE TransFEr ProToCal


introdUCtion This guide describes how to download updates to your CRSP products using FTP or File Transfer Protocol. FTP is a widely used method of transferring files between networked computers. Unlike database updates delivered on DVD, FTP updates are executable files combining new data with an installer program. They are not full database replacements but contain only the information that has changed, which the installer merges into your existing database. There is no need to create a copy of your existing database before installing. The update creates an entirely new database, leaving the existing one intact.
Command binary hash desCription Files can be transferred in either ASCII or binary mode. CRSP database updates must be downloaded in binary mode. This command prints a # symbol for every chunk of data transferred. For large files, this can be a helpful visual cue that a download is still in progress. The command get filename tells the server to begin transferring the file you specify. Like get, but you can specify a list of files to be transferred. For example, mget filename1 filename2 filename3. By default, the mget command asks for confirmation before transferring each file that you have specified. The prompt command toggles this behavior on or off. Log out of the FTP server

get mget prompt

bye

downloading the Update Ftp options There are many FTP client applications available for Windows, Linux, and Solaris. This guide describes how to download a database update using Windows XPs builtin FTP client or a standard command-line FTP program available under Linux or Solaris. If you are familiar with FTP and prefer a different client, there is no reason not to use it instead. Verify if you do so that the client is configured to transfer files in binary mode. Note: Screenshots in this guide are taken from an installation on a Windows XP computer. Differences related to Linux and Sun Solaris are noted throughout the text. Below is a table showing some of the commands typical FTP clients understand. An example FTP session in the next section, Downloading the update, illustrates how to use the commands you will need.
Command user dir desCription If you mistype your username or password, you will be sent to the ftp> prompt. Type user to try logging in again. This command shows a list of all the files in the current directory.

steP.1:..oPen.a.wIndows.command.PromPt windows:. Windows XPs built-in FTP program runs from the Command Prompt. From the Start Menu, click Run In the Run windows text box, type cmd <enter> to open a new Command Prompt window.

linux.or.sun.solaris: Open a new xterm or other terminal emulator window. steP.2:..navIgate.to.your.crsP.data. dIrectory windows:. By default, CRSP database updates are installed in the directory C:\crspdata. Move into that directory by typing cd c:\crspdata <enter> in the Command Prompt. If you have chosen a different location to store database updates, enter that directory path instead.

Crsp Ftp gUide page 4

linux.or.sun.solaris:. The default directory for data installation is $HOME/crspdata. Type cd $HOME/crspdata at your command prompt to enter the directory. Note that you must have write permissions to the directory where your update will be downloaded. steP.3:..connect.to.the.crsP.FtP.server Windows, Linux, and Sun Solaris: Once in the data directory, connect to CRSPs FTP server by typing ftp 38.112.41.27 <enter>. When you have connected to the server, you will see a short welcome banner and be asked to log in. Enter the username and password provided by CRSP. After successfully logging in you will see the ftp> prompt, indicating that the FTP server awaits your commands.

Database update filenames follow a naming convention to differentiate among supported platforms. For example, if you are downloading the A6Z 200602 update, find your platform in the following table to see the correct filename format.
platform Windows XP Linux Sun Solaris filename a6z1_200602_dwf.exe a6z1_200602_drf.bin a6z1_200602_dsf.bin

5 ChaPTEr 1: UsInG FIlE TransFEr ProToCal


Crsp Ftp gUide

To begin the download, type get filename <enter> at the ftp> prompt (where filename is the name of the file you want). The server will respond by telling you that your command was successful and begin transferring the file to your computer. If you enabled the progress meter, hash marks will print across the Command Prompt window until the download is finished. How long the download takes will vary with the speed of your Internet connection, but less than ten minutes is typical.

steP.4:..download.your.uPdate Before downloading anything, you must tell the server that you want files to be transferred in binary mode. At the ftp> prompt, type binary <enter>. The server will respond with the message 200 Type I ok. You are now ready to download the update. optional:. As database update files can be quite large, you may wish to see a progress meter printed across the Command Prompt window while your file downloads. If you want to see the progress meter, type hash <enter> at the ftp> prompt. To see what files are available for downloading, type the command dir <enter>.

steP.5:..dIsconnect.and.eXIt.the. command.PromPt With the download complete, you can disconnect from the FTP server and exit the Command Prompt. To disconnect, type bye <enter> at the ftp> prompt. The server will respond with the message 221 GOODBYE!

windows:. You may now exit the Command Prompt, either by typing exit <enter> or clicking the X button at the top right corner of the window. linux.or.sun.solaris:. Leave your terminal emulator window open, in order to enter the commands to install the database update.

6 ChaPTEr 1: UsInG FIlE TransFEr ProToCal


Crsp Ftp gUide

installing the Update note:. Due to the large amount of data an update file contains, the installer may take from 30 to 40 minutes to complete. linux.or.sun.solaris: In the directory $HOME/ crspdata, open the file crsp.kshrc and verify that all CRSP environment variables point to the appropriate locations. Then run the following command to set the CRSP environment:
$ . ./crsp.kshrc

Click the Next button to continue. The next screen presents the license agreement; review and agree to its terms to continue with the update.

steP.2:..choose.a.locatIon.to.Install. the.uPdate After accepting the license agreement, the next screen lets you choose where to install your database update. The default location is automatically entered for you by the installer. For Windows, it is c:\crspdata. For Linux and Solaris, it is $HOME/crspdata. If you want to install the update in the default location, click Next to continue. If you store your data in another location, type in that directory path or click the Browse button to find it. Once you have selected the location, click Next to continue.

steP.1:..launch.the.Installer.Program windows: To begin the installation, use Windows Explorer to find the update file you downloaded. linux.or.sun.solaris: First use the chmod command to make the update installer executable, and then run the program. Using the A6Z 200602 example again: linux:
$ chmod 755 a6z1_200811_drf.bin $ ./a6z1_200811_drf.bin

solaris:
$ chmod 755 a6z1_200811_dsf.bin $ ./a6z1_200811_dsf.bin

The update installer automatically merges new data into your existing database. If you encounter an error during installation, refer to the Troubleshooting section at the end of this guide or contact CRSP support at 312-263-6400 x2.

steP.3:..choose.the.tyPe.oF. InstallatIon The installer allows you to choose what datasets you would like to update. Select Typical to install the entire update. To manually select datasets you wish to update, use the Custom option. CRSP recommends the Typical installation. Click Next to continue. If you selected a Custom installation, the next screen lists the datasets contained in the update. Check the boxes next to those you want to install, then click Next to continue.

linux.or.sun.solaris:
$HOME/crspdata /A6Z200602 Installation log files /_jvm /Uninstall

7 ChaPTEr 1: UsInG FIlE TransFEr ProToCal


Crsp Ftp gUide

If you need to remove the update, the uninstaller program is inside the Uninstall directory. For the beta release of CRSPs FTP delivery system, to uninstall an update you must open this directory and double-click the uninstaller. In the general release, FTP updates will create a shortcut in your Start menu to the uninstaller as current DVD updates do.

steP.4:..conFIrm.your.choIces.and. begIn.the.uPdate The installer now summarizes the installation options you have selected. If you want to change something, click the Back button to return to the previous screens. If everything looks right, click the Install button to begin the update. After you click the Install button, the installer begins merging the new data into your database. As noted above, this process can take from 30 to 40 minutes to complete.

post-installation The update will not replace your previous database files. Instead it creates a new set of files, merging old and new data, in new database folders. For example, assuming data is installed to the default location, your updated database directory would have the following structure after installing the A6Z 200602 update. windows:
C:\CRSPDATA \A6Z200602 Installation log files \_jvm \Uninstall

troUbleshooting If the installer encounters an error during the update process, refer to the following list of error messages with explanations and possible solutions. Some solutions recommend sending installer log files when you contact CRSP support. Log files are located in the top level of the update directory.
proBlem The database and update file are incompatible. Please check CRSP Client Environment to verify the database. Database and update file dates are incompatible. Please check to make sure that the previous months database is installed. CRSP_BIn is empty. Please check to make sure your CRSPAccess software is installed. solUtion SoLUTIon: In the CRSP Client Environment application (Start > All Programs > CRSPAccess > CRSP Client Environment), verify the database being updated is the previous months version of the database that you have downloaded. If it is not, reset Client Environment to point to the correct database. EXPLAnATIon: The CRSP_BIn environment variable is empty or is not set, meaning that CRSPAccess may not be installed. SoLUTIon: Verify that CRSPAccess and databases are installed. Run CRSP Client Environment (Start > All Programs > CRSPAccess > CRSP Client Environment) to set environment variables. CRSP_MSTK is empty. Please check to make sure your monthly database is installed. EXPLAnATIon: The CRSP_MSTK environment variable is empty or is not set, meaning that CRSPAccess and/or the monthly database may not be installed. SoLUTIon: Verify that the monthly database is installed. Run CRSP Client Environment (Start > All Programs > CRSPAccess > CRSP Client Environment) to set environment variables. CRSP_DSTK is empty. Please check to make sure your daily database is installed. EXPLAnATIon: The CRSP_DSTK environment variable is empty or is not set, meaning that CRSPAccess and/or the daily database may not be installed. SoLUTIon: Verify that the daily database is installed. Run CRSP Client Environment (Start > All Programs > CRSPAccess > CRSP Client Environment) to set environment variables. CRSP_CST is empty. Please check to make sure your CCM database is installed. EXPLAnATIon: The CRSP_CST environment variable is empty or is not set, meaning that CRSPAccess and/or the CCM database may not be installed. SoLUTIon: Verify that the CCM database is installed. Run CRSP Client Environment (Start > All Programs > CRSPAccess > CRSP Client Environment) to set environment variables. The CRSP file, dbinfo.txt cannot be updated. Please contact CRSP Support at 312-263-6400 x.2. EXPLAnATIon: The file dbinfo.txt is either missing or corrupted. SoLUTIon: Contact CRSP support at 312-263-6400 x2.

8 ChaPTEr 1: UsInG FIlE TransFEr ProToCal


Crsp Ftp gUide

aPPEnDIx a: InsTallaTIon
aUtomated database Update installation For windows xp You may find that you would like to automate the download and installation of your database update. This appendix illustrates how to do so using the Windows XP Task Scheduler utility. In order to facilitate automating the FTP process, CRSP provides this suggested method, using the MS Windows Task Scheduler. The following process has been tested successfully at CRSP. However, due to the great variety of possible workstation configurations, and the fact that Task Scheduler is not a CRSP product, CRSP cannot officially support automated FTP. system.requIrements To use this process, your target workstation must meet the following requirements: CRSPAccess, version 2.95 Running Windows XP Professional Windows XP FTP client software is installed Connectivity to CRSP FTP site has been established successfully MS Windows Task Scheduler is available for use The following three files are present: CRSP_FTP_DELTA.BAT A Windows batch script, which performs FTP download and installation of the desired database update. CRSP_EMPTY_FILE.IN 0 byte file used for testing successful download. CRSP_SILENT_WT.TXT An InstallShield response file for Windows Typical install. These three files can be found in the directory C:\CRSP\ sample. This appendix assumes that you will copy them to the directory C:\crspdata\_crspftp on your workstation. Select CRSP_FTP_DELTA from the list of items, and click the Open button. creatIng.the.scheduled.task The Scheduled Task Wizard allows you select a program you want Windows to execute, and then schedule it to run at the time of your choosing. To view your scheduled tasks, from the start menu navigate to all.Programs.>.accessories. >.system.tools.>.scheduled.tasks. Then click Add Scheduled Task to open the wizard. The next screen lets you select the program you want to schedule. In this case, it is the Windows batch script CRSP_FTP_DELTA.BAT. Click the Browse button and navigate to the directory that contains the batch script, C:\ crspdata\_crspftp.

Crsp Ftp gUide page 9

With the batch script selected, you can now name the scheduled task and set when you would like it to run. For the task name, either type the desired name, or leave the default name, CRSP_FTP_DELTA, in place. Click the radio button labeled Monthly, then click the Next button.

were started by that user. As shown below, enter the Windows domain and user name of the user who will own this task. Enter and confirm that users password, and click the Next button.

10 aPPEnDIx a: InsTallaTIon
Crsp Ftp gUide

On the next screen, set the day of the month, the time of day, and the months of the year when the script will run. For example, enter the following values: start.time: 5:00 AM day.of.month:. 20th months:..select all months When you are finished, click the Next button to continue.

The final screen of the Scheduled Task Wizard displays the program and schedule that you have chosen. Confirm that these are correct, and click the checkbox labeled Open advanced properties for this task when I click Finish.

Click the Finish button to continue.

The following screen prompts you for a user name and password. The scheduled task will run as if it

settIng.the.scheduled.tasks. ProPertIes If you checked the Open advanced properties box in the wizards final screen, you will now see the properties window for the scheduled task. If you did not click it, return to your list of scheduled tasks, right click the name of the new task, and click Properties in the drop-down menu.

Next, click the Settings tab and verify that its settings match those in the screen capture below.

11 aPPEnDIx a: InsTallaTIon
Crsp Ftp gUide

Here you can supply parameters that the batch script CRSP_FTP_DELTA.BAT needs in order to run successfully. Click the Task tab if it is not the selected tab. In the text box labeled Run, enter the following line. Although it occupies two lines in this guide, the following should be entered on one line.
cmd /c C:\crspdata\_crspftp\CRSP_FTP_DELTA. BAT username password prefix >>prefix_ftp.log

username:. provided by CRSP (your CRSP FTP server user name) password: provided by CRSP (your CRSP FTP server password) prefix: delta file prefix (example: A6Z1) Finally, confirm that the Task Scheduler service is started. From the Start menu, navigate to Control Panel > Administrative Tools > Services. Locate Task Scheduler in the list of services, right click on it, and select Properties. Click the Log On tab, and make sure that the Allow service to interact with desktop box is checked.

Also check that the other options in the Task tab match those in the screen capture above.

For additional information on the Task Scheduler, see: http://support.microsoft.com/default.aspx?scid=kb;enus;308558 PerFormIng.an.eXamPle.run You can run the scheduled update on demand to ensure that it works as expected. Before doing so, verify the following things on your target workstation. This example illustrates running an update in April to download March data. CRSPAccess Version 2.95 installed CRSP 1962 US Stock (200602) installed Current date (CCYYMM) is within the month of April, as the batch script will download the March file To test the automated installation, open your list of scheduled tasks. From the start menu, navigate to all. Programs.>.accessories.>.system.tools.>.scheduled. tasks. In the list of tasks, right click CRSP_FTP_ DELTA, and select Run. This will run the task immediately rather than at the scheduled time. Depending on the following factors, installation of the database update could take several minutes. Target workstation specifications (CPU, Memory, etc.) Internet connection speed Other tasks running on target workstation Location of CRSP data (on target workstation or on network drive) Successful installation will result in the following changes to the target workstation: CRSP environment variables updated to 200603 The file C:\crspdata\_crspftp\a6z1_ftp.log, is created/appended to during installation (used for trouble shooting). The file C:\crspdata\_crspftp\a6z1_200603_dwf. exe (installation file), remains. The file C:\crspdata\_crspftp\crsp_installs.txt is created/appended to upon successful installation. That files last line should look like the following

(date, time, and user information will reflect your circumstances):


Fri 04/12/2006 15:02:57.74 INSTALLED a6z1_200603_DWF.EXE //domain/user

12 aPPEnDIx a: InsTallaTIon
Crsp Ftp gUide

contact.InFormatIon CRSP | Center for Research in Security Prices The University of Chicago, Booth School of Business 105 West Adams Street, Suite 1700 Chicago, IL 60603 Fax: (312) 263-6430 http://www.crsp.chicagobooth.edu

client.services/support Questions for support can be addressed to Client Services at: Support@crsp.ChicagoBooth.edu or (312) 263-6400.

You might also like