9.176 PUT_TRIGGER

Note: Built-In Function Rules     Usage Options

Creates/amends a DICTIONARY or FILE level trigger into the data dictionary or file definition of the nominated field.

When adding a FILE level trigger to a field, the file involved, must have been previously placed into an edit session by the START_FILE_EDIT Built-In Function.

All argument values passed to this Built-In Function are validated exactly as if they had been entered through the online validation check definition screen panels.

Normal authority and task tracking rules apply to the use of this Built-In Function.

For more information refer to Field Rules/Triggers in the LANSA for i User Guide.

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

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Level of validation check.

D = Dictionary level

F = File level

1

1

 

 

2

A

Req

Name of field in dictionary to which trigger rule is to be applied.

1

10

 

 

3

N

Req

Sequence number of trigger.

1

3

0

0

4

A

Req

Description of trigger.

1

30

 

 

5

A

Req

Name of trigger function.

1

7

 

 

6

L

Req

Working list of trigger points.

The calling RDML function must provide a working list with an aggregate entry length of exactly 5 bytes and at most 6 trigger point value entries may be specified.

Each trigger point is associated with a "before" and an "after" entry. At least one trigger point must have one of these set to "Y".

The trigger point must be specified in 3 characters as one of:

OPN for Open

CLS for Close

RED for Read

INS for Insert

UPD for Update

DLT for Delete

Each list entry sent should be formatted as follows:

From - To   Description

1 - 3   Trigger position

4 - 4   Trigger before

5 - 5   Trigger after

5

5

 

 

7

L

Req

Working list of trigger conditions.

The calling RDML function may provide a working list with an aggregate entry length of exactly 36 bytes and at most 20 trigger conditions entries may be specified. Each list entry sent should be formatted as follows:

From - To   Description

1 - 3   Physical file name

1 - 3   AND / OR

4 - 13   Field name

14 - 16   Operation code

17 - 36   Value

36

36

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = field details returned

ER = field not accessible

In case of "ER" return code error message(s) are issued automatically.

2

2