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 =...
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...
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.
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";
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...
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...
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
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.
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...
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...
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?
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...
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...
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...
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
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.