home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
ZCOMMDOC.ZIP
/
ZCOMMDOC.AH
< prev
next >
Wrap
Text File
|
1991-08-05
|
76KB
|
1,771 lines
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 211
given a configuration command to set the proper action to take when
receiving a break signal.
B Sets the duration of the break signal in tenths of a second, default
2 (200 milliseconds). !=2 .li c Enables Cybernetic Data
Recovery(TM) on XMODEM and YMODEM transfers. Setting this parameter
to 0 accommodates programs with non standard XMODEM/YMODEM protocols
and slightly quickens file transfers. The default value of 1
provides optimum reliability for XMODEM and YMODEM transfers with
programs that meet the XMODEM/YMODEM spec.
Setting this parameter to -1 disables the quick file compare
provided by the r option.
C Sets the number of times ZMODEM will attempt to send a command (as a
result of a zcommand command) (default 11).
d Sets a delay time in tenths of seconds that the sz command will wait
for a ZMODEM packet in response to the rz<ENTER> string it sends to
the remote before sending a ZMODEM packet. This facilitates
automatic ZMODEM uploads to VMS, which interrupts programs with the
Ctrl-X character. The call command resets this parameter to its
default of 1. Higher values increase the startup time when the
receiving ZMODEM program is started before the sender. .li e If non
zero, escape all control characters. This allows ZMODEM transfers
to operate over data PBX and other systems that freak out when they
receive control characters.
d Some operating systems, most notably VAX/VMS, use ^X to stop
programs. ZMODEM uploads consist of a "rz" command to start the rz
program followed by a ZMODEM packet. If the ^X in the ZMODEM packet
causes problems, the zmodem d parameter can be used to delay the
initial ZMODEM packet until the rz program initializes itself. The
zmodem d parameter sets a delay in tenths of a second on ZMODEM
sends (uploads) between the "rz" command and the first packet.
f Flow control mask, only used with Unix/Xenix systems. Setting this
to 0 (the default) disables hardware (RTS/CTS) flow control for
Xenix/Unix systems with broken hardware flow control. On Xenix/Unix
systems where only CTS flow control works properly, set this to 8192
to allow CTS flow control only. If both RTS and CTS flow control
work properly (rare!) you can use a value of -1 to enable both bits.
.li F Sets the pause after each data subpacket sent with the sz
command when the F option is used, or when failing flow control is
detected. The default value of 1 causes a one tenth second delay.
SEE ALSO: F option On some Unix operating systems the pause will be
rounded up to the next second or two.
l Normally, the ZMODEM "packet length" ("block length") is the file
length. Setting this parameter non zero forces ZMODEM to close a
(C) 1990 Omen Tech Inc Chapter 24 Numeric Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 212
frame and wait for an ACK after each # bytes (default 0). This
makes ZMODEM behave like XMODEM, YMODEM, or JMODEM, which wait after
each block/packet for an acknowledgement before going on to the next
block. The packet length may be adjusted to prevent buffer overflow
in data PBX systems. The call command resets this parameter to 0.
L (Default 0) If non zero, overrides the nominal length of data
subpackets within each ZMODEM frame. A smaller value speeds error
recovery on noisy lines, a large value (maximum 1024) reduces the
overhead of CRC characters. The call command resets this parameter
to 0.
Please note that streaming ZMODEM has no direct equivalent to
XMODEM/YMODEM/JMODEM block length unless the zmodem l parameter is
set non zero. In the absence of errors, ZMODEM normally sends the
entire file without pause. If somebody claims ZMODEM's 1024 byte
subpacket length is slowing things down by more than one half per
cent, he doesn't understand ZMODEM and should be ignored.
n Sets the number of NULLS (default 0) sent before each ZDATA frame.
Some buffered modems (Fastcomm) have a firmware bug which loses
characters when changing the direction of transmission. This causes
data frames to fail with a CRC or other error. ZMODEM n parameter
values in the range of 100 to 150 have obviated this syndrome.
P When set to 2 (the default), purge the transmit buffer and force a
receiver response when a CR/LF sequence (indicating a PC-Pursuit
DATA LOSS message) is detected. A value of 1 does not purge the
transmit buffer. A value of 0 disables special processing of CR/LF
sequences received by the sending ZMODEM.
w If non 0, restrict the ZMODEM transmit window to the specified
number of bytes. Setting this parameter to N requests
acknowledgements from the receiver every N/4 characters. ZCOMM then
waits for acknowledgements from the receiver whenever it has sent N
more characters than it has received acknowledgements for. This
parameter is useful with networks with defective flow control, and
with networks that store an excessive number of characters in
transit. The call command resets this parameter to 0.
W Adjusts the number of characters the ZMODEM receiver will silently
ignore when searching for the beginning of a new frame. This may be
set larger to accomodate networks with excessive in transit storage,
smaller to speed error recovery from long error bursts on direct
connections. The call command resets this parameter to the default
(1400).
Z Number of minutes (default 0) to adjust the file modification date
when using the Telink or Clink/SEAlink file transfer protocol to
transfer a file between different time zones.
(C) 1990 Omen Tech Inc Chapter 24 Numeric Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 213
The timeout parameters below may be set lower for faster X/YMODEM
error recovery when transferring files between two micros, higher to
accomodate extremely sluggish systems. Only in pathological cases is
it necessary to modify these parameters. The call command resets
these parameter to their defaults.
p Timeout in tenths of seconds for gaps within a packet (default 100).
r If non zero, remove incomplete files received with a protocol except
those received with the + option (default 0).
R When non 0, limits the number of bytes of file comparision used with
the sz and rz -rr option. This parameter may be set to a value
between 2048 and 32000 (1 billion on 32 bit systems). This
parameter is given to the receiving program.
EXAMPLE: z pR30000
SEE ALSO: -rr option
s Timeout interval in seconds waiting for XON characters or positive
flow control (default 15). If an XON is not received within this
time, transmission resumes anyway. A value of 0 disables this
timeout.
t XMODEM, YMODEM, and ZMODEM Receiver timeout in tenths of seconds
waiting for a packet or command acknowledgement (default 100).
T Transmitter timeout in tenths of seconds waiting for a packet
(default 600).
(C) 1990 Omen Tech Inc Chapter 24 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 214
25. STRING PARAMETERS
Case is significant in parameter names.
ZCOMM provides two types of string parameters, permament and
temporary. Permanent string parameters are always defined, and most
perform specific defined functions. The permanent string parameters
are described below. The names of the permament string parameters may
be displayed with the command sequence pv1; set given at the command
prompt. Without the pv1 only non empty string parameters are
displayed.
Temporary string parameters* are created by the set, sets, accept, and
grab commands when they do not reference a permament string parameter.
Temporary string parameter names begin with any letter except y and
may have up to 16 letters or digits.
The contents of temporary string parameters may be accessed and
modified when ZCOMM is Restricted. New temporary string parameter
names may not be created when ZCOMM is Restricted.
The set command without arguments displays the current values and
maximum string length for each of the non-empty string parameters. To
set a parameter empty, enter "" as the parameter string (e.g., set
txlog ""). Certain string parameters may be entered with ZCOMM's
character escapes.
When a string parameter is executed, it may be either sent to the
remote as a string or executed as a command if its first character is
@.
EXAMPLE: set f7 "logout\r" programs F7 to send a string to the remote.
EXAMPLE: set f7 "@echo logout" programs F7 to display logout on the
screen.
In strings sent to the remote, a \336 (octal 336) character causes a
pause in transmission[1] (controlled by the p numeric parameter),
which may be used to send multiple commands with one string.
An optional underscore prepended to the name of a permament string
parameter causes that string parameter to be cleared by the next call
command.
__________
1. Not including the mput command
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 215
The following string parameters may not be accessed or modified by the
set command or in string expansions when ZCOMM is Restricted:
backtab bbs break bs esc etx exrc f1...f12 fs1...fs12 fc1...fc12
fa1...fa12 fcdel* fcdown* fcend* fchome* fcins* fcleft* fcpgdn*
fcpgup* fcright* fcup* fdel fdown fhome fins fleft fnp5* fpgdn
fpgup fright fup id0...id3 intolink* l linkpass* m oncloserx
onclosetx onexit outahost outalink* password pw0...pw3 quitcmd rub
tab unrestrict xpassword*
The following may not be modified by the set command when ZCOMM is
restricted:
MODEM answerback altprompt baudstr blankfill call1** call2 call3*
callers* calllog* callpath** challenge dircx dirpx dirfx dirrx
dirsx disks dport e emdir entstr eolstr helpfile home hprompt lib
lpnono mcommand mconnect menu messages mprefix mprompt msuffix n1
n2 n3 phones picture plog private rcmdlog* rdisks remote rname*
rxlog* telno tmp tname* twxfile txlog* welcome xhelpfile
The following parameters can never be modified by the set command: ano
args c d drive e h nodename oname1...oname5 parity pwd s speed t w
y y0...y127 yb yf
String Parameters for Remote Operation:
answerback baudstr bbs call1** call2 call3* callers callpath**
challenge dircx dirfx dirrx dirsx disks emdir exrc helpfile home
hprompt intolink* linkpass* menu messages oncloserx onclosetx
outahost outalink* password private pwd rcmdlog* rdisks rmtcmd*
rname* rmtcheck* tname* twxfile unrestrict welcome xhelpfile
String Parameters for Protocol File Transfer:
adlopts aulopts dirrx dirsx oncloserx onclosetx
String Parameters for Non Protocol File Transfer:
blankfill dircx dirfx eolstr tmodes
String Parameters for Interactive Operation:
Soft Keys altprompt backtab break bs dirpx entstr esc etx lpnono
mprompt parity rub tab tmodes xpassword*
String Parameters for Scripts:
ano args c d e h ifs item lib oncloserx onclosetx onexit nodename
oname1...oname5 remote rxcnt s s0...s9 t tmodes tmp y y0...y127 yb
yf
String Parameters for Making Calls:
MODEM l m mcommand mconnect mprefix msuffix telno
String Parameters for Log Keeping:
callers* calllog* plog rcmdlog* rxlog* txlog*
Other String Parameters:
helpfile home kermreset menu onexit picture phones quitcmd
MODEM (Note this variable name is UPPER CASE to allow importing
from the environment.) When the advanced dialer described in
Chapter 9 is used, MODEM contains the file name of the modem
specific dial routine to use.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 216
adlopts Contains option(s) to be used for ZMODEM AutoDownloads.
EXAMPLE: set adlopts "r" Use the r option (crash recovery)
for files automatically downloaded with ZMODEM.
alds An optional string to be used for controlling Alternate Long
Distance Services. On Unix systems, allows assignments to
the ALT keys a to z.
ano After invoking one of the date related string parameters, the
ano string contains the last two digits of the year.
answerback When term is in q (TWX) mode, an answerback is sent in
response to an incoming ENQ. The format of Answerback is
determined by the Western Union Telegraph Company. It
typically consists of \r\nNAME CITY\r\n\021 as entered by the
set command using character escapes. (In the TWX protocol,
the 021 (XON) at the end of the answerback turns on the tape
reader.) The answerback string must begin with CR,LF.
args contains the complete calling sequence to the current script
level.
EXAMPLE: call ge,upl accesses the genie telephone directory
entry and stores ge.upl in args.
altprompt Overrides the default auxilliary command prompt generated by
the ALT-2 key.
EXAMPLE: set altprompt "\r\E[1m%drive:\L%pwd >>>\E[m "
Display the current disk drive (%c) and directory (%pwd)
highlighted (\E[1m) and in lower case (\L).
N.B.: If you access Unix systems with ZCOMM, choose an
altprompt string that is distinct from your Unix prompt.
SEE ALSO: hprompt, mprompt, nodename, drive, pwd string
parameters
aulopts Contains option(s) to be used with the sz command. aulopts
is processed by the sz command before any options given to
the command itself.
backtab Assigns a string or command to the BACKTAB (Shift TAB) key.
baudstr When ZCOMM gets a connect in host operation, ZCOMM executes
baudstr.
EXAMPLE: set baudstr "@gosub .%lib/baud.t"
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 217
bbs May contain a shell escape command to activate a Bulletin
Board program via a DOS Gateway. The bbs string parameter is
always processed as a shell escape command, and should not
include a leading "!". For security reasons, it should
specify an absolute pathname.
EXAMPLE: set bbs "~bbsprog"
blankfill When transmitting a file with the term function with p, r,
or w modes, ZCOMM sends the contents of blankfill (if set) to
prevent the remote from receiving a blank (empty) line.
(Some programs interpret a blank line as an exit from text
entry.) ZCOMM Character Escapes must be used to represent
control characters. If blankfill is empty, nothing is sent.
The call command resets blankfill to empty.
break Stores a string or command to be executed by the Ctrl-Break
key instead of the default 100 ms break.
EXAMPLE: Some Novation modems cannot pass a break signal:
set break "@break putw %B\336\ 1\r putw %U\336\ 0\r"
Causes the break key to send a break to get the modem's
attention, then tells the modem to send the break itself, and
finally restores
the modem's ersatz "transparent" mode.
SEE ALSO: break command
bs Stores an alternate string or command to be executed by the
backspace key when in the term function.
c When the h or s string parameters is accessed, the hundredths
of a second are stored in the c string parameter. The
accuracy and precision of this quantity depend on the
operating environment.
call1 ** Sets the string to be sent to the modem or command to be
executed before each time ZCOMM scans for outgoing message
control scripts. Typically this would consist of a modem
command disabling autoanswer, to allow outgoing calls. This
string is not used if callpath is empty.
EXAMPLE: set call1 "ATMS0=0\r" (Hayes Modem)
call2 Sets the string to be sent to the modem or command to be
executed each time ZCOMM begins to wait for a call in Host
State. Typically this would command the modem to enable
autoanswer for incoming calls.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 218
EXAMPLE: set call2 "ATMS0=1\r" (Hayes Modem)
call3 * Sets the string to be sent to the modem or command to be
executed each time ZCOMM begins waiting for incoming calls.
Typically this would consist of a lput command to display an
informational message on the local screen. Note that such a
message will remain on the screen for long periods of time,
possibly creating an afterimage on the CRT display.
EXAMPLE: set call3
@lput "\n\nAwaiting Incoming Call. Press F1 to exit.\n"
callers A pathname in which a log of successful host state logins is
kept. If callers is null (the default), no log is kept.
calllog * The filename that contains the log of successful autodialed
calls. If empty (the default), this function is disabled. A
typical entry with 6.3 minutes connect time with a system
called cis02 is shown.
C 2143:22 01-25-84 1200 c:226-0627 63 cis02
callpath ** Sets the ambiguous pathname that scans for scripts to
transmit outgoing messages. If empty (the default), no scans
are made.
EXAMPLE: set callpath "/tmp/outmsg.*"
NOTE: The "disks" string parameter must be set to include any
drive specified in "callpath".
SEE ALSO: call1, call2 string parameters
challenge is executed when the caller connects and handshakes to
determine transmission speed. This script runs without
restriction, and should check for carrier after each reading
of data.
EXAMPLE: set challenge "@gosub .%lib/challeng.t"
d Is set to the date when called, in the form "mmdd".
EXAMPLE: t cia%d.TXT If the date is December 7, ZCOMM enters
the term function with capture to KGB1207.txt
EXAMPLE: create -st+ cbbs%d.tmp
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 219
SEE ALSO: h, t string parameters
drive Is set to the current default disk drive letter when ZCOMM
starts and when logging into a new disk drive with an A:
command. nodename, altprompt, mprompt, hprompt string
parameters
dircx
dirpx
dirfx
dirrx
dirsx String parameters for default/override directories. Their
uses are described in Chapter 16.
disks Contains the disks that may be logged into with with the d:
command where "d" is the drive letter, or that may appear as
part of a pathname. If empty (the default), drive letters
are not checked. This parameter should be set to prevent
local or remote users from hanging the system by accessing an
off-line disk drive. This string must be entered in lower
case.
EXAMPLE: set disks "abc"
SEE ALSO: home, rdisks string parameters
dport Contains the name of the active communications port,
otherwise empty.
SEE ALSO: port command
drive Contains the drive letter of the current default DOS disk
drive.
emdir A directory pathname for incoming electronic mail files.
emdir affects twxfile unless twxfile is an absolute path.
emdir is also used for incoming electronic mail using the
YMODEM Batch protocol in the absence of a login.
EXAMPLE: set emdir "/memo"
entstr If entstr is set, ZCOMM sends the contents of entstr when
ENTER (carriage return key) is keyboarded in the term
function, unless n mode is in effect. ZCOMM Character
Escapes must be used to represent control characters. If
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 220
entstr is empty, a carriage return is sent. The "call"
command resets entstr to empty.
EXAMPLE: set entstr "\3"
sends an ETX (octal 3) when Enter is keyboarded. This is
handy for some computer systems that expect keyboarded lines
to be terminated with something other than the usual carriage
return.
NOTE: The characters in entstr are always sent at full speed.
SEE ALSO: eolstr string parameter
eolstr When transmitting a file with the term function with p, r, or
w modes, ZCOMM sends the contents of eolstr (if set) to
terminate the line. ZCOMM Character Escapes must be used to
represent control characters. If eolstr is empty, a carriage
return is sent. The "call" command resets eolstr to empty.
EXAMPLE: set eolstr "\r."
sends a carriage return followed by a period at the end of
each line read from the transmit file.
NOTE: The characters in eolstr are always sent at full speed.
SEE ALSO: entstr, blankfill string parameters
esc Stores an alternate string or command to be executed by the
ESC key when in term function.
etx Stores an alternate string or command to be executed by ETX
(Ctrl-C) when in the term function.
exrc Is sent to the modem/executed when an interactive Host
Operation session logs out.
EXAMPLE: set exrc "@handshake off; set disks c" turns off
flow control handshaking and resets the disks parameter in
case privileged (unrestricted) callers modify this parameter.
h is set to the hour of the day in the form hhmm.
EXAMPLE: echo "It is now %h Hours"
displays: It is now 1930 Hours.
SEE ALSO: hh, mm, d, t string parameters
helpfile The pathname that contains the online help file. You may
wish to set this in the phone directory "setup" entry. Iff
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 221
helpfile begins with the character @, the rest of helpfile is
treated as a Zcomm command.
SEE ALSO: xhelpfile string parameters, help command, T test
condition
hh is set to the hour of the day in the form hh.
EXAMPLE: echo "It is now hour %h."
displays: It is now hour 09.
SEE ALSO: h, mm, d, t string parameters
home When ZCOMM is invoked, home is set to the current directory.
When the "cd" command is given without an argument, the
directory is changed to the contents of home. When ZCOMM is
Restricted, absolute pathnames (those beginning with \ or /)
must have home as a prefix. This restricts unprivileged
users to the directory given in home and/or its
subdirectories on any of the disks allowed by the disks
string parameter. When changing the value of home, use
slashes (/) and not backslases (\), and do not use a disk
identifier.
SEE ALSO: disks string parameter
hprompt Overrides the default host operation command prompt.
SEE ALSO: altprompt, mprompt, nodename, drive, pwd string
parameters
id0-id3 General purpose string parameters that may be used to hold ID
strings (user account numbers) for script login applications.
ifs The "Internal Field Separator" string contains the default
characters to be used by the split command to parse a string
into fields.
item * When the expand command is executing a script, the item
string parameter is set to the pathname of the matched file.
intolink * A command that is executed or a string sent to the modem
when ZCOMM enters the link command.
EXAMPLE: set intolink "\r" sends CR to the linked computer.
EXAMPLE: set intolink "@portx 0f8,2" selects a nonstandard
link port.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 222
SEE ALSO: linkpass, outalink string parameters
kermreset A string (up to 32 characters) may be sent by Pro-YAM's
Kermit when it attempts to recover from a transmission error.
The default value for this string is empty. Two
metacharacters are special: \336 inserts a one second pause,
\335 sends a break.
l l (letter l) selects a long distance carrier for calls to
other area codes. It is set to "1" as a default. l may be
set to the access code of the particular alternate long
distance service desired with a "set" command.
SEE ALSO: m string parameter
lib A string variable which may be used to indicate the directory
containing scripts.
linkpass * If set, callers must enter this password when accessing the
link command.
lpnono Do not send any of the characters in lpnono to the printer.
lpnono may use ZCOMM Character Escapes to represent control
characters.
EXAMPLE: set lpnono "\023" prevents the printer from
receiving the DC3 (XOFF) character that places some printers
off line.
EXAMPLE: set lpnono "\7" prevents the printing of bell
characters.
SEE ALSO: l mode
m m selects a long distance carrier for calls within the same
area code. It is set to "1" as a default. m may be set to
the access code of the particular alternate long distance
service desired with a "set" command. It is separate from
the l string parameter because the default "1" prefix may not
work if the area code is given, but some alternative long
distance services require the area code to be specified for
calls within the same area code.
SEE ALSO: l string parameter
mcommand A command that is executed instead of ZCOMM's built in
dialing routine.
This may be either "gosub dial" which would access the "dial"
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 223
entry in the phones file, or "source /dial" which would
access the script from a separate file. The second method
allows a separate "dial" file for each machine, but requires
one more file to be kept track of.
Note that mcommand does not start with an @. The default
value is empty, disabling this function.
EXAMPLE: set mcommand "gosub dial"
SEE ALSO: telno string parameter
mconnect A command that is executed or string that is sent to the
modem when the modem makes a connection. A typical use is to
set transparent mode for some Novation modems. The default
value is empty, disabling this function.
menu The filename that contains the script accessed by the menu
command.
EXAMPLE: set menu /host/menu.hst
messages Messages entered with the message command are appended to
this pathname. By convention, this file should be readable
when ZCOMM is running in Restricted host mode.
EXAMPLE: set messages "/host/messages"
mprefix A command that is executed or a string that is sent to the
modem as a prefix to dialing a number. The default ATD works
with the Hayes Smartmodem(TM) 1200. ATDT instructs the modem
to use DTMF (Touch Tone(TM)) dialing instead of pulse
dialing. Character escapes may be used.
mm is set to the minute of the hour. It expands to the form mm.
EXAMPLE: echo "It is now %h minutes past the hour"
displays: It is now 30 minutes past the hour.
SEE ALSO: h, hh, d, t string parameters
mprompt Overrides the default main command prompt.
EXAMPLE: set mprompt "\r\E[1m%drive:\L%pwd <<<\E[m "
Display the current disk drive (%c) and directory (%pwd)
highlighted (\E[1m) and in lower case (\L).
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 224
N.B.: If you access Unix systems with ZCOMM, choose an
mprompt string that is distinct from your Unix prompt.
EXAMPLE: set mprompt "\r\E[1m%nodename:%drive:\L%pwd <<<\E[m
"
SEE ALSO: altprompt, hprompt, nodename, drive, pwd string
parameters
msuffix A command that is executed or a string sent to the modem
after the last digit in the phone number. Most intelligent
modems require the default value of "\r".
n0-n9 General purpose string parameters.
nodename Contains the node name given to individual Unix and Xenix
systems. On other systems this must be set by a script.
SEE ALSO: Unix uname command
oname1...oname5 contains the information stored by the args string
parameter for each level.
oncloserx Optional user exit commands to execute after each file is
received with a protocol file transfer.* Its use is described
in Chapter 13.
onclosetx Optional user exit commands to execute after each file is
sent with a protocol file transfer.* Its use is described in
Chapter 13.
onexit Optional commands to execute as ZCOMM exits to the operating
system.
EXAMPLE: set onexit "@echo GOODBYE!!"
outahost A command that is executed or a string sent to the modem when
ZCOMM exits host operation with a F1 or ALT-N key.
EXAMPLE: set outahost ATZ\r sends the ATZ command to a Hayes
modem to restore its default no autoanswer state.
outalink * A command that is executed or a string sent to the modem
when ZCOMM exits the link command.
EXAMPLE: set outalink "@kill; px0" clears the circular buffer
and prevents restricted callers from accessing the link
command.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 225
SEE ALSO: intolink string parameter
parity Contains a string representation of the number of data bits
and parity, such as 8n.
password Changes the password callers must enter to gain access to
your computer when ZCOMM is in host operation. If password
is empty no password will be demanded.
EXAMPLE: set password "Change This Already"
SEE ALSO: challeng.t script, demand command
phones The filename that contains the telephone directory entries
and associated commands used with the call and gosub
commands. The default is "/PHODIR.t". The default may be
changed at installation time by the putsnp program. The DOS
environment variable PHONES will override the default when
ZCOMM is started. Finally, a set command may be used to
change the telephone directory once ZCOMM has started.
picture The filename used by the ALT-Z command to "zap" a copy of the
display memory to the specified file.
plog The filename that contains the file transfer performance log.
If empty (the default), this function is disabled.
private Pathname that messages are stored into by the private
command. This file should NOT be readable when ZCOMM is
running in Restricted host mode.
EXAMPLE: set private "/private"
pw0-pw3 General purpose string parameters for holding passwords. If
defined with a set _pw0 "secretpw" command, it will be
cleared with the next call command.
pwd This parameter is set to the current working directory by
each cd and pwd command.
quitcmd Sets the string to be sent to the modem or command to be
executed when a protocol file transfer has been completed if
the ALT-Q key was typed during that transfer.
EXAMPLE: set quitcmd t\r\336\r\336\r\025off\r would send
t<ENTER>, a pause, <ENTER>, a pause, <ENTER>, and
^Uoff<ENTER>. This sequence may be useful for automatically
logging off Compuserve after downloading a file.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 226
SEE ALSO: ALT-Q special key
rcmdlog * The filename that contains the log of commands issued
remotely (in Host Operation) along with the time,
transmission speed, and the name of the caller. If set to
"prn", the commands are logged on the printer. A highly
buffered printer, hard disk file or ramdisk file is
recommended because this file will be opened and closed for
each host command. If empty (the default), this function is
disabled.
EXAMPLE: set rcmdlog D:rcmds
rdisks Contains the disks that may be logged into with with the d:
command where "d" is the drive letter, or that may appear as
part of a pathname, when ZCOMM is Restricted. If empty (the
default), drive letters are not checked against this
parameter. (Drive letters are always checked with the disks
parameter.) The rdisks parameter is used to prevent
restricted remote users from accessing private data files.
This string must be entered in lower case.
EXAMPLE: set rdisks "c"
SEE ALSO: home, disks string parameters
remote ZCOMM reads The full name of the remote system from the
telephone directory entry when the call command is given.
EXAMPLE: call omen using the omen entry in the distributed
PHODIR.t file assigns omen-tech to the remote string
parameter.
In Host Operation, the caller's name is read into remote.
SEE ALSO: call command, xpassword string parameter, \PXXXX
character escape
rmtcheck Sets the string to be sent to the modem or command to be
executed each time ZCOMM accepts a command line or ZMODEM
protocol Command Download from the remote caller when in Host
Operation, before that command is executed.
SEE ALSO: rmtcmd, pwd string parameters
EXAMPLE: set rmtcheck "@source D:remcheck.t"
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 227
rmtcmd Contains the command line entered by the caller or received
by ZMODEM protocol Command Download in Host Operation. This
may be modified by an unrestricted script invoked via the
rmtcheck string parameter.
SEE ALSO: rmtcheck string parameter, checkrmt.t script
rname * Contains the name of the last file received by a protocol,
successful or not.
rub Assigns a string or command to the RUBOUT (Shift Backspace)
key.
rxcnt A three digit number which counts the number of files that
have been created for receiving. An incoming file with an
illegal name is changed to rename.n with n is incremented
from the value stored in rxcnt (or 0).
rxlog * The filename that contains the log of received files. If
empty (the default), this function is disabled.
s * Contains the current time in seconds since the last minute.
s0...s9 These may be tested with the if %sN and if i%sN,string
commands, or expanded into a string using character escapes
with the "%sN" construction, where N is 1...9. Use set param
"" (empty string enclosed by double quote characters) to set
a string parameter to empty.
speed String representation of the serial port speed.
statliner May be used to place a messgae in the right side of the term
function status line, replacing the information normally
displayed there. If statliner begins with a space, it is
placed at the far right of the status line, after the
information normally displayed. If statliner does not begin
with a space, it is processed for string substitution and
character escapes, and then placed at column 31 of the status
line.
Soft Keys can either send strings or execute commands. If the
assigned string begins with "@" (commercial at), the string
is executed as a command.
A soft key command called from the term function should not
end with a t or f command because this would cause excessive
recursion (calling the term function from within the term
function). (Use the create or open instead.)
The f1 to fa12 strings are executed by the respective keys
from the term function, review function, or command prompt.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 228
In the term function, soft keys definitions for fins, fdel,
fhome, fup, fdown, fpgup, fpgdn, fleft, fright, fend will
override ZCOMM's built-in definitions for these keys. The
built-in definitions take precedence in the review function,
conference command, and at the command prompt. In the
conference command, soft keys are inserted into the editing
window unless they are commands, which are executed. Soft
keys are not executed from review or the command prompt
unless they are commands (beginning with "@").
Computers with the 101 key extended keyboard and ROM BIOS
support allow ZCOMM to distinguish the cursor cluster keys
and the two new function keys labelled F11 and F12. Extended
keyboard cursor cluster keys may be reassigned with the
fcdel, fcdown, fcend, fchome, fcins, fcleft, fcpgdn, fcpgup,
fcright, and fcup string parameters. The fnp5 key may be
assigned to the "5" key on the numeric pad.[2] ZCOMM's
character escapes can be used to encode special characters,
including spaces and/or tabs.
EXAMPLE: set bs "\177"; set rubout "\b" Swap backspace and
rubout for VMS
Soft Key contents are displayed by ALT-K and keys commands.
EXAMPLE: set f3 @rb Assigns the rb command to F3.
t expands to the current time and date each time it is used.
SEE ALSO: d, h string parameters
tab Assigns a string or command to the TAB key.
telno The current telephone number string.
SEE ALSO: mcommand string parameter
tmodes Contains optional term function modes to be applied to each
instance of the following term function commands: conference,
create, f, learn, t and F-2
SEE ALSO: term funcion modes, Chapter 21.
__________
2. Visible on extended 101 key keyboards with extended BIOS support
only
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 229
tmp A string variable which may be used to indicate the directory
used for data to be transmitted or received.
tname * Contains the name of the last file sent with a protocol,
successful or not.
txlog * The filename that contains the log of transmitted files.
If empty (the default), this function is disabled.
unrestrict Changes the password callers must match to allow remote
functions that are normally restricted such as erasing files,
listing and changing parameters, and changing to private
directories. If unrestrict is empty (the default), the
unrestrict command will fail.
SEE ALSO: unrestrict command
w Contains the day of the week (local time) as Mon, Tue, Wed,
Thu, Fri, Sat, or Sun.
welcome is executed after the password (if any) has been demanded and
accepted.
EXAMPLE: set welcome "@type welcome.txt; purgek; nulls 0"
xhelpfile The pathname that contains the online help file for host
mode commands. This should be readable when ZCOMM is in
Restricted Host Operation. Iff xhelpfile begins with the
character @, the rest of xhelpfile is treated as a Zcomm
command.
SEE ALSO: helpfile string parameters, help command
xpassword * xpassword is a master password string that may be used to
generate a unique password for each system called. xpassword
is encrypted by the name of the remote system (string
parameter remote) to generate a password unique to each
remote system called. The generated password is transmitted
as a result of a Soft Key programmed with the \PXXXX
construction described in Chapter 26. To view the generated
password, set the remote string parameter to the full remote
system name as it appears in the appropriate telephone
directory (up to but not including any "-" character), then
keyboard lput \PXXXX from the main command prompt.
EXAMPLE: set f8 "\PXXXX" Programs F8 to transmit a 5
character password from the term function.
Omen Technology Inc cannot accept responsibility for damages
due to the breaking of any codes used or generated by ZCOMM.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 230
uucplock Contains an optional UUCP lock file prefix for arbitrating
tty ports with the Unix UUCP program. This is normally set
automatically, or from the UUCPLOCK environment variable.
EXAMPLE: set uucplock "/usr/spool/locks/LCK.." Ee
y* All variable names beginning with "y" are reserved!
y0...y127 Read only string parameters y0 to y127 represent lines
displayed by the term function. y0 corresponds to the
current partially finished line as displayed by the term
function. The last line referenced by y0...y127 becomes the
y string parameter current line used by the y, yb, and yf
string paramrters. Each time the term function displays a
newline from the remote, the is pointed to the new,
unfinished line from the remote.
y expands to represent the y string parameter current line.
yb Referencing the yb read only string parameter backs up the y
string parameter current line one line, and then represents
that line.
yf Referencing the yb read only string parameter advances the y
string parameter current line one line, and then represents
that line.
SEE ALSO: H, h test conditions
zmrxesc Requests the sending ZMODEM-90(TM) program[3] to escape the
specified additional control character(s). Printing
characters @ (40 hex) to _ (57 hex) escape the corresponding
control characters NULL (0) to US (1F) in both parities.
EXAMPLE: set zmrxesc "@" Requests the sending program to
escape NULL (0) and NULL with 8th bit set (80 hex).
SEE ALSO: zmtxesc string parameter
zmtxesc Causes ZMODEM send commands to escape the specified
additional control character(s). Printing characters @ (40
hex) to _ (57 hex) escape the corresponding control
characters NULL (0) to US (1F) in both parities.
SEE ALSO: zmrxesc string parameter
__________
3. DSZ.COM does not support the zmrxesc string parameter.
(C) 1990 Omen Tech Inc Chapter 25 String Parameters
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 231
26. CHARACTER ESCAPES
Some commands use strings with character escapes similar to those used
by the C programming language for describing string constants. When
translating a string for character escapes, ZCOMM substitutes strings
(%svar) and then translates the result for backslash (\) encoded
character escapes.
String-Parameter %svar
Environment-Param %SVAR
% (per cent) \045
password* \PXXXXXXX
cleartext* \C+clear-text+
ciphertext* \M+ciphertext+
newline (LF) \n
return (CR) \r
tab (HT) \t
alarm (BEL) \a
backspace (BS) \b
form feed (FF) \f
escape (ESC) \E
transparent \T
lowercase \L
uppercase \U
octal byte \nnn
decimal byte \dnnn
hex byte \xHH
control char \^C
concatenation \&
backslash \\
To preserve compatibility with future TurboDial enhancements, a
backslash should not be followed by a character not listed above.
%svar is replaced by the value of the corresponding string parameter.
The string parameter name must be written exactly, in the correct
case, with no extra letters or digits at the end. Any non
alphanumeric character delimits the parameter name. The DOS
environment is searched for parameters after exhausting the ZCOMM
string parameters.[1]
\PXXXXXXX uses the xpassword and remote string parameters to generate
a password unique to each remote system, replacing each X character
with an upper case alphabetic character.* The xpassword parameter must
have at least as many characters as the number of characters used in
__________
1. DOS environment parameters are upper case only
(C) 1990 Omen Tech Inc Chapter 26 Character Escapes
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 232
the \PXXXXX construction.
SEE ALSO: xpassword, remote string parameters
\M+ciphertext+ uses a cipher and the contents of the mpassword string
parameter to decrypt and transmit the cleartext equivalent to
ciphertext. Ciphertext is delimited by the character immediately
following "M".
\C+cleartext+ is treated as above, except for no decryption.
EXAMPLE: \C+foobar+ is translated to foobar by ZCOMM's character
escape expansion.
A separate program pga encrypts instances of \C+cleartext+ into
\M+ciphertext+ according to a user specified master password. Pga
also decrypts \M sequences to either cleartext, or encrypts them with
a new master password. Please refer to Chapter 99.
The \n, \r, \t, \b, \f, \E, \nnn, \xHH, \^C and \\ character escapes
generate the associated character.
The \T character escape inhibits the processing of character eascpes
(but not string substitutions) in the remainder of the string. It is
useful when the raw string contains backslashes which must not be
treated as character escapes.
The \L character escape forces the rest of the string to lower case,
up to the next \ character. Likewise, \U forces upper case.
Octal byte escapes (\nnn) accept 1 to 3 octal digits terminated by the
first non octal digit. Decimal byte escapes (\dnnn) accept 1 to 3
digits terminated by the first non digit. Hex byte escapes (\xHH)
accept exactly 2 hex digits. Control characters may also be
represented by \^C where C is the printing representation for Ctrl-C
and ^ is the circumflex character.
The \& character escape generates nothing; it is useful to delimit the
lexical end of a string parameter name in string concatenation
applications.
26.1 Concatenating String Parameters
To concatenate the contents of a string parameter with other
characters, one must escape the next character with a backslash if it
is a letter or digit. The \& character escape expands to nothing.
EXAMPLE: Assume string parameter s1 contains "foo".
putw "%s1\&bar"
(C) 1990 Omen Tech Inc Chapter 26 Character Escapes
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 233
sends "foobar".
putw "%s1\142ar"
sends "foobar".
putw "%s1-skidoo"
sends "foo-skidoo".
putw "%s1bar"
is undefined.
putw "%s1\bar"
sends "foo<BS>ar"
Failure to observe this property causes the sets and put commands to
give unexpected results.
An encrypted password* is generated from the prototype string
\PXXXXXXXX where each X generates an upper case alphabetic character
by encrypting the leading letters of the remote system name by
xpassword.
Only the leading letters of the remote system name are used to allow a
directory to have a number of alternate access methods for a given
system, yet produce the same automatic password. For example,
"source", "source-telenet", "source300" would all generate the same
password, but "sourceb" would generate a different password.
xpassword must have at least as many characters as X characters in the
prototype string.
Omen Technology Inc and sellers of ZCOMM cannot accept any
responsibility for damages due to the breaking of any ciphers used or
generated by ZCOMM.
An arbitrary byte is generated by backslash followed by one to three
octal digits, backslash x followed by exactly two hex digits, or by
backslash circumflex followed by three decimal digits. 7 bit
transmission modes (7s, 7m, 7e, 7o) modify the parity bit of
characters transmitted by the term function during the put[w] command.
26.2 Quoting Strings
Strings must be enclosed by double quotes (Shift ' on the IBM Personal
Computer) to allow white space and/or semicolon to be included in the
string. If a string containing white space were not quoted, it would
be terminated by the first space or tab, and ZCOMM would consider the
rest of the intended string as another (incorrect) command.
26.3 Layering of Escaped Characters
Sometimes a string will be processed two (or more) times by ZCOMM's
character escapes.
set fs2 "@accept s1 Name:; obey find\ \\n%s1\ %phones"
(C) 1990 Omen Tech Inc Chapter 26 Quoting Strings
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 234
This example causes ZCOMM to ask for a name when Shift-F2 is typed.
The name is read into string parameter S1, which is then used as part
of the argument for the find command. The find command searches the
telephone directory for lines beginning with the string you just typed
in. To match only lines starting with the given string, a linefeed
(\n) is prepended to the argument of the find command. When the obey
command executes, the backslash-space sequences translate to spaces,
and the double backslash translates to a single backslash.
The space after "find" and after "%s1" must be escaped because the
obey command accepts a single string argument. If these spaces were
not escaped, the obey command would not "see" the rest of the line
after "find".
The find command performs its own character escape translation,
changing the \n to a linefeed character.
Since the find command performs string substitution on its list of
files, it is not actually necesary to use the obey command here:
set fs2 "@accept s1 Name:; find \n%s1 %phones"
26.4 Regular Expressions
Regular Expressions allow TurboDialTm scripts to search and parse data
from files, the keyboard, and remote computers. Regular expressions
are used for string searching and parsing (splitting) with the ss and
egrep commands, and the h and H test conditions.
Many DOS and Unix programs use regular expressions to search and parse
text, including grep, egrep, many flavors of EMACS, Brief, Epsilon,
ed, vi, sed, lex, and Perl. The effort expended in learning how to
use regular expressions will be rewarded by the increased utility of
dozens of programs and tools, not just ZCOMM.
ZCOMM regular expressions give "magic" meanings to the characters \ *
+ ? . | ^ [ ] ( )
A regular expression is zero or more branches, separated by |. It
matches anything that matches one of the branches.
A branch is zero or more pieces, concatenated. It matches a match for
the first, if it is followed by a match for the second, etc.
A piece is an atom possibly followed by *,+, or?. An atom followed by
* matches a sequence of 0 or more matches of the atom. An atom
followed by + matches a sequence of 1 or more matches of the atom. An
atom followed by ? matches a match of the atom, or the null string.
An atom is a regular expression in parentheses (matching a match for
the regular expression), a range (see below), . (matching any single
(C) 1990 Omen Tech Inc Chapter 26 Regular Expressions
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 235
character), ^ (matching the null string at the beginning of the input
string), $ (matching the null string at the end of the input string),
a \ followed by a single character (matching that character), or a
single character with no other significance (matching that character).
A range is a sequence of characters enclosed in []. It normally
matches any single character from the sequence. If the sequence
begins with ^, it matches any single character not from the rest of
the sequence. If two characters in the sequence are separated by -,
this is shorthand for the full list of ASCII characters between them
(e.g. [0-9] matches any decimal digit). To include a literal ] in the
sequence, make it the first character (following a possible ^). To
include a literal -, make it the first or last character.
EXAMPLE: One can match separators (space, tabs, punctuation) by
excluding them from a range [^0-9A-Za-z] That means "match anything
except A to Z, or a to z, or 0 to 9.[2]
If a regular expression could match two different parts of the input
string, it will match the one which begins earliest. If both begin in
the same place but match different lengths, or match the same length
in different ways, life gets messier, as follows.
In general, the possibilities in a list of branches are considered in
left-to-right order, the possibilities for *, +, and ? are considered
longest-first, nested constructs are considered from the outermost in,
and concatenated constructs are considered leftmost-first. The match
that will be chosen is the one that uses the earliest possibility in
the first choice that has to be made. If there is more than one
choice, the next will be made in the same manner (earliest
possibility) subject to the decision on the first choice. And so
forth.
For example, `(ab|a)b*c' could match `abc' in one of two ways. The
first choice is between `ab' and `a'; since `ab' is earlier, and does
lead to a successful overall match, it is chosen. Since the `b' is
already spoken for, the `b*' must match its last possibility-the empty
string-since it must respect the earlier choice.
In the particular case where no `|'s are present and there is only one
*, +, or ?, the net effect is that the longest possible match will be
__________
2. Ranges in regular expressions are in ASCII collating order. For
example, the range [A-z] matches all the letters in either case,
PLUS all the funny characters between Z and a in the ASCII code
chart.
(C) 1990 Omen Tech Inc Chapter 26 Regular Expressions
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 236
chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note
that if `ab*' is tried against `xabyabbbz', it will match `ab' just
after `x', due to the begins-earliest rule. (In effect, the decision
on where to start the match is the first choice to be made, hence
subsequent choices must respect it even if this leads them to less-
preferred alternatives.)
Case is significant in regular expressions. Ranges may be used to
match characters in either case. The regular expression [aA]ny
matches "any" or "Any".
The regular expression subroutines and much of this description were
written at the University of Toronto.
EXAMPLE: If s0 contains 1234567890 Hello There then the command
ss s0 "(12.*0 ).*The(..)"
results in
z1='1234567890 '
z2='re'
String parameter z0 contains the entire matched string, and may be
used for testing the success of the match with an if %z0 goto foundit
command.
EXAMPLE: string = 'Here are 345 dots'
ss string "([0-9]+)"
z0= '345'
EXAMPLE: Sometimes one needs to shorten a string which is too long.
The following loops while the length of subject is greater then 24.
One character is chopped off the end of the string each time the ss
command is executed. The parentheses contain the portion of the
string that should be retained.
while %sbj>24 ss sbj "(.*)[A-z]" sets sbj "%z1"
An alternative:
if %sbj>24 ss sbj "........................."; sets sbj "%z1"
26.4.1 Sample Script - Browse/Download The kcisdl.t script downloads
a file after it has been listed by the Compuserve Special Interest
Group DownLoad "bro" command. The kcisdl.t script should be bound to
F3 with
(C) 1990 Omen Tech Inc Chapter 26 Regular Expressions
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 237
set f3 "@source kcisdl.t"
The Compuserve "browse" command displays file information and then
invites the user to download it:
[73125,617]
P3YAM.ARC/binary 09-Jul-87 3224 Accesses: 13
Keywords: YAM PRO-YAM ZCOMM YAMDEMO
Sample YAMscript, for handling messages and file up/downloads
with the popular PCBoard bulletin board systems.
Disposition !
Keyboarding F3 activates the script to scan the circular buffer for
the file name and download the file.
if !h^\[ echo "Can't find Account Number"; return
The h test condition searches backwards through the circular buffer
for a left square bracket ([). Since "[" is a magic character for
regular expressions, it must be escaped. The "^" magic character
anchors the search to the beginning of the line. The script prints a
message and exits if the search was unsuccessful.
ss yf "^[^ /]+"
The yf string parameter accesses the next line in the circular buffer.
This line, which follows the uploader's account number, contains the
file name. The ss command extracts the file name, discarding the rest
of the line starting with a possible file type designation
("/binary"). As above, "^" matches the beginning of the line. The
"[^ /]+" phrase matches a class of characters ("[") excluding ("^")
space, tab, and "/". The trailing "+" matches one or more instances
of the search string, resulting in all characters starting at the
beginning of the line up to but not including the first space, tab, or
"/".
setc s0 "\L%z0"
Translate the file name in string parameter z0 to lower case. (This
script is also used on Unix systems where most file names are lower
case.)
if f%s0 echo "%z0 Exists: No Action taken."; return
echo "File name is %s0"
put "\025dow %s0/PRO:B\r"
pat 2i "\nFile name"
wait -f20
if 2 put "\025%s0\r"
ena -C; return
(C) 1990 Omen Tech Inc Chapter 26 Regular Expressions
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 238
The remainder of the script generates commands using the parsed file
name. The script enables Compuserve's B Protocol, allowing the
mainframe to initiate the download.
26.4.2 Magic Characters: Synopsis ZCOMM regular expressions give
magic meanings to the characters \ * + ? . | ^ $ [ ] ( ) as follows:
* 0 or more
+ 1 or more
? 0 or 1
. Any single character
| Branch separator (for matching)
EXAMPLE: ss s0 "(^cc: *|^ *)([^ ]+)" The first () grouping matches
either "cc:" or a space at the begining of the line in s0.
^ Matches beginning of line
$ Matches end of line
[] Single character(s) in a class
[^] Single character(s) not in a class
() Grouping (for parsing)
ZCOMM regular expressions closely resemble those used by the Unix
egrep command. The Unix ed and vi editors use regular expressions
with a slightly different syntax. Epsilon and Brief editors for DOS
also use regular expressions.
Regular Expression pattern matching is a software disicipline unto
itself. Different program behave differently when matching ambiguous
patterns. A number of Unix related books contain useful information
on the uses of Regular Expressions.
In the meantime, practice makes perfect. Setup some string variables
with strings to search and parse, and experiment with different ss
command search patterns. A full screen editor that uses regular
expressions is a handy learning aid.
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 239
27. TEST CONDITIONS (if, on, while commands)
The following conditions may be tested with the if, on and while
commands.
Where a string parameter is indicated, it is an error to specify a
nonexistient string parameter.
When an immediate string argument is indicated, that argument is
delimited only by white space. As a result, if "is1,hello&&L<5"
command ... won't work as expected, but if is1,hello if "L<5" command
... will work.
Some of the test conditions described below may be used with ">",
"==", "!=", or "<" for numeric comparisions. The right hand argument
of a numeric comparision may be:
+ A decimal number.
EXAMPLE: if "L>5" abort
+ A string paremeter which contains a decimal number.
EXAMPLE: set maxloops "5"
if "L>maxloops" abort
+ The length of the string stored in a string parameter, denoted by
a leading % character.
EXAMPLE: set s1 "Hello"
set s2 "foo"
if "%s1>%s2" echo "%s1 is longer than %s2"
These comparisions should be quoted in case a future version of ZCOMM
implements output redirection in the same manner as COMMAND.COM or the
Unix shell. On 16 bit machines, 16 bit numerical values are used in
comparisions; numbers greater than 32767 should not be used.
Numeric conditions may also be tested against a bit mask using the &
operator.
EXAMPLE: if s&64 echo "Caps Lock is ON"
0...25 The specified pattern (see pattern command) was matched in the
last wait command.
(C) 1990 Omen Tech Inc Chapter 27 Test Conditions
Version 17.84 TurboDial 2.36 Universal Line Printer Edition
ZCOMM User Manual 240
%svar The specified string parameter svar (see the set command) is non
empty. May be used with ">", "==", or "<" for numeric comparisions
of the string length of svar.
EXAMPLE: if %s1 putw %s1
EXAMPLE: if %symbol>4 ss symbol "(.*)[A-z]"; sets symbol %z1
If the length of the string in string variable symbol exceeds 4,
chop off the rightmost letter.
? The ? numeric parameter counts the number of files sent or received
with a protocol, and the number of lines matched by the find
command. The fFILE test condition (if true) assigns the file length
to the ? parameter. On 16 bit computers, file lengths greater than
32767 are represented as 32767. With certain operating systems, the
exit status of a subprogram accessed by a DOS Gateway is stored in
the ? numeric parameter.
The ? numeric parameter may then be tested with the ? test
condition. It can be used with ">", "==", or "<" for numeric
comparisions.
EXAMPLE: p?0 find fizzbin *.txt; if ? echo "Found fizzbin"
SEE ALSO: ? numeric parameter
B True iff Ctrl-Break has been pressed since the last purgek command.
Csvar True iff string parameter svar contains any control characters
less than 040 (hex 20) or rubout.
EXAMPLE: if Cs0 echo "Please Retype
E True iff the elapsed time in seconds is non 0. Used with ">", "==",
or "<" for numeric comparisions.
NOTE: Elapsed time may be off by up to one second. On 16 bit
machines, the maximum testable value for elapsed time is 32767
seconds.
EXAMPLE: if "E>300" off Disconnects the modem if the elapsed time is
greater than 300 seconds.
SEE ALSO: restime command
F>N True iff more than N kilobytes (1 kilobyte = 1024 bytes) of free
space remain on the default drive.
(C) 1990 Omen Tech Inc Chapter 27 Test Conditions