It is a common requirement for BASE64 encoding string formats to facilitate data communication between platforms that can only use text or string data types such as embedding images or PDFs into XML and Json which only accepts data in the form of text strings, the most common is changing binary formats for example images, PDFs or other binary files become BASE64, allowing us to send images or other files in XML or Json format.
if you are using Powerbuilder version 2017 R3, you can use the new coderObject to encode to various format such as base64, but development using earlier version are strugling to do it
Download sample source code from link below :
Download Link