Hi guys, I went through older posts and some other blogs too but didn't find the appropriate solution.
I have a PDF in EBCDIC format stored in IFS, whose data is dumped into 1 long string(ebcdic_data). I intend to encode this string in base64 and receiving a run-time error as " EBCDIC character value not entirely enclosed by shift-out and shift-in" when moving to UTF-8 variable.
Using 'https://base64.guru/converter/encode/pdf' , to verify data is encoded properly
I have a PDF in EBCDIC format stored in IFS, whose data is dumped into 1 long string(ebcdic_data). I intend to encode this string in base64 and receiving a run-time error as " EBCDIC character value not entirely enclosed by shift-out and shift-in" when moving to UTF-8 variable.
Code:
dcl-s ebcdic_data varchar(7000000); dcl-s $ifs_data varchar(7000000) ccsid(1208) inz; // convert data to UTF-8 format, so that data can be encoded to base64 $ifs_data = %trim(ebcdic_data); // getting error at this line wwEncLen = base64_encode( %addr($ifs_data : *data) : %len($ifs_data) : %addr(wwEncoded) : %size(wwEncoded) );




Comment