9.156 PUT_FIELD
Note: Built-In Function Rules Usage Options
Either inserts a new field into the LANSA Repository or updates details of an existing field.
Optionally this Built-In Function can present a prompt screen to the user that will allow details of a new or amended field to be further specified.
Argument values are exactly as the information presented in the Detailed Display of a Field Definition in the LANSA for i User Guide.
When a new field is being inserted into the dictionary, arguments that are not passed to the Built-In Function (or passed as null values) will adopt default values as described in Creating a New Field Definition in the LANSA for i User Guide.
When an existing field is being updated in the Repository, arguments that are not passed to the Built-In Function (or passed as null values) will remain unchanged by the update operation.
When zero is input as the 'Number of Decimals' parameter, it is treated as a null value. Use -1 in 'Number of Decimals' parameter to indicate a request to change the number of decimals of a field to zero.
If the copy validation checks option is used, all checks from the sequence number specified are deleted, then the validation checks are copied from the 'from field'. Any reference to the 'from field' in copied validation checks are replaced by the name of the field being inserted/updated.
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
|
Prompt control details
Byte 1 - Prompt required
Y = prompt the user
N = do not prompt the user
Byte 2 - EXIT/SYSTEM key
Y = enable EXIT/SYSTEM key
N = do not enable EXIT/SYSTEM key
Byte 3 - MENU key
Y = enable MENU key
N = do not enable MENU key
|
1
|
3
|
|
|
2
|
A
|
Req
|
Name of field to be inserted or updated
|
1
|
10
|
|
|
3
|
A
|
Opt
|
Field type
A = alphanumeric
S = signed decimal numeric
P = packed decimal numeric
|
1
|
1
|
|
|
4
|
N
|
Opt
|
Length of field or total number of digits in field.
Note: For type A must be in range 1 - 256.
For type P or S must be in range 1 - 30.
|
3
|
15
|
0
|
0
|
5
|
N
|
Opt
|
Number of decimal positions Not applicable to type A field.
If updating an existing field, use -1 to make this argument 0.
|
1
|
15
|
0
|
0
|
6
|
A
|
Opt
|
Reference field name
If updating an existing field, use '*NONE' to remove an existing reference field name.
|
1
|
10
|
|
|
7
|
A
|
Opt
|
Field description
|
1
|
40
|
|
|
8
|
A
|
Opt
|
Field label
|
1
|
15
|
|
|
9
|
A
|
Opt
|
Field column headings
List of 3 * A(20) headings
From - To Description
1 - 20 Column Head 1 21 - 40 Column head 2 41 - 60 Column head 3
|
1
|
60
|
|
|
10
|
A
|
Opt
|
Output attributes list
List of 10 * A(4) attributes
|
1
|
40
|
|
|
11
|
A
|
Opt
|
Input attributes list
List of 10 * A(4) attributes
|
1
|
40
|
|
|
12
|
A
|
Opt
|
Edit code or edit word If first char is a quote (') then value is an edit word. Otherwise it is an edit code.
Not applicable to type A field
|
1
|
20
|
|
|
13
|
A
|
Opt
|
Default value of field
|
1
|
20
|
|
|
14
|
A
|
Opt
|
Optional alias name of field
|
1
|
30
|
|
|
15
|
A
|
Opt
|
System field flag
YES = a system field
NO = not a system field
|
3
|
3
|
|
|
16
|
A
|
Opt
|
Initial public access Ignored for update operations
|
1
|
7
|
|
|
17
|
A
|
Opt
|
Keyboard shift
|
1
|
1
|
|
|
18
|
A
|
Opt
|
Prompting Process/Function The first 10 bytes are PROCESS name, the next 7 are FUNCTION name.
|
1
|
17
|
|
|
19
|
A
|
Opt
|
(Re)Copy validation checks from Repository field
|
1
|
10
|
|
|
20
|
N
|
Opt
|
Starting sequence for copy
|
1
|
3
|
0
|
0
|
|
Return Values
No
|
Type
|
Req/ Opt
|
Description
|
Min Len
|
Max Len
|
Min Dec
|
Max Dec
|
1
|
A
|
Req
|
Return code
OK = field inserted/updated
EX = prompt was terminated by EXIT/SYSTEM function key
MU = prompt was terminated by MENU/CANCEL function key
ER = argument details are invalid or an authority problem has occurred. In case of "ER" return code error message(s) are issued automatically.
|
2
|
2
|
|
|
|