Sign in

docs ILE Concepts

Wildcard Export Symbol Examples

Wildcard Export Symbol Examples

Wildcard Export Symbol Examples

For the following examples, assume that the symbol list of possible exports consists of:

  • interest_rate
  • international
  • prime_rate

The following examples show which export is chosen or why an error occurs:

EXPORT SYMBOL (“interest”>>>) : Exports the symbol “interest_rate” because it is the only symbol that begins with “interest”.

EXPORT SYMBOL (“i”>>>“rate”>>>) : Exports the symbol “interest_rate” because it is the only symbol that begins with “i” and subsequently contains “rate”.

EXPORT SYMBOL (<<<“i”>>>“rate”) : Results in a “Multiple matches for wildcard specification” error. Both “prime_rate” and “interest_rate” contain an “i” and subsequently end in “rate”.

EXPORT SYMBOL (“inter”>>>“prime”) : Results in a “No matches for wildcard specification” error. No symbol begins with “inter” and subsequently ends in “prime”.

EXPORT SYMBOL (<<<) : Results in a “Multiple matches for wildcard specification” error. This symbol matches all three symbols and therefore is not valid. An export statement can result in only one exported symbol.