Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dkyrtata

    trying to format a field that has 4 decimal places

    It has been decades I used COBOL, but if I remember correctly the PICTURE 9(9)v9(4) format means that you have a number stored like this: "0034567890123", but actually represents "003456789.0123" which is the way you want it to print So try this: $data[7]="0034567890123"; $vQty =...
  2. dkyrtata

    How to write a switch statement in perl

    This is what I have been doing for years after reading it in Orielly "Perl Programming" book. CASE: { @letters = (a,b,c), $var='abc', last CASE if ($inum == 2); @letters = (d,e,f), $var='def', last CASE if ($inum == 3); @letters = (x,y,z); } return(@letters); Note the following...
  3. dkyrtata

    DIfference between "or" and "||"

    Thanks, I confirmed it by enclosing the entire right side in brackets. Prior to Perl 5, there was only the "||" operator. The "or" was implemented in Perl 5, but I thought that it was just a synonym having the exact behavior.
  4. dkyrtata

    DIfference between "or" and "||"

    Why do the following boolean expressions return a different result? The first one returns 1 (true), which is correct. $hh=23; $dd=32; $bool1= ($hh>23) || ($dd>31); $bool2= ($hh>23) or ($dd>31); print "bool1=$bool1\n"; print "bool2=$bool2\n";
  5. dkyrtata

    datawarehouse interview demo

    Be aware that the two DW gurus are Ralph Kimball and Bill Inmon, (there is one other, Claudia something I think). They take two different approaches to DW. So you may be asked to briefly describe their methodologies. Most DWs take the ideas from both methodologies as DW is not an exact science...
  6. dkyrtata

    datawarehouse interview demo

    The main operation of a data warehouse is to load data from source systems to the warehouse and mart. Think of all the events that can occur. There are many. How will data be obtained? Will the warehouse link into source systems and pull the data out? If so, what kind of systems are they? Cobol...
  7. dkyrtata

    Load 2 Dimensional Array

    Yes, Annihilannic got it right. That is the last used position of the sub-array within $a[$i]. Thanks again!
  8. dkyrtata

    Load 2 Dimensional Array

    Feherke That worked and it is what I eventually figured out too. But then I wondered how to get the last element of the array using this syntax: $#a I often use that instead of scalar(@a)-1
  9. dkyrtata

    Load 2 Dimensional Array

    How would I now get the number of columns in $a[$i]? This does not work: $numCol = scalar(@a[$i]);
  10. dkyrtata

    Load 2 Dimensional Array

    Annihilannic Your example worked. I have given you a star for your solution. Thanks. PS. Annihilannic, just to get off topic, I am still working on the DBI/DBD problem, but the two key people involved have gone or are going on vacation for the next 4 weeks. Unbelievable timing.
  11. dkyrtata

    Load 2 Dimensional Array

    This is a simplified example. I want initialize the array in one step: $i++; $a[$i][0] = "a" $a[$i][1] = "b"; I thought this would work: @a[$i][0..1] = ("a","b") Closer to my real life scenario, I am actually trying to load the array with a split function so that row $i contains 4...
  12. dkyrtata

    How To Install DBI/DBD

    Annihilannic We tried the "make" command exactly the way you provided it. It gave the same results. Being short of options, we will now try to do the installation under Oracle 10g (since we have also done it in the past on other boxes). If it fails with the same errors, we will question why...
  13. dkyrtata

    How To Install DBI/DBD

    Annihilannic Where would I put that "CC" command? Is that a switch for "make"? I assume it is not an environment variable since you did not export it. Can you give an approximate example?
  14. dkyrtata

    How To Install DBI/DBD

    TonyKent, Annihilannic We successfully compiled Perl 5.8.8 using the ANSI compiler (after failing to do the same thing with Perl 5.14.1). So it would seem that higher version of Perl may be problematic. We also succeeded in compiling the DBI (file: DBI-1.61), but get errors compiling the DBD...
  15. dkyrtata

    How To Install DBI/DBD

    Annihilannic (and TonyKent) Thanks for the confirmation. The C compiler should be new since we asked HP to send us another one after loosing the original CD from 6 years ago. That version (A.06.12) is on our older boxes. The problem we have now is that we can't even compile Perl. So now we...
  16. dkyrtata

    How To Install DBI/DBD

    TonyKent I am surprised that you actually succeeded in getting this work done using the Gcc compiler. We always used an ANSI C compiler in the past. I have a few more questions, if you do not mind. 1) Did you get a successful installation on a HP Itanium box? Does it even matter whether the...
  17. dkyrtata

    What is $@ - used with 'eval'

    Perl has many such variables. They are internal variables that Perl sets. Perl 5 introduced a verbal names for each of them (which are not available by default). Here are some more examples: $@ = $EVAL_ERROR $] = $PERL_VERSION $$ = $PROCESS_ID $. = $INPUT_LINE_NUMBER $^O = $OSNAME
  18. dkyrtata

    How To Install DBI/DBD

    Tonykent, Annihilannic Thank you for your advice. We are going to try your suggestions. In the meantime, we downloaded the latest version of Perl (5.14?) from CPAN, but got compilation errors. So that is a step backwards. We will be asking the Unix Administrator to rebuild the box from scratch...
  19. dkyrtata

    How To Install DBI/DBD

    Annihilannic Here is the information your requested. Thanks for providing the exact commands: Perl version: V5.8.8 built for IA64.ARCHREV_0-thread-multi, copyright 1987-2006, Larry Wall C Compiler: CC: GP C/ac B3910B A.06.15 (May 16 2007) OS Release: B.11.31 tonykent Yes, we figured it...
  20. dkyrtata

    How To Install DBI/DBD

    Does anyone have any instructions to install Perl's DBI/DBD package for Oracle 11g on a HPUX-11 system running on a HP Itanium Box? My Unix administrator has never had a problem doing so for Oracle 10g, but things fail to compile (using an ANSI C compiler) for Oracle 11g. From what I...

Part and Inventory Search

Back
Top