[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Help with (SQR 4027) Function or operator '!=' requires a numeric argument



In the following procedure you do not need the ' ' around the variable.  The
quotes are used for literals only.  If you are looking for the value not to be
equal to the literal  $U, use the quotes.  If you are looking to for the value
not to be equal to the value of the variable $U, do not use the quotes.

BEGIN-PROCEDURE Special-SUI-Calc
if (&PBA.TAX_CLASS = 'S'
      and &PBA.STATE <> '$U')
...etc.








Joe Johnson <jej1216@HOTMAIL.COM> on 07/18/2000 03:03:03 PM

Please respond to sqr-users@list.iex.net








 To:      SQR-USERS@list.iex.net

 cc:      (bcc: Jason Buzer/THG)



 Subject: Help with (SQR 4027) Function or operator '!='
          requires a numeric              argument








First of all, my apologies for this lengthy message.

I am working with this code:

begin-procedure Evaluate-Charge-Type
begin-select
blah blah blah

  evaluate &PBA.Z_CHARGE_TYPE

    when = 'EMT'
       add &PBA.Z_TID_COST to #er_taxes
       let #prod_er_taxes = #prod_er_taxes + &PBA.Z_TID_COST
      break
    when = 'WC'
      add &PBA.Z_TID_COST to #wc_cost
      let #prod_wc_cost = #prod_wc_cost + &PBA.Z_TID_COST
      break
    when = 'SUI'
      add &PBA.Z_TID_COST to #sui_cost
      let #prod_sui_cost = #prod_sui_cost + &PBA.Z_TID_COST
      break
    when-other
      break
  end-evaluate

  blah blah blah
end-select
end-procedure

The user needs to have the program evaluate two other variables when
&PBA.Z_CHARGE_TYPE = 'EMT'.

I tried this change:

    when = 'EMT'
     do Special-SUI-Calc
    break

and then putting the other considerations in a Special-SUI-Calc Procedure:

BEGIN-PROCEDURE Special-SUI-Calc
if (&PBA.TAX_CLASS = 'S'
      and &PBA.STATE <> '$U')
  add &PBA.Z_TID_COST to #sui_cost
  let #prod_sui_cost = #prod_sui_cost + &PBA.Z_TID_COST
else
  add &PBA.Z_TID_COST to #er_taxes
  let #prod_er_taxes = #prod_er_taxes + &PBA.Z_TID_COST
end-if
END-PROCEDURE !Special-SUI-Calc

When I run this, I get an error message:
(SQR 4027) Function or operator '!=' requires a numeric argument.

When I just use
if &PBA.TAX_CLASS = 'S'
in the Special-SUI-Calc Procedure, I get no errors -- but this does not meet
my user's needs.

Why does the SQR expect a numeric argument for
if (&PBA.TAX_CLASS = 'S'
      and &PBA.STATE <> '$U')
?

Thanks in Advance.

Joe Johnson








________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com