Quiz Extract Problem

Chris Sharman Chris.Sharman@ccagroup.co.uk
Wed, 20 Dec 2000 16:04:19 +0000


>I have an item defined:
>Element:            POL-UNIT-PRICE
>    Type:               Numeric
>    Size:               13
>    Decimal Positions:  4
>    Item Defaults:      NONIEEE-F Size 8
>
>If I report, using REPORT, this field it returns numeric values. When I
>extract this field to a subfile, using REPORT SUM, it reports ASCII
>representations of binary characters, i.e. junk. I have tried using REPORT
>to a subfile, various picture clauses, defining a new field as numeric,
>zoned, even char. It works in quiz but not in the output of the subfile.

In QUIZ:
> acc po-line
> def x int*8=pol-unit-price
> def y zoned*13 =pol-unit-price
> def z num*13=pol-unit-price
> def a cha*13=ascii(pol-unit-price)
> set rep lim 10
> rep pol-unit-price x y z a
> go

Presumably this is because the data you want to import into Excel is over 255
characters wide ?

If not, then just report will do:

def e char*1 head '"' = '"'
def s char*3 head '","' = '","'

set rep spac 0
rep e myfield1 s myfield2 s pol-unit-price s ... e

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

Either define some ascii representation (zoned), or make your subfile portable.
Excel will import csv, fixed field, or various others, but expects to find
ascii data. Normal (nonportable) PH subfiles are only usable by applications
which know what's in them, by understanding the subfile dictionary or whatever.

Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk		http://www.ccagroup.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.