Packed field containing char

Any IBM i topic that does not fit in another forum
Post Reply
Gustavo1975
Posts: 1
Joined: Tue Sep 17, 2024 3:59 pm

Packed field containing char

Post by Gustavo1975 »

I've a very old table with a field defined comp-4 15,2.
This field was charged with info in the char(8) format with rpg programs with internal table definitions.
I need to access this field with SQL, didn't find a way to generate an index with this field redefined.
SQL select shows XXXXXXXXXXX for this field. DSPPFM shows the correct info in the position of this field.
Any ideas?
Tks,
Gustavo
jonboy49
Posts: 244
Joined: Wed Jul 28, 2021 8:18 pm

Re: Packed field containing char

Post by jonboy49 »

Well comp-4 is binary - so why the RPG used char instead of B(inary) is anybody's guess.

But before we can answer the question we need to know what are you trying to retrieve.

Do you want to access the original numeric value? The RPG char data? And what are you going to do with it

In the case of the char data - does it represent a valid binary value or ... ???
Post Reply