Operating System - HP-UX
1829772 Members
7160 Online
109992 Solutions
New Discussion

Re: Variable value reset to 0

 
Shailesh_6
Occasional Contributor

Variable value reset to 0

Hi,
On HPUX:11.00
32 bit application using Oracle 8i client connecting to Oracle 8.0.6.

In the line of code below
double EgiftBalance=0.0;
txnP->bucket_ind = 1;
EgiftBalance = (posFilP->GetEgiftBalance() - TransAmount);
txnP->EgiftBalance = EgiftBalance;
txnP->MerCreditBal = posFilP->GetMerCreditBal();
txnP->GiftAmount = transAmount;
sprintf(errorString,"*** PATH 6: TxnId [%s] TxnAmt [%.2f] txnP_bind [%d] GCM_MCB [%.2f] GCM_EB [%.2f] txnP_EB [%.2f] txnP_MCB [%.2f] txnP_GAmt [%.2f] txnP_RAmt [%.2f] L_EB [%.2f] ***", txnP->TxId.data(), TransAmount, txnP->bucket_ind, posFilP->GetMerCreditBal(), posFilP->GetEgiftBalance(), txnP->EgiftBalance, txnP->MerCreditBal, txnP->GiftAmount, txnP->RefundAmount, EgiftBalance);

I am trying to calulate value of EgiftBalance. Values of (posFilP->GetEgiftBalance() and TransAmount are non zero and result in some positive value, But when see output of sprintf Value of EgiftBalance = 0.
This happen only 3-8 time out of 500,000 the code is executed in a day.
Also this happen only in one server not on other.

I am missing some patch for this?

Any help will be greatly appricated.

Thanks,
Shailesh
1 REPLY 1
Martin Johnson
Honored Contributor

Re: Variable value reset to 0

You need to narrow down the source of the problem. Have you identified which records are getting the zero value and that the data in these records are valid? If they are valid, what values are the same?

HTH
Marty