See the example provided for the PMDF DECODE command. In that example, the use of PMDF ENCODE is also demonstrated.