SafeX3 - 4GL - BlbFile conversion

SOLVED

Hi, I need to convert a string from base64, I use the function YLEN=b64Decode(YB64RES, YBLOB).

Then I would have to convert the BlbFile back to a ClbFile or Char (I need to parse it) but I wouldn't want to have to write YBLOB to the filesystem and then read it again.

There's a way ? 

Roberto

  • +1
    verified answer

    Not 100% sure of the requirement, but you can convert the BLOB to a CLOB using the strDecode function:

    YLEN = b64Decode(YB64RES, YBLOB)

    YLEN = strDecode(YBLOB, YCLOB, XTYPE)

    XTYPE values:

    • 50 : ascii to UCS2 transformation.
    • 122 : UCS2 to UCS2 transformation (void transformation).
    • 0 : UTF8 to UCS2 transformation.