Reputation: 1623
I have a field from a query which is a calculated total per invoice. I need to create a PF including this field, I wanted to give the type as Zoned but it is not allowing. I am thinking to use type S. Would that be correct?
Data Field Buffer Buffer
Field Type Length Length Position
VALUE01 ZONED 16 2 16 17
as here: VALUE 12S02
Upvotes: 0
Views: 1334
Reputation: 475
Yes it should work:
A VALUE 12S02
You could also create using SQL
CREATE TABLE LIBRARY/TABLE01 ( VALUE NUMERIC(12, 2) NOT NULL DEFAULT 0 )
Anyway, for calculated columns, it is more efficient to use packed (DECIMAL in sql).
Upvotes: 1
Reputation: 41148
Zoned decimal fields are specified with an S in position 35 of the field definition.
See the DDS documentation about specifying the Data type for physical and logical files (position 35) for more information.
Upvotes: 2