9 84 EXCHANGE_ALPHA_VAR

LANSA Technical

9.84 EXCHANGE_ALPHA_VAR

Þ Note: Built-In Function Rules.

Places an alphanumeric variable / value onto the exchange list

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

YES

 

 

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)