I_INIT

Initialize input fields

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall I_INIT(window_id, [set_name], [data_area][, field_list, ...])

window_id

The ID of the input window to process. (n)

set_name

(optional) The name of the input set. (a)

data_area

(optional) The name of the data area for the input set. (a)

field_list

(optional) One or more field specifications, or *ENABLED* to initialize enabled fields only. (a)

I_INIT initializes input fields. To initialize means to clear the input field(s) in the window, fill the field(s) with the appropriate paint character, and flag the field(s) as empty. I_INIT does not affect the enabled state of the field(s).

Data_area must correspond to the structure associated with the input set. Data_area only applies if you specify a set_name. By default, Toolkit does not ensure that data_area is large enough for the fields it references. Toolkit generates an error for this condition only if g_dtkbounds is set to 1 or greater. See g_dtkbounds.

You can specify up to nine field lists (field_list arguments), each of which can have from one to nine field specifications. If a field_list has multiple field specifications, separate the field specifications with any character except alpha characters, numeric characters, dollar sign ($), underscore (_), and square brackets ( [ or ] , which are used to enclose dimension specifications for repository arrayed fields). For example:

"name"

or

"name, birthday, soc_sec_no, employer, phone, policy_no, conditions[2]"

The maximum length of a field_list is 99 characters. Additional characters are ignored. For information on field specifications, see Field specifications.

You can do the following:

The following examples illustrate the five specification possibilities described above.

In this example only a window ID is specified. All fields in the window whose ID is stored in inpid will be initialized.

xcall i_init(inpid)

In this example both a window ID and a set name are specified. All fields in input set cusmas will be initialized.

xcall i_init(inpid, "cusmas")

In this example a window, a set, and a data area are specified. All fields in the data area cusmas that are associated with the input set named cusmas will be initialized.

xcall i_init(inpid, "cusmas", cusmas)

In this example window and a list of fields are specified. Fld1 and fld2[2,7] will be initialized. Their associated data areas will not be modified.

xcall i_init(inpid,,, "fld1, fld2[2,7]")

The final example specifies a window, a set, a data area, and a field specification containing two fields. The I_INIT routine will initialize the fields name and addr[2] after verifying that these fields are in input set cusmas.

xcall i_init(inpid, "cusmas", cusmas, "name, addr[2]")