Hi everybody , if you don't know the db2-connectivity-details there are 5 sheat-sheets from IBM who discuss this matter!
The first one is to be found under http://www-106.ibm.com/developerworks/db2/library/techarticle/0301chong/0301chong2.html which should clarify your basic questions. If you need the others as well they are to be found at: http://www-106.ibm.com/developerworks/db2/library/techarticle/0310chong/0310chong.html http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0312chong/index.html http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0401chong/index.html?ca=dnl-d2day http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0402chong2/index.html If that doesn't clarify your problems, ask your friendly dba, at your place or me via email off-list! Mit freundlichen Gruessen / Best regards Manfred Beilfuss Deutsche Verm�gensberatung AG IT_Systemmanagement , DBA M�nchenerstr. 1 60329 Frankfurt Tel.: +49 (69) 2384 - 639 Fax: +49 (69) 2384 - 329 Mailto:[EMAIL PROTECTED] "Wagner, David --- Senior Programmer An: <[EMAIL PROTECTED]>, "Hardy Merrill" Analyst --- WGO" <[EMAIL PROTECTED]> <[EMAIL PROTECTED] Kopie: <[EMAIL PROTECTED]> fedex.com> Thema: RE: Antwort: Re: Access into MVS DB2 using DBI or ??? 06.04.2004 01:00 [EMAIL PROTECTED] wrote: > Hi, > > as I already mentioned this morning, you don't need anything special > in > perl to access a DB2 on a mainframe nor on any other operating system. > > All You need is dbi and depending on how you like it e.g. dbd::db2 or > dbd:odbc ! > > On the machine where you run your perl script you need the > db2-connection > properly configured to your target-db2-system. Everything I have received says it should be easy, but I can not get anyhting but an error. I have tried all types of variations and no matter what I do, it says either argument error or invalid table name. Now I can get the datasources or the driver info. So I have the following for: Driver Info: DB2 ODBC Data sources: dbi:DB2:AFDSNP dbi:DB2:AFDSNT My file name is 'PS_FXF_BU_XLAT'. Given the above, what would be the right commands to connect: I have done nothing with DB2 on my XP machine. IN the statement below, > Here you have to add the cataloged db2-alias e.g. D2HOST for your > mainframe which does not say anything to me. I admit being a newbie to the DBI side, but using Perl for a number years. I have looked at the doc and tried a number of things, but I must be missing the most basic of things. Would there be another list which could help? I am at my wits end ( which may not even be much of an end), but I am. Thanks for any insight or EXAMPLES of working Windows to MVS scripts. Not trying to update, but just want to select and display. Wags ;) > > To show you the basics I just quote from the dbd::db2 standard > example : > >> #!/usr/local/bin/perl >> >> use DBI; >> use DBD::DB2::Constants; >> use DBD::DB2 qw($attrib_int $attrib_char $attrib_float >> $attrib_date $attrib_ts); >> >> # an extraneous example of the syntax for creating a new # >> attribute type $attrib_dec = { %$attrib_int, >> 'db2_type' => SQL_DECIMAL, >> 'SCALE' => 2, >> 'PRECISION' => 31 }; >> >> #$DBI::dbi_debug=9; # increase the debug output >> >> >> # Open a connection and set LongReadLen to maximum size of column > > Here you have to add the cataloged db2-alias e.g. D2HOST for your > mainframe > >> $dbh = DBI->connect("dbi:DB2:D2HOST","","", { LongReadLen => 102400 >> } ); if (!defined($dbh)) { exit; } > > > OR e.g. "D2NT" for your DB2-UDB on a NT-Server > >> $dbh = DBI->connect("dbi:DB2:D2NT","","", { LongReadLen => 102400 } >> ); if (!defined($dbh)) { exit; } > > Everything else remains the same! The only thing are possible > sql-syntax-differences on different db2-versions. > > Mit freundlichen Gruessen / Best regards > > Manfred Beilfuss > > Deutsche Verm�gensberatung AG > IT_Systemmanagement , DBA > M�nchenerstr. 1 > 60329 Frankfurt > Tel.: +49 (69) 2384 - 639 > Fax: +49 (69) 2384 - 329 > Mailto:[EMAIL PROTECTED] > > > > "Hardy Merrill" > <[EMAIL PROTECTED] An: > <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > ate.ny.us> Kopie: Thema: Re: Access into MVS DB2 using > DBI or ??? > 31.03.2004 14:55 > > > > > > > You normally need DBI *and* the appropriate DBD:: module for your > particular database - in this case probably DBD::DB2. I have no > experience connecting to MVS DB2 so I can't offer any more help here. > > Hardy Merrill > >>>> "Wagner, David --- Senior Programmer Analyst --- WGO" > <[EMAIL PROTECTED]> 03/30/04 06:34PM >>> > Uuncertain where to start or really what to use to try and > see > if I can do this? I searched under Activestate and found a large > group > of DBI modules. > > Do I just need DBI? Or are there other modules which I > work with > DBI? > > I am on XP Professional running service pack 1 and Perl AS > 5.8.2 > build 808. > > Any questions and/or problems, please let me know. > > Thanks. > > Wags ;) > Int: 9-8-002-2224 > Ext: 408-323-4225x2224 > > > > > ********************************************************** > This message contains information that is confidential > and proprietary to FedEx Freight or its affiliates. > It is intended only for the recipient named and for > the express purpose(s) described therein. > Any other use is prohibited. > ****************************************************************
