I am trying to decode a base64 string in SQLRPGLE using SYSTOOLS.BASE64DECODE function. The result is a blank string. The base64 string has CRLF characters as well. When I ommit the CRLF from the base64 string, decode works fine. looks like something to do with the character set. Any help is appreciated
sample base64 string: XlhBCl5GWCoqKioqKipBUEMgTG9nbyoqKioqKioqXkZTCl5GTzU4MCw
SQLRPGLE
Dcl-S VarcharField1 Varchar(4096) ;
Dcl-S VarcharField2 varchar(13096) inz(' ') ccsid(819);
VarcharField1 = 'XlhBCl5GWCoqKioqKipBU';
EXEC SQL SET :VarcharField2 =
SYSTOOLS.BASE64DECODE(:VarcharField1);
*InLr = *On;