This example adds the following to the previous example:
For this example, variable A is defined as a global collect variable of length 3 and a start of 1, and variable B (used as a temporary variable) is defined as a local collect variable of length 3 and a start of 1.
01 wait-time 2 secs hearing ringback
02 # Entry and Validation of Security Code
03 collect 16 digits after announcement V1 for none
04 goto step 6 if digits = V2
05 disconnect after announcement none
06 # This vector modifies the value of Variable A for global call flow
07 # control. Enter 111-Normal Ops, 222-Evacuation, 333-Severe Impairment
08 # or Enter 000 to exit
09 collect 3 digits after announcement V3 for B
10 goto step 32 if B = 000
11 # Play announcement to inform user what value they entered.
12 goto step 15 if B <> 111
13 announcement 61111
14 goto step 24 if unconditionally
15 goto step 18 if B <> 222
16 announcement 61112
17 goto step 24 if unconditionally
18 goto step 21 if B <> 333
19 announcement 61113
20 goto step 24 if unconditionally
21 # Non-valid digit string was entered announcement, please try again
22 announcement 61114
23 goto step 9 if unconditionally
24 # Please confirm that this is the desired value 0-no, 1-yes
25 collect 1 digits after announcement 61115 for none
26 goto step 30 if digits <> 1
27 set A = B ADD none
28 # Play announcement that value was changed and then disconnect.
29 disconnect after announcement 61116
30 # Value was not confirmed or incorrect - try again
31 goto step 9 if unconditionally
32 disconnect after announcement none