You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

9.63 EXCHANGE_ALPHA_VAR

Places an alphanumeric variable / value onto the exchange list

Arguments

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



Return Values

This Built-In Function does not return values.

Example

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)

  • No labels