Decode base64 to job CCSID?
Justin Taylor <[email protected]> Wed, 1 Apr 2026 11:11:19 -0500
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <CAJu8Sp_2KaBcCAnjW8Z3i9kPmR12_PuZa0nUu9TnaDwPbrLCqw@mail.gmail.com> |
I'm trying to decode a base64 string. It's giving me the results as *UTF-8
when I need *JOB CCSID. Can someone point out what I'm missing?
Thanks
Dcl-proc DecodeTest ;
Dcl-pi *n like(retDecoded) ;
encoded varchar(1000) ccsid(*UTF8) const ;
End-pi ;
Dcl-s retDecoded varChar(1000) ;
EXEC SQL
set :retDecoded = QSYS2.BASE64_DECODE(:encoded);
Return retDecoded;
End-proc ;
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.