DECODE64


9.0

 

The DECODE64 instruction decodes a strict ASCII string to its original value. The instruction using the following format:

 

 

[label]

DECODE64

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A previously defined Character String Variable or Literal variable that is decoded.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

dest

Required. A Character String Variable that receives the translated characters.

Flags Affected: EOS

Note the following:

  1. The logical string of {source} is processed to transfer the translated characters to the {dest} variable.

  2. This instruction translates sets of four (4) characters with ASCII values of A-Z, a-z, '+', and '/' into three (3) characters with eight-bits per byte.

  3. The EOS flag is set TRUE if the {source} variable is NULL. In this case, the {dest} variable is also set to NULL.

  4. The OVER flag is set TRUE if the {dest} variable is too small to receive the translated characters as processed from the source logical string. The required size of the {dest} variable can be calculated as follows:

  5.  

         DestLen = ( ( SourceLength * 3 ) / 4 )

 

 

See Also: ENCODE64, Character String Instructions

 



PL/B Language Reference COUNT DECOMPRESS