10-30-2019 9:44 AM
i have a problem with transfer a field-type decimal into a file :
" In statement "TRANSFER f TO ...", only character-type data objects are supported at argument position "f". In this case, operand "f" has the non character-type type "P LENGTH 6 DECIMALS 2".
10-30-2019 9:47 AM
You cannot transfer something else than character type data. Just open a notepad and check the content of a flat file containing amount or quantity. It is a character representation of a number, not a number.
So, just try to use statement like WRITE my_amount TO my_char_amount. and transfert the my_char_amount
10-30-2019 9:47 AM
You cannot transfer something else than character type data. Just open a notepad and check the content of a flat file containing amount or quantity. It is a character representation of a number, not a number.
So, just try to use statement like WRITE my_amount TO my_char_amount. and transfert the my_char_amount
10-30-2019 10:28 AM
A "field-type decimal" may be a number which is neither a currency amount, nor a quantity.
If it's an amount, CURRENCY is to be used, to avoid issues of division by 100 and related issues (if amount is JPY instead of EUR for instance) :
WRITE my_amount CURRENCY currency_key TO my_char_amount.
10-30-2019 11:18 AM
thanks, but now when i doing read dataset file into my structure, not work because the field is a number, this is error:
In statement "READ DATASET ... INTO f", only character-type data objects are supported at argument position "f". In the present case, operand "f" has the non character-type type "my_structure". The current program is a Unicode program. In Unicode, type X or structures that do not just contain character-type components are regarded as non-numeric.
10-30-2019 11:19 AM