Failure of Select with data conversion error

Jeff Hoffman J.Hoffman@cchs.usyd.edu.au
Fri, 13 Aug 1999 06:59:00 +1000


FYI

I am running PH710G1 (& 710E6) on OpenVMS v7.1 on an Alpha.

Just found out that a select will fail if there is a data conversion error
during the if test. (QUIZ,QTP&QUICK) 

This has been reported to COGNOS Call No 974364 Bug No 270079, although
reported as applying to Zdate it applies to any numeric field that
generates a data conversion error.

Example:

File_1 contains 

key (char*1)    suspect_field (zoned*3)
 1                   100
 2                   200
 3                   0x0
 4                   010
 5                   300

acc file_1
sel if suspect_field <= 100 or &
        key > "2"
rep key suspect_field
go

 key     suspect_field
  1          100
  4           10
  5          300

Records selected: 3
*W* ** Data conversion errors: 1

Note: The 3rd record did not get selected even though the value of key is >
2, due to the data conversion error on suspect_field during the if test.

If I alter the program slightly, by moving the data conversion error to a
define:

acc file_1
def sus_field = suspect_field
sel if sus_field <= 100 or &
        key > "2"
rep key suspect_field sus_field
go

 key     suspect_field      sus_field
  1           100              100 
  3          ####                0
  4            10               10
  5           300              300

Records selected: 4
*W* ** Data conversion errors: 3

NOTE: The 3rd record is now reported, correctly?.

Note: 3 data conversion errors! when the define of sus_field is evaluated
during the if test, again when it is evaluated for reporting and the 3rd
when suspect_field is reported?


Has anybody run across this problem?

I believe the if test on the select should NOT have failed in example 1.

Your comments please.

PS I have not tested the effects of the on 'define ... if' statements, I
will test that later today.


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ Jeff Hoffman                         + e-mail: J.Hoffman@cchs.usyd.EDU.AU +
+ Director                             +                                    +
+ WoniCon Pty Ltd                      +                           ,-_|\    +
+ 21 Prices Circuit                    +  voice: +61 2 9542 1527  /     \   +
+ Woronora    NSW     2141             +    fax: +61 2 9521 3979  \_,-._*   +
+ AUSTRALIA                            +                               v    +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
+
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.