Access members

Members of a Data Set variable can be used where a variable of the corresponding type is allowed.

Use <Data Set variable>.<name of the member> to refer to a member.

If the member is MAP, ARRAY, FIELDSET, or another Data Structure variable, you can also directly refer to an element in the member.

ASSIGN life_insurance.PolicyNumber := "652365X4564" (* 
Assigning a member *) 
ASSIGN policy := text_fragment (life_insurance.PolicyNumber; 1; 5) (* Using 
a member *) 

Field Set members can be accessed either directly as a Field Set or on a Field-by-Field basis by referencing specific Fields.

ASSIGN customer.Person := Customer (* Copy the content of Customer to 
the Person member *) 
ASSIGN customer.Person.Name := "Bundy" 	(* Only change the Name field *) 
ASSIGN fullname := customer.Person.Name + "-" + customer.Partner.Name 

MAP and ARRAY members can be accessed as normal MAPs and ARRAYs.

ASSIGN customer.Children[1] := Child (* Copies 
FIELDSETs *) 
ASSIGN intermediary.Partner.Name := customer.Children[2].Name (* Copies one 
field *) 

If the members are Data Set types, the expressions can be combined into longer expressions.

ASSIGN customer.Children[1].Name := "Bundy" 
ASSIGN name := life_insurance.Benificiaries[4].Children[1].Name 

In the preceding example, the program accesses the fourth element from the Benificiaries member, which is defined as a Relation Data Set. In the Relation Data Set, the first element of the Children member is accessed, which is itself a Field Set. In this Field Set, the Name field is retrieved and assigned to the name variable.