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

Numeric Check



 

Hi all

 

Not sure if anyone encountered the same problem.  I am  trying to read in data from a text file to be inserted into PeopleSoft.  The problem I face is as follows:

 

Once I have read the data and converted to numbers as a variable and try to check the variable against another numeric variable, even though the two numbers are the same, for some reason the number do not seems to agree.  Any idea????

 

            10000 <> 10000

     let #veri_debit_total_SS      = to_number(substr($record,17,13))

     let #veri_debit_total_SSS     = #veri_debit_total_SS + #veri_debit_total_SSS

     let #veri_debit_grand_total_GGG    = to_number(substr($record,31,13))

 

     if #veri_debit_total_SSS = let #veri_debit_grand_total_GGG

                        display 'debit check ok'

     end-if

 

 

 

I had to resort to the following

Let $veri_debit_total_SSS = to_char(#veri_debit_total_SS) 

I need to convert the numbers to string and perform a string by string check.  Any recommendation????

 

Kind regards

 

Alex