Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

STRUCT

STRUCT

Generates a struct with element names and data types based on the specified arguments.

Syntax

STRUCT(element_name1, value1 as any [, element_name2, value2 as any] ...)
The following table describes the arguments for this command:
Argument
Required/Optional
Description
element_name1
Required
The name of the struct element.
value1
Required
Any data type. The value of the struct element.
If you use the STRUCT function in an output expression for a struct port, the function arguments must match the data type of the elements in the complex data type definition.

Return Value

Struct.

Examples

The following expression generates a struct.
STRUCT(city , ‘New York’, state, ‘NY’)
RETURN VALUE
{ city:New York state:NY }
The following expression generates a struct for a struct output port with a complex data type definition
adrs_typedef
:
STRUCT(city, cust_city, state, cust_state)
The complex data type definition
adrs_typedef
is defined in the type definition library as follows:
adrs_typedef{ city : string state : string }
cust_city
cust_state
RETURN VALUE
NEWYORK
NY
{ city:NEWYORK state:NY }
REDWOOD CITY
CA
{ city:REDWOOD CITY state:CA }

0 COMMENTS

We’d like to hear from you!