9 120 GET_MULTVAR_LIST

LANSA Technical

9.120 GET_MULTVAR_LIST

Þ Note: Built-In Function Rules.

Retrieves a list of multilingual variables (*MTXT) and their value in the current language and returns them to the calling RDML function in a variable length working list.

Þ This is a Specialized Built-In Function for use in a Development Environment only.

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

NO

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Positioning *MTXT variable. The returned list starts with the first *MTXT variable whose name is greater than the value passed in this argument.

1

20

 

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

L

Req

Working list to contain *MTXT variable information.

List must not be more than:
32767 entries in Windows
9999 entries on IBM i.

The calling RDML function must provide a working list with an aggregate entry length of exactly 108 bytes.

Each returned list entry is formatted as follows:

From - To   Description

1 - 20   *MTXT variable name

21 - 98   *MTXT value in current language

99 - 108    << for future expansion >>

108

108

 

 

2

A

Opt

Last *MTXT variable in list Typically this value is used as the positioning argument on subsequent calls to this Built-In Function.

1

20

 

 

3

A

Opt

Return code.

OK = list returned partially or completely filled with *MTXT variable details. No more *MTXT variables exist beyond those returned in the list.

OV = list returned completely filled, but more *MTXT variables than could fit in the list exist. Typically used to indicate "more" *MTXT variables in page at a time style list displays.

NR = list was returned empty. Last *MTXT variable in the list is returned as blanks.

2

2

 

 

 

 

Example

A user wants to print a list of all *MTXT variables.

DEF_LIST      NAME(#MTXLST) FIELDS(#MTXNAM #MTXVAL #SPARE)       
              TYPE(*WORKING) ENTRYS(1000)      
**********    -Define the report layout-      
DEF_REPORT    PRT_FILE(QSYSPRT)      
DEF_HEAD      NAME(#HEAD01) FIELDS(#TEXT #PAGE . . . )      
DEF_LINE      NAME(#MTXPRT) FIELDS(#MTXNAM #MTXVAL)      
**********    -Set start *MTXT variable to blanks-      
CHANGE        FIELD(#MTXVAR) TO(*BLANKS)      
**********    -Get list of system variables-      
USE           BUILTIN(GET_MULTVAR_LIST) WITH_ARGS(#MTXVAR) 
              TO_GET(#MTXLST)
**********    -Process list-      
SELECTLIST    NAME(#MTXLST)      
**********    -Print *MTXT variables-      
PRINT         LINE(#MTXPRT)      
ENDSELECT            
**********    -Close printer file-      
ENDPRINT