﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
269	PL/I convert operators returns wrong oncode for 1.Fnnn Exponent	Gary Dixon	Eric Swenson	"Test program fld59 accepts a fixed-point string with optional exponent sub-field, and uses the PL/I convert built-in to change this string to a float dec(59) data type.  

Results of using this program to convert strings within and just outside of the support exponent range for float dec(59) show correct signaling of exponent overflow and underflow when outside the supported range:
      -128 <= exponent <= +127.

{{{
fld59 1E(-129 -128 -127 126 127 128 129) -d
   in:  1E-129
fld59  underflow condition:  oncode: 706  exponent underflow condition
   in:  1E-128
  out:  1.e-128
 dump:  +00000000000000000000000000000000000000000000000000000000001 -128
   in:  1E-127
  out:  1.e-127
 dump:  +00000000000000000000000000000000000000000000000000000000001 -127
   in:  1E126
  out:  1.e126
 dump:  +00000000000000000000000000000000000000000000000000000000001 126
   in:  1E127
  out:  1.e127
 dump:  +00000000000000000000000000000000000000000000000000000000001 127
   in:  1E128
fld59  overflow  condition:  oncode: 705  exponent overflow condition
   in:  1E129
fld59  overflow  condition:  oncode: 705  exponent overflow condition
}}}

If the same test values are entered using the F exponent letter, slightly different failure points are signaled, and different oncode values are returned.  Also, the messages associated with the returned oncode values seem inverted: 

- The message associated with overflow is returned (by interpret_oncode_) for the oncode value for F-exponents experiencing underflow.
- The message associated with underflow is returned for the oncode value for F-exponents experiencing overflow.

{{{
fld59 1F(-129 -128 -127 126 127 128 129) -d
   in:  1F-129
fld59  conversion condition:  oncode: 408  Scale factor > 127 in scaled fixed binary or decimal field.
  onsource: ""1F-129""  onchar: ""9""  onchar_index:  6
                  ^
   in:  1F-128
fld59  conversion condition:  oncode: 408  Scale factor > 127 in scaled fixed binary or decimal field.
  onsource: ""1F-128""  onchar: ""8""  onchar_index:  6
                  ^
   in:  1F-127
  out:  1.e-127
 dump:  +00000000000000000000000000000000000000000000000000000000001 -127
   in:  1F126
  out:  1.e126
 dump:  +00000000000000000000000000000000000000000000000000000000001 126
   in:  1F127
  out:  1.e127
 dump:  +00000000000000000000000000000000000000000000000000000000001 127
   in:  1F128
fld59  overflow  condition:  oncode: 705  exponent overflow condition
   in:  1F129
fld59  conversion condition:  oncode: 409  Scale factor < -128 in scaled fixed binary or decimal field.
  onsource: ""1F129""  onchar: ""9""  onchar_index:  5
}}}

Because oncode values are just numbers having no names, it isn't clear whether the wrong oncode number is associated with F-exponent underflow and overflow; or the correct oncode is being used but the message table containing the description associated with those encode values (oncode_messages_$) is wrong.  "	defect	new	minor		Standard Library				
