Token Programming
Defined Tokens
Stratagy I&M 06/02
7-17
T
o
ken Pr
ogramming
V( )
Search for value—the V( ) token searches the specified file, in the specified field, for the value given
by item. If Stratagy finds the value, it stores the contents of the second field into variable %Sn. If
Stratagy does not find the value, the token terminates and returns to the Done state.
If file ends with .DBF, Stratagy assumes it is in dBase format. Stratagy assumes field names instead
of field numbers and invokes dBase file processing (including record locking, if specified). Otherwise,
Stratagy assumes that it is the name of an ASCII file with columns separated by commas.
There may be several pairs of fields and %Sn values, and Stratagy retrieves them.
Syntax
V(file,field,item,field,%Sn[,field,%Sn...])
where:
file
dBase file (.DBF) or ASCII file with columns separated by commas (comma delimited). Valid
DOS file name. Can be a variable.
field
dBase file field name or ASCII file column number. (1 is the value of the field before the
comma.) Can be a variable.
item
An alphanumeric string. Can contain %S variables.
%Sn
One of the %S storage variables (range: 0~19).
Examples
A caller enters his customer number to hear his credit line:
@R(G1,%S1,20)
G1
Plays greeting 1: “Please enter your customer number.”
%S1
Stores the caller’s entry in variable %S1.
20
Waits 2 seconds (20
÷
10 = 2) for DTMF after playing the greeting.
@V(credit.doc,1,%S1,2,%S2)
•
Searches CREDIT.DOC for customer number %S1 in field 1.
•
Stores the contents of field 2 in variable %S2.
P(G2)P(%S2,$)
P(G2)
Plays Greeting 2: “Your credit line is ”
P(%S2,$)
Says the value stored in %S2 as a dollar amount: “five thousand dollars.”
Table 7-3
Defined Tokens (continued)
Token
Description
Содержание Stratagy Flash
Страница 20: ...Contents Index viii Stratagy I M 06 02 ...
Страница 24: ...Introduction Related Documents Media xii Stratagy I M 06 02 ...
Страница 52: ...Installation Step 16 Optional Back up Database Mailbox Names and Greetings 2 18 Stratagy I M 06 02 ...
Страница 102: ...Configure Stratagy SMDI Serial Integration 4 38 Stratagy I M 06 02 ...
Страница 204: ...Customization Examples Auto Menu Examples 8 28 Stratagy I M 06 02 ...
Страница 214: ...AMIS Networking AmisNodeList 9 10 Stratagy I M 06 02 ...
Страница 222: ...System Reports Report Menu Field Descriptions 10 8 Stratagy I M 06 02 ...
Страница 250: ...Special Greeting User ID Mailboxes Operator Mailbox Greeting B 6 Stratagy I M 06 02 ...