I am writing a script accessing records using SQL. I am joining a file with left outer join and selecting the field from that file with coalesce(field). My sql statement works great on the ibm i. However, when write it in my php script, the characters returned are unreadable.
Also, when I do a "SELECT SUBSTR(DIGITS(FIELD),1,2) ..." the field retrieved is unreadable.
It appears that the values are not getting converted from ebcdic to ascii. All values returned without the additional functions are readable. It is only those values returned with substr or coalesce.
Does anyone have any suggestions?

