[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1656.0. "Boolean or Syntax problem !" by KAOFS::R_OBAS () Fri Oct 23 1992 18:53

    
     I messed up the original entry.
    
       I have a customer that generates information through Datatrieve
     such as figures with a comma (3,000.00).
     Before they upgraded to V2.4 all is well (according to them). Now
     the script below does not work anymore.
    
      GET #TEST = '3,000.00'
        .IF #TEST LE '0' THEN GET #TEST = ""
    
     In V2.3 this script returns the value of #TEST = 3,000.00
     In V2.4 it returns the value #TEST = ""
    
        If I remove the (,) to make it '3000.00' it returns the
     value of #TEST = 3000.00
     
     It is not easy for the customer to drop off the (,) because they
     have to redo all the DTR application.
     Does anyone know what is causing the problem and a workaround ?
    
    thanks,
    ricardo
    
T.RTitleUserPersonal
Name
DateLines
1656.12.4 fixed 2.3 AIMTEC::BUTLER_TFri Oct 23 1992 19:3417
    Ricardo,
                                                                             
    ALL-IN-1 v2.3 doesn't recognize a numeric equivalence unless the
    number contains a decimal point. This is a restriction corrected in v2.4.
    The wrong results are caused due to this restriction.     
    
    Why does 2.4 produce the correct result for the given example? What
    was changed and why ? 
    
    ALL-IN-1 v2.4 was changed because of the problem in item 3.
    Numerical values are now handled correctly in context. 
    
    Now, to keep the string format for DTR.  You may want to use the 
    GET_TOKEN/GET_SYMBOL functions to split on the "'" and put it
    back together after testing.
    
    Tim
1656.2I'm confused !KAOFS::R_OBASFri Oct 23 1992 20:5147
    
                                                                             
  <  ALL-IN-1 v2.3 doesn't recognize a numeric equivalence unless the >
  < number contains a decimal point. This is a restriction corrected in
    v2.4.>
  <  The wrong results are caused due to this restriction.>
    
    But they have decimal points.     
    I'm sorry Tim I'm confused bigtime here.
    
     Are we saying that what worked in V2.3 was wrong ? Because in the
    example in .0 goes like this
    
    V2.3
    
      GET #TEST = '3,000.00'
           .IF #TEST LE 0 THEN GET #TEST = ""
    And it returns the correct value which is #test = 3,000.00
    
    Now in V2.4 the changed that I know is that you have to treat as
    string, correct me if I'm wrong (I'm very bad on this)
    
    V2.4
       GET #TEST = '3000.00'  !no comma it works
           .IF #TEST LE '0'  THEN #TEST = ""
                       ^^^^^ needs the apostrophy   
    If you do not enclose the 0 (.if statement) you get wrong result 
     #TEST = ""
    
     Again in V2.4 if you put a comma in '3,000.00' (which is what my
    question is) it gives the result #TEST =""
    
    > Why does 2.4 produce the correct result for the given example? What<
    > was changed and why ? >
    
    
    >ALL-IN-1 v2.4 was changed because of the problem in item 3.<
    >Numerical values are now handled correctly in context. <
    
     Again I'm confused . item 3 ?
    Are we saying that the behaviour in v2.3 where it can handle the (,)
    was not the correct behaviour ?
    We don't have anymore v2.3 so I cannot verify if what the customer is
    telling me is true. I did verify in v2.4 and I got the result from
    above example correctly except the (,).
    
    Thanks Tim
1656.3Lets ignore the commaAIMTEC::BUTLER_TFri Oct 23 1992 21:4426
    Ricardo,
    
    instead of item 3 I meant to type V2.3.  (that is the problem
    with typing and talking at the same time)
    
    My understanding was that in V2.3 the "." was required to specify
    numeric (everything in ALL-IN-1 is stored character).  This was
    a restriction in 2.3.
    
    The fix in 2.4 to remove this restriction also disallowed the comma
    for a numeric comparision.
    
    I am making the presumption the customer is right till I can show
    that he/she is misinformed.  Using that I can only conclude the comma
    did work in V2.3.
    
    If the storage of the comma is required due to amount of DTR processing
    for reporting then what can we do to make this work?  That is why
    I suggested the use of GET_TOKEN/GET_SYMBOL as, from your example
    I saw no computation requirements (COMPUTE and DECIMAL functions). 
    Again, I presume this is being done in DTR which has all sorts of
    USAGE clauses.
    
    I do appoligize for the confusion and HTH.
    
    Tim