I would concur with what Daniel has already suggested: "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" In other words, it isn't possible without converting the data in the base PF (Table) - and writing a program to do this.

See also: https://www.ibm.com/docs/en/i/7.5?topic=44-data-type-physical-logical-files-position-35

Check out the table of data conversions. In the Notes it says:

"2). Valid only if the binary field has a decimal precision of zero."

for a B data-type.

Brian.

On 02/01/2025 16:58, DEnglander--- via RPG400-L wrote:
I have inherited a DDS file that contains binary fields. The file has five
of them. Four are defined with zero decimal places, and one is defined
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, in
preparation for a later conversion of the underlying PF to have the binary
fields removed and converted to packed.

In the LF I have tried to create the binary field with the two decimals as
packed as well as zoned, and the system will not compile the LF. I receive
a CPD7927 error from the DDS compiler with "Binary field with decimals not
converted to type specified.". Is there a way to create a LF over a PF
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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.