| Note: Built-In Function Rules Usage Options |
Places an alphanumeric variable / value onto the exchange list
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Field name | 1 | 10 | ||
2 | A | Req | Value | 1 | Unlimited |
This Built-In Function does not return values.
This function can be used to exchange a variable to another function, with a different name. That is, exchange the value of field #CODEDES, but give the field a different name, e.g. #DESC.
********** Retrieve code description
**********
FETCH FIELDS(#CODEDES) FROM_FILE(CDMST)
**********
********** Exchange CODEDES as DESC
**********
USE BUILTIN(EXCHANGE_ALPHA_VAR) WITH_ARGS('DESC' #CODEDES)
CALL PROCESS(PPPPPPPP) FUNCTION(FFFFFFF)
This Built-In Function can also be used in place of the EXCHANGE command, i.e. to simply exchange a value.
EXCHANGE FIELDS(#VALUE)
CALL PROCESS(PPPPPPPP) FUNCTION(FFFFFFF)
is functionally identical to the following:
USE BUILTIN(EXCHANGE_ALPHA_VAR) WITH_ARGS('VALUE' #VALUE)
CALL PROCESS(PPPPPPPP) FUNCTION(FFFFFFF)