BASE64_DECODE

LANSA Composer

BASE64_DECODE

This activity will base64 decode the contents of a specified file and write the decoded content to another file.

Base64 encoding is commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remains intact without modification during transport.  Base64 encoding is commonly used in a number of applications including email via MIME, and storing complex data in XML.

INPUT Parameters:

BASE64SOURCE : Required

This parameter must specify the full path and file name of the file whose contents are to be base64 decoded.

BASE64TARGET : Optional

This parameter may specify the full path and file name for the file to which the decoded file contents are to be written.  The default, if not specified, is the special value *AUTO.

If the special value *AUTO is used, the activity will use the path and file name specified in the BASE64SOURCE parameter but replacing the file extension with an extension of '.decode'.  For example, if you specify /myfolder/myfile.dat in the BASE64SOURCE parameter, then the activity will write the decoded contents to the file /myfolder/myfile.decode.

BASE64REPLACE : Optional

This parameter specifies what the activity should do if the output file already exists.  The default value *NO will cause the activity to end in error if the output file already exists.  Alternatively you can specify *YES to cause the existing file to be replaced.

OUTPUT Parameters:

BASE64DECODED :

Upon successful completion, this parameter will contain the actual path and file name of the output file containing the decoded contents of the file specified by the BASE64SOURCE parameter.