Skip to main content

Perl module DBI install

  • September 21, 2016
  • 10 replies
  • 1 view

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

10 replies

  • 0 replies
  • September 21, 2016

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

Probably you have to install DRI module:
http://search.cpan.org/dist/Net-DRI/lib/Net/DRI.pm (Net::DRI - Interface to Domain Name Registries/Registrars/Resellers).

Regards,
Andrey


  • 0 replies
  • September 21, 2016

Probably you have to install DRI module:
http://search.cpan.org/dist/Net-DRI/lib/Net/DRI.pm (Net::DRI - Interface to Domain Name Registries/Registrars/Resellers).

Regards,
Andrey

Interesting. How does DRI (Domain Registry Interface) relate to the DBI (Database Interface) module. Please advise.


  • 0 replies
  • September 22, 2016

Interesting. How does DRI (Domain Registry Interface) relate to the DBI (Database Interface) module. Please advise.

Sorry, looks like I didn’t understand you correctly.

  1. You wrote: z/OS has no internet connection.
    Net::DRI is a Perl library to access services offered by domain name providers, such as registries or registrars. DRI stands for Domain Registration Interface and it aims to be for domain name registries/registrars/resellers what DBI is for databases: an abstraction over multiple providers, with multiple policies, transports and protocols all used through a uniform API.
  2. If you just want access to DB2 you have to read http://search.cpan.org/~timb/DBI-1.636/DBI.pm
  3. If you have any errors while DB2 access, please show code and errors messages to us.

Regards,
Andrey


  • 0 replies
  • September 22, 2016

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

Hello Andrey,
many thanks for that information.
If I try to use the cpan utility to install DBI I get stuck because the z/OS lpar has NO internet connectivity and cpan tries to fetch DBI from the internet. How can I install DBI without internet connectivity? Any glue?
Regards, Josef


  • 0 replies
  • October 19, 2016

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

Hello datajoe
I have received a protocol from Rocket Software on how to download the DBI module and step by step, follow an installation process. Unfortunately the Makefile.PL script gives an error by not finding the DBI
"Can’t locate DBI/DBD.pm in @INC (you may need to install the DBI::DBD module) (@INC contains: /" and then i get a list of the file locations on the @INC array. I have added the location of the DBD.pm to my LIBPATH ( and PATH for that matter), but still to no avail.

Anyone help me with setting the @INC array before i execute “perl Makefile.PL” ?


  • 0 replies
  • October 19, 2016

Hello datajoe
I have received a protocol from Rocket Software on how to download the DBI module and step by step, follow an installation process. Unfortunately the Makefile.PL script gives an error by not finding the DBI
"Can’t locate DBI/DBD.pm in @INC (you may need to install the DBI::DBD module) (@INC contains: /" and then i get a list of the file locations on the @INC array. I have added the location of the DBD.pm to my LIBPATH ( and PATH for that matter), but still to no avail.

Anyone help me with setting the @INC array before i execute “perl Makefile.PL” ?

By the way, I am no perl guru.


  • 0 replies
  • October 20, 2016

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

Hi,
I’m afraid you have problems because of encoding. I’m busy with script that will convert data correctly. I will post all commands with comments soon.

Thanks,
Andrey


  • 0 replies
  • October 20, 2016

Hi,
I’m afraid you have problems because of encoding. I’m busy with script that will convert data correctly. I will post all commands with comments soon.

Thanks,
Andrey

Thanks Andrey you can post it here if possible


  • 0 replies
  • October 20, 2016

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

I hope it will help you.

  1. Download:
    curl -kO https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.636.tar.gz

  2. Open archive:
    gzip -d DBI-1.636.tar.gz
    tar -xfvo DBI-1.636.tar

  3. If data isn’t readable, use script “convert.sh” to convert data from ASCII to EBCDIC:
    convert.sh:

    #!/bin/bash

    DIR='DBI-1.636’
    FROM='UTF-8’
    TO='IBM-1047’
    ICONV=“iconv -f $FROM -t $TO”

    find $DIR/ -type f -name “*” | while read fn; do
    echo $fn
    cp ${fn} ${fn}.bak
    $ICONV < ${fn}.bak > ${fn}
    rm ${fn}.bak
    done

  4. Change directory:
    cd DBI-1.636

  5. Run makefile:
    perl Makefile.Pl

  6. Use make to install it:
    make
    make test
    make install

If you will get an error, please show whole message,

Regards,
Andrey


  • 0 replies
  • November 2, 2017

trying to get perl ready to access DB2 for z/OS. z/OS has no internet connection. What do I need to do to enable perl to access DB2 for z/OS? My apologies for asking such a “starting from scratch” question. I simply could not find anything that worked for me so far.

Maybe something from the best Perl tutorials & books can help.