Chapter 11: Programming Amanda
121
V(file,field,
value{,field,
variable})
Command that searches the specified file for the first record that has the specified value
in the specified field. It retrieves values from up to 8 other fields in that record, putting
the retrieved values in the specified variables. See also the N() command.
file
A string or variable containing a valid DOS file name for the text or .DBF file. Use the
complete path to the file unless the file is in C:\AMANDA. No line in the file should ex-
ceed 143 characters. There is no limit to the number of lines in the file.
field
A number, string, or variable that indicates the number or name of a field. The first
field
indicates what field to compare with
value
; the additional (up to 8)
field
s indicate what
fields to copy into the corresponding variables. (.DBF files have field names; text files
have field numbers.)
value
A string or variable that contains the data to be compared with the contents of the spec-
ified field.
variable
One of port or global variables.
Example:
V("C:\\LISTS\\PHONE.LST",1,"JOHN",3,%S1,2,%S2)
searches the file PHONE.LST for the value JOHN in field 1. If the search is successful,
the value in field 3 of that record is stored in %S1 and the value in field 2 is stored in
%S2.
Failure:
If no record is found
%W
System variable that contains the day of the week (1 is Sunday, and 7 is Saturday).
W(n,[event
[,mailbox]])
Command that tells Amanda to:
•
Wait a number of tenths of a second
•
Wait for an event, such as a dial tone or another appropriate answer. If the
event does
not
occur, Amanda goes to the specified mailbox.
n
Without an event parameter (P, V, or T), a number of tenths of a second.
For dial tone (T), the number of seconds.
For pager (P) and voice (V), the number of rings to wait before continuing. If n is 0 for
pager or voice, the 0 is replaced with the value of rmt_rna, a configuration option that
you define using the Setup utility.
event
The event that Amanda waits for:
P
A pager answer
V
A voice answer
T
The dial tone
mailbox
Any valid mailbox or a variable containing a mailbox. Specifies the mailbox to which
control should be transferred if the event does not occur.
Examples:
W(3)
makes Amanda pause for 3 tenths of a second
W(3,P)
makes Amanda wait up to three rings for a paging/beeping system to answer. Use this
to confirm that the paging company answered before playing the DTMF digits to be dis-
played on the pager.
W(4,V,111)
makes Amanda wait up to four rings for a voice. If a voice is detected, processing con-
tinues with the next token. Otherwise, control is transferred to mailbox 111.
Failure:
Invalid mailbox
Event does not occur and no mailbox is specified
%X
System variable that contains the codes needed to get the transfer dial tone on the current
port. Each port has its own %X. This is the setting of the dl-dtwait configuration option
(usually F-).
Alphabetical Token Reference (Continued)
Token Syntax
Description
Содержание [email protected] Version 3.xx
Страница 1: ...Installing AmAndA Work Place Version 3 xx Installer s Guide Edition 7 01...
Страница 4: ...iv Installing Amanda Work Place...
Страница 60: ...52 Installing Amanda Work Place...
Страница 68: ...60 Installing Amanda Work Place...
Страница 132: ...124 Installing Amanda Work Place...
Страница 150: ...142 Installing Amanda Work Place...
Страница 156: ...148 Installing Amanda Work Place...
Страница 194: ...186 Installing Amanda Work Place...
Страница 206: ...198Installing Amanda Work Place...