Page 1 of 1

Packed field containing char

Posted: Tue Sep 17, 2024 4:08 pm
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

Re: Packed field containing char

Posted: Tue Sep 17, 2024 5:35 pm
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 ... ???