|
Hi Doug,
I don't think, that there is a solution for this kind of data type
conversion. At least I found only this:
https://www.ibm.com/support/pages/ddssql-data-type-mappings
And there I found note #2:
Binary fields with nonzero scale.[snip]
Directly accessing tables with this data type through SQL can result inunpredictable results including data corruption.
So I think you can't work around a full data conversion (PF -> Table) in
this case. And also - you can't do that with SQL, so you need a program to
convert the records one by one.
I honestly don't know, if you can create a LF over the table that converts
the value from SQL data type [probably numeric(9, 2)]back to 4B2 format -
but you can try that.
HTH
Daniel
Am 02.01.2025 um 17:58 schrieb DEnglander--- via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>:
five
I have inherited a DDS file that contains binary fields. The file has
of them. Four are defined with zero decimal places, and one is definedin
with 2 decimal places. The Binary field in question is defined as a two
byte field with two decimal positions [i.e. 4B 2].
I am attempting to create a LF over this PF with the exact same fields,
preparation for a later conversion of the underlying PF to have thebinary
fields removed and converted to packed.as
In the LF I have tried to create the binary field with the two decimals
packed as well as zoned, and the system will not compile the LF. Ireceive
a CPD7927 error from the DDS compiler with "Binary field with decimalsnot
converted to type specified.". Is there a way to create a LF over a PFattachments accompanying it) contain confidential information belonging to
with binary fields with a decimal to a packed/zoned field?
I can convert the other binary fields to packed with zero decimals.
I can't use a View because I need the LF keyed.
Any ideas?
Thank you,
Doug
"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the
the sender. The information is intended only for the use of the intended
recipient. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution or the taking of any action in
reliance on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the law.
If you have received this transmission in error, please promptly notify the
sender by reply e-mail, and then destroy all copies of the transmission."
--related questions.
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.