Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

compare in VS COBOL not working as expectedcomp

$
0
0

 Doing a 'date' compare that has worked in the past.  It is:

if mpatpmrc-LineOfBusiness = 'HOM' or 'DWF'             
    and w-compare-date-two >= w-auto-renewal-date       
    next sentence            

The value in w-compare-date-two is '20170729'

The value in w-auto-renewal-date is '20171001'

nevertheless, it goes to next sentence!

w-compare-date-two is a group field and w-auto-renewal-date is not.  I tried changing both to group fields, and got the same result.  Then I changed them both to primary fields, and got the same result.

The values in hex look also show the w-auto-renewal-date is larger

w-compare-date-two H"3230313730373239"

w-auto-renewal-date H"3230313731303031"

I have changed w-auto-renewal-date to '99999999', it still goes to Next Sentence

I have changed w-compare-date-two to '00000000' with the same result.  It is almost as if the compare does not care what is in the variables!

We are at MF Visual Cobol 2.3 and Visual Studio 2013.

 

 

 

                           


Viewing all articles
Browse latest Browse all 4356

Trending Articles