home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
zcat
/
w20.lbr
/
W.HZP
/
W.HLP
Wrap
Text File
|
1991-01-31
|
4KB
|
129 lines
;
-- W --
O -- Overview of W
U -- Using W
P -- Potential Problems and Current Limitations
:O
OVERVIEW
Program: W
Syntax:
W ProgramName AFN parm(1) .. parm(n)
or
W ZEX ZexFileName AFN parm(1) .. parm(n)
Function:
W is a ZCPR3 shell that enables wildcard processing for programs that do
not usually accept ambiguous file names (AFN).
Options: None
Comments:
W may be invoked directly by typing a command at the system prompt, or
indirectly through the use of a program that builds a command line, e.g.,
VALIAS or ZEX. The program name that it takes as its first argument may
name a transient program, resident program or alias. The AFN must appear
immediately after the program name, or, when being used with ZEX, after
the zex file name.
Selected Error Messages: None
Example of Use:
W Type *.doc
Types all document files in current directory.
W Ins *.com
If "Ins" is an alias expanded to "Z3INS sys.env $1", all
ZCPR3 programs in the current directory would be installed.
:U
USING W
Installing W
Like other ZCPR3 utilities, W.COM must be installed using Z3INS.COM and
SYS.ENV before it is used.
Aborting W in the Middle
Pressing the <ESCAPE> key will cause W to abort. Press it several times at
about the time that the program you are executing under W is ending. A
successful abort will produce the <W aborted> message.
Since programs differ in their reaction to random console input, a short
delay was included at the beginning of each invocation of the W shell ( that
is as W is creating each of its command lines. ) This delay is user settable
by changing the QSEC equate in W20.Z80 and reassembling (QSEC represents the
delay in quarter-seconds, so a value of 4 would be a 1 second delay). The
default is a QSEC value of 1 or a .25 second delay, which should be adequate.
Using W with Programs having a Different Syntax
Some programs have a syntax different than W requires. In such cases an
alias can be constructed that rearranges the command line in a form suitable
for W.
For example, the resident command CP does not take wildcards. Since CP
expects a parameter in the form F1.T1=F2.T2, W cannot handle it directly. So
we concoct an alias called CPAL as follows (in ARUNZ script format):
CPAL CP $2=$1.
Thus "CPAL SYS.ENV B:" yields a command of
CP B:=SYS.ENV.
NOW we can run CPAL with W as follows:
W CPAL *.* B:
which copies all files on A: to B:.
:P
POTENTIAL PROBLEMS AND CURRENT LIMITATIONS
Number of Parameters
No more than 6 parameters can follow W, including the command name and the
AFN.
Command Line Length
The total length of the command line invoking W, including the 'W', but not
including the AFN and its trailing space must not be greater than 32
characters long.
Location of W Along the Path
To work properly, W be in the current directory or along the ZCPR3 path. It
cannot be invoked with the DU: or DIR: form (e.g., A10:W or UTIL:W). If it
is, it will not be able to reinvoke itself after building the first command
line.
W and Other Shells
The result of using W to invoke other shells is not known and such use is
discouraged.
W and the Shell Stack
W uses two spaces on the shell stack. One to store its name so that it can
be reinvoked after executing each command line it builds and the other to
store the name of the next file that matches the AFN. Since many ZCPR3
systems have 4 shell stack spaces available, there should be room to run W in
most situations.