CPACKAGE

The CPACKAGE specifies the character set of the output of the function.

From that point onward, the data is treated as if it were in that character set. If the data is not in the specified character set, you get the wrong answer.

The character set is required to be specified in this function. If you choose not to specify a character set, you should use the original version of the PACKAGE function.

Syntax:
CPACKAGE (single-object-expression , "character-set-of-object-content")
Meaning:
CPACKAGE (object_to_convert, object_character_set)
Returns:
A single text item

The second argument, object_character_set, represents the character set of the resulting object. Character set codes are listed in Character set codes.

Examples

In this example, the group Record has an initiator of "#", a terminator of "@" and a delimiter of "," with the following data:

"#1339X10A,491.38,Green,42x54@"

  • CPACKAGE (Record:Card, "ASCII")

    Returns: #1339X10A,491.38,Green,42x54@