B64decode

This function decodes a base 64 string into a BLOB (Binary Large Object). It returns the number of bytes written to the BLOB. An error 26 is displayed if the input is invalid.

Syntax

LENGTH=B64Decode(SOURCE_CLOB, DEST_BLOB)

Examples

# Decode a base 64 CLOB into a BLOB# If an error occurs, return -1Funprog DECODE(SOURCE, DESTINATION)Const Clbfile SOURCEVariable BlbFile DESTINATIONLocal Integer IOnerrgo ERROR_FOUNDI=B64Decode(SOURCE,DESTINATION)End I$ERROR_FOUNDEnd -1

See also

b64Encode, strEncode, strDecode