The Substring command allows you to extract strings from strings. Data can be moved to and from memory variables, record/fields and system variables. You can define the start (beginning position) and length of the string to be extracted by delimiters, a fixed position, or a variable position.
Source String – the object from which a string is extracted. Choose from:
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the Source String text box.
Record/Field – displays next to the Rule Command window. Navigate down through a record to reveal the fields. Drag a field and drop it on the Source String text box.
System Variable – displays next to the Rule Command window. Drag a system variable and drop it on the Source String text box.
Substring Start – specifies the starting position of the first character of the substring.
Delimiter Based – The Select a Delimiter window displays next to the Rule Command window. Drag a delimiter and drop it on the Substring Start text box. (See the appendices for a list of ASCII characters that can be used as delimiters.)
If a delimiter was chosen, select the character from the displayed list and enter the number of the delimiter in the additional text box that displays. (For example, enter 1 for the first occurrence of a delimiter in the string.)
Constant Length – Enter the value of the starting position (first character = 1) in the text box on the Constant Value window that displays and select OK. The value is automatically entered in the Substring Start text box.
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the Substring Start text box.
Substring Length – specifies the length of the substring.
Constant Length – enter the value of the length in the text box on the Constant Value window that displays and select OK. The value is automatically entered in the Substring Length text box.
Memory Variable – the Memory Variables window displays next to the Rule Command window. Drag a memory variable and drop it on the Substring Length text box.
Delimiter Based – the Select a Delimiter window displays next to the Rule Command window. Drag a delimiter and drop it on the Substring Length text box. (See the appendices for a list of ASCII characters that can be used as delimiters.)
If a delimiter was chosen, select the character from the displayed list and enter the number of the delimiter in the additional text box that displays. The delimiter number is the number since the start position. (For example, to extract characters between the first and second comma, enter 1 as the start position for the first comma and one as the length delimiter count.)
Destination String – the object in which the extracted string is placed. Choose from:
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the Destination String text box.
Record/Field – displays next to the Rule Command window. Navigate down through a record to reveal the fields. Drag a field and drop it on the Destination String text box.
System Variable – displays next to the Rule Command window. Drag a system variable and drop it on the Destination String text box.