Quiz Extract Problem

Pickering, John (NORBORD) PICKERIJ@norbord.com
Thu, 21 Dec 2000 11:00:35 -0500


w paddock smith suggests ...

>In order to preserve decimals, however, it gets more
>complicated.   I've utilized this brute-force approach:
>
>; the units portion
>define po-price-units cha*13 = ascii ( po-unit-price )
>
>; the decimal point
>define po-price-point cha*1 = '.'
>
>; the cents portion - adjust for number of decimals
>define po-price-cents cha*2 = ascii ( ( po-unit-price * 100 ) mod 100 )
>
>; finally, the item to put into the subfile
>define po-price-sf-item cha*16 = po-price-units + po-price-point +
po-price-cents

And Chris Sharman suggests ...

>If so, then I'd recommend:
>
>def pol-unit-price-z char*13 = &
>	ascii(floor(pol-unit-price))+"."+&
>	ascii(mod(pol-unit-price*10000,10000),4)
>rep sum e myfield1 s myfield2 s pol-unit-price-z s ... e


Now wouldn't it be nice if we had a function to format a numeric item (or
expression) into a character string using a picture format of our choosing.
Seems like a useful enhancement to replace all the tedious stuff like the
above which we all spend to much time messing about with -- especially in a
product which calls itself a "productivity tool".

But I've abandoned sending enhancement requests to the Cognos bit-bucket :-(

Season's best,
JWP
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.