Re: Perl "system" command and Informix
Posted in 1998
On Mon, 3 Aug 1998 17:41:24 -0700, in article <35c65900.0@blushng.jps.net>,
"Edward Villalovoz" <edwardv@jps.net> wrote:
>Can anyone tell my what i'm doing wrong? The following procedure works if i
>hard code the $hh in as say, "12", but it won't work if i try to have it
>read from the list. I keep getting the error,
>
>1262: Non-numeric character in datetime or interval.
>Error in line 3>Near character position 44
>
> 201: A syntax error has occurred.
>Error in line 1>Near character position 4
>
>
>Please tell me what i'm doing wrong. Thanks in advance.
>============================================
>#!/usr/local/bin/perl
>
>@half_hours = ("12","13","14");
>
>foreach $hh (@half_hours) {
>
> $ENV{INFORMIXSERVER} = "n36_shm";
> system q{
> dbaccess << 'eof'
> database pmsys@n36;
> SELECT *
> FROM ama0_980714
> WHERE EXTEND (ostime, HOUR to HOUR) = "$hh";> eof
> };
>
> print "got half hour $hh\\n";
> #other code....
>
>}
Well I posted this in comp.perl.lang.misc as you asked there too and didn't
crosspost but....
dbaccess pmsys@n36 - - <<eof
select * from ....;eof
Make sure there's nothing between the beginning of the line and the eof in the
second instance.
>
--
for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | '۳'''''''ۺ''''''''''۳
| '۳'''''''ۺ''''''''''۳
DOH! | '۳'''''''ۺ''''''''''۳
| '۳ 3 4 1 4 2 '' 6 9 0 6 9 '۳
spamgard(tm): zamboni | Official Proof of Purchase
===========================================================================