7.54.1 EXCHANGE Parameters

FIELDS

OPTION

FIELDS

Specifies the name of the field(s) to be exchanged or the name of a group that defines the field(s) to be exchanged. For more details of how field and group names can be specified, refer to Field Groups and Expandable Groups. Alternatively, an expandable group expression can be entered in this parameter.

The contents of a BLOB/CLOB, not just the filename, will be moved when exchanging with a server or through Job Queues. This is because the file must be visible on the other end of the communications link.

OPTION

Specifies when the nominated fields are to be exchanged.

*NOW or N which is the default value, indicates that all nominated fields should be mapped into the exchange list now (ie: at this point in the program logic). This version of the EXCHANGE command is considered to be an executable command because it causes the fields to be placed into the exchange list at this point in the RDML program (and nowhere else).

*ALWAYS or A, the other allowable value, indicates that all nominated fields should be automatically mapped into the exchange list at several pre-defined points during the program's execution. These pre-defined points are:

The use of OPTION(*ALWAYS) creates a version of the EXCHANGE command that is considered to be a declarative command because it does not directly execute within the program. It declares that certain logic should be executed at other (pre-defined) points in the program. Usually this type of EXCHANGE command is coded at the beginning of the program, however it may be coded anywhere in the program.