Re: Decode base64 to job CCSID?
cesco via RPG400-L <[email protected]> Wed, 1 Apr 2026 17:32:42 +0000 (UTC)
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <[email protected]> |
You need to know what encoding the encoded in base64 was originally in. then try to declare retDecoded with that CCSID On Wednesday, April 1, 2026 at 06:11:40 PM GMT+2, Justin Taylor <[email protected]> wrote: 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. -- 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.