9 139 INSERT_IN_SPACE

LANSA Technical

9.139 INSERT_IN_SPACE

Þ Note: Built-In Function Rules.

Inserts a set of cell values into a space object. Refer also to the other SPACE Built-In Functions.

For use with

LANSA for i

YES

Only available for RDMLX.

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

R

Space Name

1

256

 

 

2-20

w

O

Fields whose values are to be inserted into the space cells. The fields used do not have to be the same as the field names used to prototype the cell. It is the values of the fields specified in these arguments that are mapped into the space cells.

1

256

0

9

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

O

Standard Return Code

"OK" = Cell values inserted successfully.

"ER" = Insert attempt failed. Messages issued will indicate more about the cause of the failure.

2

2

 

 

 

 

Technical Notes

The field values must be specified in the same order as the cells in the space were defined. Cells are matched by the order of their specification in arguments 2 -> 20. The names of the fields used have no bearing whatsoever on the cell mapping logic.

If you specify less field values than there are cells in the space then the non-specified cells are set to blank/zero/null values as appropriate.

If you specify more field values than there are cells in the space then the additional field values are ignored.

The provided field values MUST be enough to uniquely identify the entry being inserted.

 

Examples

This example inserts the current values of the fields #EMPNO, #GIVENAME and #SURNAME into a space whose name is contained in field #SPACENAME:

Use Insert_in_Space (#SpaceName #Empno #GiveName #SurName)

 

This example inserts literal values into a space named TEST:

Use Insert_in_Space (TEST A0090 'Mary' 'Jones');