Hope this instruction help: Setting up Perl environment in Microsoft/Intel (WIN95 / NT) platform & install IBM-DB2 ppm : 1. Download the Microsoft Window Installer program "InstMsi.exe" of your select platform then run it. NT http://download.microsoft.com/download/platformsdk/wininst/1.1/NT4/EN-US/InstMsi.exe
Microsoft Windows 95/98 Installer 1.1 http://download.microsoft.com/download/platformsdk/wininst/1.1/W9X/EN-US/InstMsi.exe ) 2. Download the ActivePerl v5.6 (Perl Windows 32 binary code for Win/Intel) from ActiveState company web site. File name is "ActivePerl-5_6_0_618-MSWin32x86-multi-thread.msi" from http://www.activestate.com/ then run it. (note: Perl will install on the same drive where the InstMsi.exe was ran) 3. Test the Perl environment, in Command Prompt session, in any subdirectory type: perl -v (Note:Should see the message of your the current Perl version installed) If not, in WIN95, insert a line in "Autoexec.bat" file SET PATH = C:\PERL\BIN;"%PATH%" in NT - need append "C:\Perl\bin" into PATH environment variable. 4. Download the Perl "DBI" general database API package, need for database connectivity. There are two approach. One download the "DBI.zip" file from the http://www.activestate.com/PPMPackages/zips (select your Perl release level) then use WINZIP utility to decompress the zip file. (The utility is available from IBM, ISSI central repository) At command Prompt session, at the location where the decompress files were type: ppm install DBI.ppd (install DBI from the local drive) (notes: Use Perl Package Manager (PPM) utility to install DB API. PPM is installed when you install AvtivePerl on step 2. Insure step 3 is working. OR At Command Prompt session type: PPM (notes: insure internet connectivity is available) type: install DBI (pulling/install API from the remote ActiveState site) Helpful PPM command: type: search (PPM command will get a listing of all available package in the ActiveState site) type: help (list all PPM command) type: set more 20 (pause scrolling in every 20 line when you use PPM search or PPM query command) 5. Down load the Perl "DBI DB2" database API package for IBM UDB connectivity. Download the "DBD-DB2.zip" file from the URL: http://www.activestate.com/PPMPackages/zips use WINZIP decompress the zip file. then at command Prompt type: ppm install DBD-DB2.ppd OR at Command Prompt session type: PPM type: install DBD-DB2 6. Test the DB connectivity with the perl program (connection to IBM, UDB "SAMPLE" database) Insure the "SAMPLE" database is define in your UDB Client Application Enabler (CAE) profile. (use UDB - Client Configuration Assistant) at Command Prompt session type: perl testodbc.pl (test ODBC connectivity, insure register DB "SAMPLE" for ODBC, program is attached) perl test_db2.pl (test DBI DB2 connectivity, code provide below) ------------------ test_db2.pl (perl program) -------------------------------------------------- use DBI; $dbh = DBI->connect("dbi:DB2:Sample","userid","password", { PrintError => 0, RaiseError => 1 } ); $st = $dbh->prepare( "SELECT * FROM db2inst2.org"); $st ->execute(); while (@row=$st->fetchrow_array() ) { print "Row: @row\n"; } $dbh->disconnect(); exit; ----------------------------------------------------------------------------------------------------------- (On line 2, type your database name, user ID, passsword) On line 8, type your select statement) ------------------------------------------------------------------------------------------------------- Note: What is the perl Package Manager (PPM)? PPM utility provide a command line interface for managing Perl modules and extensions (packages). For more information on PPM, check " URL: http://www.activestate.com/support/ActivePerl ", PPM FAQ document . If you encounter problem, send email to "[EMAIL PROTECTED]". They are good respond in few days. ------------------------------------------------------------------------------------------------------------------------ ?????????? odbc.pl ???????? program The "testodbc.pl" program need little customization inside, modify the line contain "SAMPLE" and "SELECT" to correspond database name and the select statement. ============================================================================================ Henry T. Chin IBM Americas Financial Information Management Email - [EMAIL PROTECTED] Phone: 914-642-6730 (T/L 224)
