Page 2 of 2

Re: validdate question.

PostPosted: Wed Jun 30, 2010 2:34 am
by dick scherrer
Hello,

Looks like one of the biggest obstacles is communication. . .

Enrico votes for the first one, but Dick for the second
I don't speak for Enrico, but i voted for neither. . . Mine was just a suggestion as to why the values you mentioned were treated as they were. You might run an experiment changing this:
IF    VALIDDATE('2010013 ','YYYYMMDD')                       
THEN PUT SKIP LIST (''''||'2010013 '||''''|| ' IS VALID '); 
ELSE PUT SKIP LIST (''''||'2010013 '||''''|| ' IS NOT   ');
to:
IF    VALIDDATE('2010023 ','YYYYMMDD')                       
THEN PUT SKIP LIST (''''||'2010023 '||''''|| ' IS VALID '); 
ELSE PUT SKIP LIST (''''||'2010023 '||''''|| ' IS NOT   ');

My guess is that this will now be invalid rather than valid (only a guess as i can't test it).

As Enrico mentioned - if you don't like the way it works, open an issue with IBM.

Re: validdate question.

PostPosted: Wed Jun 30, 2010 3:12 am
by prino
dick scherrer wrote:As Enrico mentioned - if you don't like the way it works, open an issue with IBM.


It IS a bug and will be fixed once the customer opens a PMR.

How do I know? Let's just say I know...

Re: validdate question.

PostPosted: Wed Jun 30, 2010 3:46 am
by enrico-sorichetti
'2010011 ' IS VALID
'2010012 ' IS VALID
'2010013 ' IS VALID
'2010014 ' IS NOT
'2010021 ' IS VALID
'2010022 ' IS VALID
'2010023 ' IS NOT

tested, Dick guess is the right one
but not because of aligning left or right

additional test
'2010011' IS NOT
'20101 1 ' IS VALID MM = 1b DD = 1b
'20101  1' IS VALID MM = 1b DD = b1
'2010 11 ' IS VALID MM = b1 DD = 1b
'2010 1 1' IS VALID MM = b1 DD = b1



... if you think "3 " matches two-digit day - accept my congratulations...
.. I also have 6400 ideas how it pars chars, but..

apart the communications problems You have also an attitude problem

we try to help and all we get back is Your stupid sarcasm
it would be wiser for You to drop Your 'I am better than thou' attitude

furthermore looks like You have issue with Your testing skills
note the results of the additional tests
You could have found out by Yourself and deduced a reasonable
explanation of VALIDDATE behavior,
but You were so busy contemplating Your 6400 ideas that You missed the obvious 8-)

Re: validdate question.

PostPosted: Wed Jun 30, 2010 3:53 am
by enrico-sorichetti
It IS a bug and will be fixed once the customer opens a PMR.
How do I know? Let's just say I know...


Hi Robert!
at least is a bug with some logic

'2    1 1' IS VALID
'201 0101' IS VALID
'2 100101' IS VALID
'20101 1 ' IS VALID
'20101  1' IS VALID
'2010 11 ' IS VALID
'2010 1 1' IS VALID


it translates unconditionally a blank to a zero

Re: validdate question.

PostPosted: Wed Jun 30, 2010 11:32 am
by igorkigork
I did not ask to help,
I asked to confirm that what i found is a bug, for me it is obvious,
experts explained that the problem is not in validdate, but with me...

by the way:
IBM confirmed the issue. PMR opened.

thanks.

Re: validdate question.

PostPosted: Sat Jul 17, 2010 11:33 am
by BWH3922
I think the compiler is working as designed... look at Source to target conversion rules.

"If the source is a null string or a string of one or more blanks, the target will
be assigned the value zero. The CONVERSION condition will not be raised."

BWH