How to use BASE64 decode library
Posted: Fri Sep 22, 2023 8:33 am
Dear all,
I run a Python program in iSeies. The pgm will communicate with a sever to process transaction data. The data has ascii and binary format. After rcv the message (bytes string), I use Python package itoolkit (based on xmlservice) to call a rpgle program as parm.
Because of the binary data the itoolkit amended: invalid token in xml element. So I want to pass the message to the rpgle pgm with base64 encoded message. It is easy to encode the msg with Python with codepage iso-8859-1.
I got trouble to decode the msg in rpgle. I have try SK’s BASE64 lib, db2 systools.base64decode, service pgm qsysdir/qaxis10ht. But no luck.
I found a sample to use BASE64 encode with ccsic 1208 from SK, it works. But I did not know how to use the decode? If you have a sample, can you share to me? Thanks!
I run a Python program in iSeies. The pgm will communicate with a sever to process transaction data. The data has ascii and binary format. After rcv the message (bytes string), I use Python package itoolkit (based on xmlservice) to call a rpgle program as parm.
Because of the binary data the itoolkit amended: invalid token in xml element. So I want to pass the message to the rpgle pgm with base64 encoded message. It is easy to encode the msg with Python with codepage iso-8859-1.
I got trouble to decode the msg in rpgle. I have try SK’s BASE64 lib, db2 systools.base64decode, service pgm qsysdir/qaxis10ht. But no luck.
I found a sample to use BASE64 encode with ccsic 1208 from SK, it works. But I did not know how to use the decode? If you have a sample, can you share to me? Thanks!