9 10 BUILD_WORK_OPTIONS

LANSA Technical

9.10 BUILD_WORK_OPTIONS

Þ Note: Built-In Function Rules.

Dynamically converts a list of process and function names into a set of lists that are easy to use in "Work With" style RDML function drivers.

A list of process and function names are passed into this Built-In Function together with a "type" code. If type code is:

  • O - this function acts on a single instance of an object in the work list.
  • M - this function acts on multiple instances of objects in the work list.
  • B - this function acts on multiple instances of objects in the work list (in a batch).

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

L

Req

Working list containing the function details.

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

Each list entry should be formatted exactly as follows:

Bytes 1-2: Option Number (packed format)

Bytes 3-3: Function type (O, M or B)

Bytes 4-13: Process Name

Bytes: 14-20: Function Name

Bytes 21-50: Function Description

This list is updated by the Built-In Function in accordance to the following rules:

Any function that the user is not allowed to use is removed from the list.

All "O" entries are removed and moved to the return lists.

Any blank function descriptions are set to the correct current value (where it can be found).

50

50

 

 

2

N

Req

Entry length of the first list returned. This value must be in the range 40 to 80.

1

15

0

0

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

L

Req

Working list containing the Option Lines composed from all valid "O" entries of the 1st argument list.

The calling RDML function must provide a working list of an  aggregate entry length of exactly the length specified by the 2nd argument.

1

80

 

 

2

L

Req

Working list containing the option numbers of those type "O" functions that were placed into the previous list as valid options in text format.

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

Each list entry should be formatted as follows:

Bytes 1-2: Valid Option Number (packed format)

1

2

 

 

 

 

Examples

Imagine an input Definition List to this Built-In Function that contained entries like this:

Option

Type

Process

Function

Description

3

O

PROC01

FUNC01

Print Customer

4

O

PROC01

FUNC02

Change

5

O

PROC01

FUNC03

 

0

M

PROC01

FUNC04

Print all Customers

0

M

PROC01

FUNC05

 

0

B

PROC01

FUNC06

Print State Customer Sales

4

O

PROC01

FUNC07

Delete Customer

 

 

If this Built-In Function was executed, then it would return 3 lists that make "Work With" style functions easier to implement.

Returned Definition List

Option

Type

Process

Function

Description

0

M

PROC01

FUNC05

Send Outstanding FAXs

0

B

PROC01

FUNC06

Print State Customer Sales

 

 

Note

  • All "O" entries have been removed.
  • FUNC04 has been removed because the user is not authorized.
  • The description of FUNC05 has been inserted.
  • This list can be used to build a dynamic "menu" of functions to call (M) or submit (B).

Returned Textual List

Text (length 30, say) 

3=Print Customer 4=Change 

5=Send FAX to Customer

 

Note

  • Two list entries are returned because all the text details would not fit into text "lines" of length 30.
  • Options are "folded" so that they do not ever span an option text "line".
  • The description of option 5 has been inserted.
  • FUNC07 (option number 4) is not included because the user is not authorized to use it.
  • This list can be used to dynamically build the options area on work with style screen panels.

Returned Valid Options List

Option 

  03 

  04 

  05

 

Note

  • FUNC07 (option number 4) is not included because the user is not authorized to use it.
  • This list can be used to dynamically validate whether a user is authorized to an option number that they enter into a work with list.