PreviousNextIndex

ENCODE function

Encodes a source character string and returns the encoded character string result.

Syntax

ENCODE ( expression ) 

expression
Example

This procedure uses the ENCODE function to disguise a password that the user enters, and then displays the encoded password:

r-encode.p
DEFINE VARIABLE password      AS CHARACTER NO-UNDO FORMAT "x(16)". 
DEFINE VARIABLE id            AS CHARACTER NO-UNDO FORMAT "x(12)". 
DEFINE VARIABLE n-coded-p-wrd AS CHARACTER NO-UNDO FORMAT "x(16)". 
SET id LABEL "Enter user id" password LABEL 
  "Enter password" BLANK WITH CENTERED SIDE-LABELS. 
n-coded-p-wrd = ENCODE(password). 
DISPLAY n-coded-p-wrd LABEL "Encoded password". 

Notes

OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex