Author Credits and Introduction to LU
Why Use Libraries?
Why Not Use Libraries?
How to Use the Library Utility LU
Summary of Operators
LU Command Line Forms
Advanced Features of LU
CAUTIONS
LRUNZ Command
LDIRZ Command
LRUNZ as an Extended Command Processor Under ZCPR2
:Author Credits and Introduction to LU
Thi� documen� applie� t� versio� 1.1� o� LU.COM�� I� als� �
applie� t� Versio� 1.� o� LDIR� b� Richar� Con� an� Versio� 1.� �
o� LRUNڠ b� Richar� Con� (whic� wa� derive� fro� LRUΠ b�� Gar� �
Novosielski).
Copyright (c) 1982 Gary P. Novosielski
All rights reserved.
Permissio� i� hereb� grante� t� cop� an� distribut� thi� �
documen� fo� an� non-commercia� purpose�� An� us� o� thi� �
materia� fo� commercia� advantag� withou� prio� writte� �
consen� o� th� autho� i� prohibited.
ɠ hav� modifie� th� origina� documen� fo� inclusio� i� � �
HELР fil� an� elaborate� o� th� subjec� wit� documentatio� o� �
LRUNZ and LDIRZ.
INTRODUCTION
Librar� Utilit� (LU� i� � progra� t� allo� combinin� o� �
multilpl� file� int� on� large� file�� I� require� CP/� �
versio� 2.� o� highe� t� run� L� run� unde� ZCPR2.
Thi� large� fil� i� divide� int� tw� basi� part� -- th� �
director�� (a� th� fron� o� th� file� an� th� file� o� th� �
library� Th� director� informatio� i� store� i� th� sam� fil� a� �
th� data�� o� membe� files�� Th� amoun� o� spac� t� b� �
allocate� t� th� director� mus� b� specifie� b� th� use� whe� �
� ne� librar� i� created�� bu� ca� b� change� whe� th� fil� i� �
reorganized� Th� siz� o� eac� director� entr� i� 3� bytes� whic� �
mean� eac� fou� director� entrie� tak� u� on� secto� o� th� �
librar� file�� Currentl� onl� 1� byte� o� eac� entr� ar� used� �
wit� 1�� byte� bein� reserve� fo� us� wit� possibl� futur� �
enhancements�� Th� director� itsel� use� on� entr� fo� contro� �
information�� s� th� numbe� o� director� sector� neede� fo� � �
librar� o� � member� i� (� � 1� � 4� rounde� u� t� th� nex� whol� �
number.
Th� use� nee� no� b� concerne� wit� thi� discussio� a� �
director�� siz� i� calculate� b� th� program�� Al� director� �
size� ar� inpu� an� outpu� i� term� o� entries�� eac� entr� �
bein� � potentia� membe� file� Th� progra� adjust� director� siz� �
t� a� integra� numbe� o� sectors.
LRUNڠ i� � smal� progra� whic� allow� runnin� � .CO� �
(objec� code� fil� membe� directl� fro� an�� library�� withou� �
havin� t� extrac� i� t� � separat� dis� file��� I� i� �
specificall�� intende� t� b� use� wit� � defaul� COMMAND.LB� fil� �
under ZCPR2 and can be used as an Extended Command Processor.
LDIR� i� � progra� whic� allow� th� use� t� displa� � sorte� �
director� o� th� file� i� � defaul� COMMAND.LB� file�� Simpl� i� �
nature�� LDIRڠ give� th� use� th� abilit� t� selec� group� o� �
file� vi� wil� card� an� displa� � sorte� listin� whic� include� �
individual file sizes.
:Why Use Libraries?
First�� � librar� fil� usuall� take� u� les� spac� tha� th� �
tota� o� th� individua� membe� file� whic� wen� int� it�� Th� �
reaso� fo� thi� i� tha� CP/� allocate� dis� spac� i� fixe� �
block� o� groups�� typicall� 2� byte� each� An� spac� afte� th� �
las� secto� o� � fil� u� t� th� nex� 2� bloc� boundr�� i� �
wasted�� Th� sam� file� i� � librar� us� onl�� th� numbe� o� �
sector� the� actuall� need�� an� thoug� th� librar� itsel� ma� �
hav� � partiall� waste� bloc� a� th� end�� an� require� som� �
spac� fo� director� informatio� a� th� beginning�� th� ne� �
effec� i� usuall� � savin� o� tota� space�� Th� bes� result� �
ar� see� whe� man� smal� file� ar� combine� int� on� library.
Second� � librar� fil� make� mos� efficien� us� o� th� CP/� �
dis� directory�� sinc� i� i� treate� a� onl� on� fil� b�� CP/� �
regardles� o� ho� man� member� i� contains.
Third�� librarie� ca� ai� i� transferrin� package� o� �
softwar� fro� on� syste� t� anothe� usin� XMODEM� Onl� on� fil� �
i� transferred�� eliminatin� th� nee� t� ru� th� XMODE͠ ransfe� �
progra� severa� times�� th� chanc� o� overlookin� � neede� file� �
an� th� problem� o� namin� conflicts�� (suc� a� READ.MРfiles� �
amon� unrelate� packages.
:Why Not Use Libraries?
Ther� ar� som� ver� goo� reason� fo� no� usin� �
libraries�� Fo� on� thing�� file� withi� � librar�� ar� no� �
availabl� t� mos� "normal� programs�� I� � frequentl�� accesse� �
fil� i� place� i� � library�� i� wil� hav� t� b� extracte� fro� �
th� librar� t� it� free-standin� counterpar� befor� i� ca� b� �
use� b�� � program�� (.CO� file� ar� � notabl� exceptio� t� �
this�� becaus� o� th� availabilit� o� th� LRUNڠ command� �
covere� later.)
Librarie� ca� actuall� wast� dis� space� Whe� � dis� fil� �
i� erased�� CP/� return� th� spac� formerl� use� b� th� fil� t� �
th� fre� spac� poo� fo� us� b� ne� files�� Whe� � membe� fil� �
i� delete� fro� � librar�� however�� th� spac� previousl� �
occupie� b�� th� fil� i� no� useable�� Th� librar�� mus� b� �
reorganize� t� mak� thi� spac� availabl� t� CP/M�� Whil� thi� �
i� eas� t� d� wit� th� L� command�� i� i� no� automatic�� an� �
i� th� situatio� i� ignored�� larg� area� o� dis� ca� b� tie� u� �
a� unproductiv� "dea� space".
:How to Use the Library Utility LU
Lՠ ha� tw� basi� method� o� operation�� interactive�� an� �
paramete� driven�� Us� o� th� interactiv� metho� i� probabl� th� �
bes� wa� t� ge� t� kno� th� program�� becaus� th� effec� o� eac� �
actio� ca� b� immediatle� seen.
T� star� a� interactiv� librar� maintenanc� session�� jus� �
typ� Lՠ o� th� comman� lin� wit� n� parameter� afte� it� �
Afte� yo�� ar� familia� wit� th� program�� yo�� ca� specif� �
multipl� paramter� o� th� comman� lin� an� Lՠ wil� wor� wit� �
littl� o� n� intervention�� Inpu� fro� dis� files�� à progra� �
"pipes"�� an� th� XSU� facilit� ar� als� supporte� fo� mor� �
advance� applications.
Al� th� method� mak� us� o� simila� syntax�� Comman� �
inpu� take� tw� forms�� operator� (sometime� calle� tags�� o� �
options� an� operands.
A� operato� i� define� a� an� tw� characte� strin� �
wher� th� firs� characte� i� � minu� sign�� Operator� tel� th� �
progra� wha� t� do� Vali� operator� ar� -a� -d� -e� -l� -o� an� -�
r�� Anythin� els� wit� � simila� for� i� a� operato� too�� bu� a� �
invali� one.
Operand� ar� everythin� else� Normally� operand� ar� fil� �
name� whic� yo� wan� t� ad� to�� delet� from�� o� extrac� fro� � �
librar� file�� o� ar� name� o� librar� file� t� b� opened� The� �
ma� contai� th� character� � o� �� i� whic� cas� the� ar� calle� �
ambiguou� operands� Som� vali� operand� are:
foo.bar b:test.fil z *.* comm?nd
T� refe� t� � fil� name� "-z� th� operan� woul� hav� t� b� �
entere� a� "-z.� wit� th� period�� sinc� otherwis� i� woul� b� �
mistake� a� a� invali� operator.
Wha� actio� i� take� upo� th� fil� depend� upo� whic� �
operato� mos� recentl� precede� it�� I� n� operato� wa� �
entered�� o� a� invali� one� o� on� tha� take� n� operands� th� �
operan� wil� b� ignored.
Whe� runnin� interactively�� L� prompt� fo� eac� operan� an� �
operator�� on� pe� inpu� line�� Multipl� input� pe� lin� ar� no� �
allowe� usin� th� interactiv� method.
Th� promp� yo�� wil� se� i� th� nam� o� th� curren� �
operato� followe� b� � ">� character�� fo� exampl� "-E>"� �
Thi� indicate� tha� th� -� operato� i� i� effect�� an� i� a� �
operan� i� entere� i� wil� b� interprete� a� th� nam� o� � �
membe� fil� t� b� Extracte� fro� th� library�� Whe� th� �
progra� firs� start� up�� th� promp� i� "-?>� whic� mean� n� �
operato� i� currentl� i� effect�� I� thi� case�� th� onl� �
vali� inpu� i� a� operator� An� operan� wil� b� ignored.
:Summary of Operators
The operators available under LU are:
-A Add Files to Library
-D Delete Files from Library
-E Extract Files from Library
-L List Library
-O Open a Library
-R Reorganize a Library
Thes堠 operator� ar� discusse� i� mor� detai� i� th� �
following frames.
-� ad� file� t� library�� -� cause� th� promp� t� �
chang� t� -A� whic� wil� the� accep� a� operand� th� name� o� �
file� t� b� adde� t� th� ope� library�� (I� n� librar�� nam� �
ha� bee� opene� wit� th� -� operator�� th� defaul� librar� �
LIBRARY.LBҠ i� alway� use� instead.�� Ambiguou� operand� �
matc� al� dis� file� whic� qualif� accordin� t� norma� CP/� �
wild-car� conventions�� excep� thos� wit� � filetyp� o� .LBR� �
Explici� driv� specificatio� o� a� operan� cause� tha� driv� t� �
b� searche� fo� th� file(s� instea� o� th� curren� drive.
-� delet� file� fro� library�� -� cause� th� promp� t� �
chang� t� -D� whic� accept� name� o� file� t� b� delete� fro� �
th� ope� library�� Ambiguou� name� matc� al� membe� file� �
whic� qualify�� Driv� specification� o� operand� ar� ignored� �
sinc� th� librar� member� ar� obviousl� o� whicheve� driv� �
contain� th� ope� library.
-� extrac� file� fro� library�� -� cause� th� promp� t� �
chang� t� -E� whic� accept� name� o� librar� membe� file� t� b� �
extracte� t� norma� free-standin� CP/͠ files�� Ambiguou� �
name� matc� al� membe� file� whic� qualify�� Driv� specificatio� �
o� � membe� nam� cause� th� outpu� fil� t� b� place� o� th� �
specifie� driv� rathe� tha� th� curren� drive�� An�� existin� �
fil� wit� th� sam� nam� wil� b� overwritte� unles� i� i� �
protecte� b� virtu� o� it� Read/Onl� fla� bi� bein� set.
-� lis� curren� librar� map�� -� cause� th� director�� o� �
th� curren� librar� t� b� liste� o� th� console�� Th� membe� �
name� ar� displayed�� alon� wit� thei� index�� o� startin� �
positio� withi� th� library�� an� thei� siz� i� sectors� �
Also�� informatio� i� displaye� abou� th� numbe� o� sector� i� �
th� library� an� ho� muc� space� i� use� o� unuse� (wasted)� �
Informatio� i� als� displaye� abou� th� numbe� o� entrie� i� �
th� directory�� an� ho� man� ar� active�� deleted�� o� fre� fo� �
use�� Thi� help� determin� whethe� th� librar� need� t� b� re-�
organize� t� fre� unuse� spac� an� delete� entries�� Th� �
operato� -� expect� n� operands��� s� afte� th� lis� i� �
displayed�� th� promp� change� bac� t� -?� fo� entr� o� anothe� �
operator.
-� ope� � library�� -� cause� th� promp� t� chang� t� -O� �
whic� accept� th� nam� o� � librar� fil� t� b� opene� fo� us� �
wit� subsequen� operators� I� anothe� librar� i� alread� open� �
i� i� close� first�� I� th� ne� librar� doe� no� exist�� i� i� �
create� wit� a� empt� directory�� Ambiguou� name� ar� no� �
allowed�� Driv� specificatio� i� allowed� Th� fil� typ� ma� b� �
specified�� bu� default� t� .LB� whic� i� strongl� suggeste� a� �
th� fil� typ� fo� al� librar� files.
Yo�� wil� recal� tha� file� o� typ� -� (add�� operator� �
Thi� prevent� librarie� fro� bein� accidentall�� adde� t� �
othe� libraries�� o� t� themselves�� � situatio� no� unlik� �
tryin� t� driv� � truc� u� it� ow� tailpipe�� I� fo� som� �
reaso� yo� wan� t� ad� on� librar� t� another�� b� m� guest� bu� �
yo�� wil� hav� t� specif�� th� nam� withou� �� o� � �
character� whe� addin� it.
-� reorganiz� library�� -� cause� th� currentl�� ope� �
librar� t� b� reorganized� First� th� director� i� sorte� int� �
alphabetica� order� an� the� al� activ� member� ar� copie� t� �
� wor� librar�� whic� i� opene� o� th� curren� drive�� no� �
necessaril� th� driv� containin� th� ol� library� Th� use� ma� �
specif�� � differen� numbe� o� entrie� fo� th� wor� librar�� i� �
i� i� necessar�� t� expan� o� compres� th� directory�� Th� �
director�� wil� alway� b� mad� larg� enoug� t� contai� al� th� �
activ� member� o� th� ol� library�� s� � siz� o� �� ma�� b� �
specifie� t� mak� th� director� a� smal� a� possible�� (Se� �
Specifyin� Director� Size� below.)
Whe� reorganizatio� i� complete�� th� ol� librar�� i� �
delete� an� th� wor� librar� i� rename� t� th� nam� o� th� ol� �
library��� N backu� cop�� i� retained��� Th堠 newl� �
reorganize� librar�� remain� ope� fo� us� wit� subsequen� �
operations.
Wheneve� th� progra� i� promptin� fo� a� operand�� anothe� �
operato� ma�� b� entere� instea� t� chang� th� statu� o� th� �
prompt�� T� en� a� interactiv� session� ente� � blan� lin� a� th� �
prompt.
SPECIFYING DIRECTORY SIZE
Wheneve� a� ol� librar� i� opened�� th� director� siz� i� �
displaye� a� follows:
Old library LIBRARY.LBR has 32 entries, 5 free.
Thi� mean� tha� � mor� member� ma� b� adde� befor� th� �
director�� become� full�� Whe� th� director�� i� full�� -� �
become� a� invali� operator�� an� th� librar�� mus� b� �
reorganize� t� ad� an� mor� members.
Whe� � librar� i� create� fo� th� firs� time�� th� use� i� �
prompte� lik� this:
New library COMMAND.LBR. Allow how many entries?_
An� numbe� fro� � t� 6553� i� valid�� Th� actua� maximu� i� �
determine� b� th� amoun� o� fre� memor� availabl� o� th� syste� �
i� use�� Director�� siz� wil� b� rounde� u� t� th� nex� whol� �
secto� necessar� t� contai� th� numbe� o� entrie� requested� �
Thi� numbe� wil� remai� i� effec� unti� th� librar�� i� �
reorganized� Sinc� th� director� itsel� count� a� a� entry� on� �
entr�� i� adde� t� whateve� i� entere� befor� th� siz� i� �
calculated�� Therefor� jus� ente� th� maximu� numbe� o� membe� �
file� yo� wan� th� librar� t� b� capabl� o� holding.
Th� maximu� numbe� o� membe� file� i� als� constraine� b� �
th� amoun� o� availabl� dis� space�� I� durin� a� ad� �
operatio� th� dis� spac� run� out�� th� nam� i� no� adde� t� th� �
directory� I� � multipl� ad� i� i� progress� du� t� a� ambiguou� �
operand�� th� remainin� qualifyin� file� ar� stil� adde� i� �
possible� I� an� o� the� i� smal� enoug� t� fi� i� th� remainin� �
dis� space�� i� wil� b� added�� I� an� sector� wer� writte� b� �
a� ad� attempt�� an� the� neve� utilized�� the�� remai� a� �
unuse� sectors� an� th� librar� shoul� b� reorganized.
:LU Command Line Forms
Al� o� th� informatio� neede� fo� � maintenanc� ru� ma�� b� �
specifie� o� th� comman� line�� Th� operator� an� operand� ar� �
entered�� separate� b� spaces�� afte� th� Lՠ command�� an� th� �
operation� wil� tak� plac� withou� consol� intervention�� excep� �
i� th� cas� wher� th� director� siz� fo� � ne� librar�� i� �
requested� Th� synta� is:
LU <opr> [<opd> [<opd> ...]] [<opr> [<opd> ...]...
where square brackets indicate optional parameters, and:
<opr> is any operator.
<opd> is any operand.
... indicates that the preceding parameter may occur
multiple times.
An�� name� occurrin� prio� t� th� firs� operator�� o� �
followin� a� operato� whic� doe� no� expec� operands�� ar� �
ignored.
:Advanced Features of LU
Inpu� fro� BD� � "pipes� o� ordinar� sequentia� file� i� �
als� possible�� Th� filenam� i� specifie� o� th� comman� lin� �
precede� b� � "<� characte� an� n� intervenin� blank� Example:
LU <CONSOL.DUP
read� th� content� o� th� fil� CONSOL.DU� an� use� eac� lin� �
o� th� fil� a� i� i� ha� bee� type� a� th� norma� consol� �
b� th� interactiv� method�� I� thi� case� n� operator� o� �
operand� ma�� b� present��� Consol� outpu� ma�� als b� �
redirecte� b� specifyin� a� outpu� fil� o� th� comman� lin� �
afte� th� characte� ">"�� T
hi� applie� t� paramete� drive� �
a� wel� a� interactiv� (includin� "piped"� input� Examples:
LU -O SPECIAL -A ZOT.COM >LOGFILE.OUT
woul� ad� th� fil� zot.co� t� th� librar� special.lb� an� �
writ� th� consol� outpu� t� � fil� calle� logfile.out�� th� �
locatio� o� th� outpu� nam� o� th� lin� doe� no� matte� an� �
excep� fo� turnin� o� redirecte� output�� i� i� ignore� b�� al� �
operators.
LU <BATCH.IN >B:RECORD.DOC
woul� tak� interactiv� command� fro� th� fil� batch.i� an� �
writ� consol� outpu� t� � fil� calle� record.do� o� driv� B.
Normally� consol� fil� outpu� i� als� echoe� o� th� rea� �
console�� excep� whe� inpu� i� als� redirected� a� i� th� las� �
example� T� forc� visibl� consol� outpu� whe� bot� a� inpu� an� �
outpu� fil� ar� used�� th� ">�� characte� precedin� th� �
outpu� fil� nam� ma� b� change� t� � "+� instead:
LU +RECORD.DOC <BATCH.IN
woul� hav� th� sam� effec� a� th� previou� example� �
excep� tha� messag� outpu� woul� als� b� visibl� o� th� �
console.
:CAUTIONS
Th� importanc� o� keepin� backu� copie� o� al� dis� �
files�� an� especiall� libraries� canno� b� overemphasized� B� �
usin� librar� files� th� use� i� expose� t� th� dreade� all-the-�
eggs-in-one-baske� syndrome�� Tha� is� i� somethin� happen� t� �
th� librar� file�� particularl� th� directory� i� ma� b� beyon� �
th� capabilitie� o� eve� � CP/� wizar� t� restor� th� membe� �
files� Th� situatio� i� mad� particularl� stick� b� th� fac� tha� �
th� th� director� mus� b� update� i� plac� a� member� ar� adde� �
o� deleted.
Precaution� hav� bee� take� t� minimiz� thi� risk�� Fo� on� �
thing�� th� director� i� rea� int� memor� whe� th� librar� �
i� firs� opened� an� i� onl� writte� bac� i� i� differ� fro� �
th� cop� o� th� dis� whe� th� librar� i� closed� Operation� �
whic� chang� th� director� are�� adds� deletes� an� th� sor� �
operatio� whic� i� don� befor� reorganization�� I� onl� �
extract� (o� LRUNZ� progra� executions�� ar� done��� th� �
director�� i� neve� rewritten�� an� th� .LB� fil� ma�� b� writ� �
protecte� i� desired.
Fo� anothe� thing�� th� entir� empt�� director�� i� �
allocate� an� writte� t� dis� whe� � ne�� librar�� i� firs� �
created�� Thi� insure� tha� ther� wil� alway� b� enoug� spac� o� �
dis� fo� th� numbe� o� director� entrie� requeste� a� th� tim� �
o� creation�� Th� dis� spac� ma� ru� ou� whil� addin� file� �
later� bu� ther� wil� alway� b� enoug� roo� o� dis� t� updat� th� �
director� onc� i� i� successfull� created.
Th� fac� tha� onl� th� memor� cop� o� th� director�� i� �
modifie� unti� th� fil� i� close� ma� com� i� ver� hand� i� yo� �
mistakenl�� delet� � fil� an� recogniz� i� righ� away�� Fo� �
example� suppos� yo� mak� th� mistak� o� typin� *.� afte� th� �
-D� prompt.
Briefly�� you� hear� sinks�� a� th� "Deleting:� messag� i� �
displaye� an� al� th� membe� name� zi� int� oblivion�� Don'� �
panic�� Onl� th� memor� cop� o� th� director� ha� bee� modified� �
Whe� th� -D� promp� returns�� d� no� hi� RETURN�� Instead� �
abor� th� progra� wit� Control-C�� Thi� wil� cance� th� progra� �
withou� updatin� th� directory�� an� th� origina� member� wil� �
stil� b� present.
Her� i� anothe� caution� Sinc� th� entir� director� (bu� �
no� membe� sectors�� mus� fi� i� memor� fo� � librar�� t� b� �
successfull� opened� i� i� possibl� tha� � hug� director� create� �
o� � you� syste� wil� b� to� larg� t� fi� i� memor� i� rea� o� �
anothe� syste� wil� les� memory�� Thi� shoul� no� b� � proble� �
wit� � librar� o� unde� � hundre� entries.
T� giv� yo� a� ide� o� ho� muc� elbowroo� yo� hav� t� wor� �
with�� L� display� th� highes� memor� locatio� use� eac� tim� i� �
terminates�� Thi� wil� var� dependin� o� th� larges� director� �
use� durin� operation�� I� doe� no� includ� th� stack�� whic� �
grow� dow� fro� hig� memory�� an� i� allowe� abou� � thousan� �
byte� o� spac� fo� subroutin� linkage� an� temporar� wor� areas.
:LRUNZ Command
Th� LRUNڠ comman� wa� create� fo� thos� o� u� wh� hav� �
lot� o� comman� file� w� lik� t� kee� o� lin� al� th� time� �
Wha� usuall� happen� i� tha� som� nic� littl� .CO� file� ar� ver� �
smal� programs�� bu� havin� � lo� o� the� o� dis� eat� u� fil� �
spac� a� a� alarmin� rat� du� t� th� fixe� CP/� bloc� size� �
Pu� the� al� int� � librar� calle� COMMAND.LB� usin� LU�� Yo� �
ca� the� ru� an� .CO� fil� directl� fro� th� librar� b� saying:
LRUNZ <followed by normal command line just like always>
LRUN� i� derive� fro� Gary'� LRUN� Stil� basicall� th� sam� �
program�� LRUNڠ add� ZCPR2-specifi� features�� i� particula� th� �
abilit� t� searc� fo� th� LB� fil� alon� th� Externa� Path�� I� �
thi� way�� LRUNڠ ca� b� use� a� a� Extende� Comman� Processor� �
and�� whe� invoked�� wil� searc� fo� COMMAND.LB� (o� such�� alon� �
th� pat� an� extrac� th� CO� fil� fro� th� firs� COMMAND.LBҠ i� �
finds.
LRUNZ can be invoked by command line of the following forms:
LRUNZ // or LRUNZ <-- Print Help
LRUNZ -lbrfile cmdline <-- Run command from lbr
LRUNZ cmdline <-- Run command from
default COMMAND.LBR
The full syntax of LRUNZ is:
LRUNZ [-<lbrfile>] <commember> [<parameters>]
Where:
<lbrfile�� i� th� librar� t� b� searched�� Th� squar� �
bracket� aroun� -<lbrfile� indicat� i� i� optional�� Th� - �
characte� tell� LRUN� tha� wha� follow� i� � librar� name�� I� i� �
no� a� actua� par� o� th� name� Don'� leav� � spac� afte� th� -� �
I� th� firs� paramete� doesn'� begi� wit� - the� th� defaul� �
librar� COMMAND.LB� i� used�� I� � driv� spe� i� given� suc� �
a� B:�� the� onl� tha� driv� i� searche� fo� th� library� I� n� �
driv� spe� i� given� th� curren� driv� i� searche� first� an� i� �
n� librar� o� tha� nam� i� found�� th� A�� driv� i� searche� �
befor� givin� up�� I� � name�� bu� n� typ� i� entered�� .LBҠ i� �
assumed.
<commember�� i� th� nam� o� th� comman� t� b� run�� N� �
driv� spe� i� use� here�� Th� typ� default� t� .CO� an� nee� no� �
b� entered.
<parameters�� i� � th� norma� (possibl� empty�� lis� o� �
parameter� whic� th� .CO� fil� expect� t� fin� o� th� �
comman� lin� whe� i� i� run�� Thi� lis� i� parse� t� th� �
require� fil� contro� block� an� comman� lin� are� befor� �
executio� begins�� s� th� progra� wil� no� b� awar� tha� �
anythin� cut� i� goin� on�� (Thank� t� Ro� Ro� Fowle� fo� �
supplyin� th� cod� whic� make� thi� possible.)
LRUNZ EXAMPLES
LRUNZ ED FOO.BAR
th� fil� ED.CO� i� searche� fo� i� COMMAND.LBҠ o� th� �
curren� drive� o� th� A� drive� I� found� ED.CO� i� loade� fro� �
th� library� an� FOO.BA� i� passe� t� i� a� � parameter.
LRUNZ -C:SPECIAL LU -O COMMAND -A A:*.COM
th� fil� LU.CO͠ i� searche� fo� i� SPECIAL.LB� o� th� � �
drive�� I� found�� LU.CO� i� loaded�� an� th� string� -O� �
COMMAND� -A� an� *.CO� ar� passe� t� i� a� parameters.
LRUNZ - -ZIP
th� fil� -ZIP.CO� i� searche� fo� i� COMMAND.LBҠ o� th� �
curren� drive�� o� th� A� drive� I� found� -ZIP.CO� i� loade� an� �
execute� wit� � blan� paramete� list�� Sinc� -ZIP.CO͠ begin� �
wit� � -�� th� extr� - followe� b� � spac� wa� neede� t� ac� a� � �
place-holde� fo� th� librar� name� Compar� with:
LRUNZ -ZIP
th� librar�� -ZIP.LB� i� looke� for�� bu� nothin� els� �
happens� becaus� n� comman� wa� specified.
LRUNZ
wit� n� parameter� a� all�� cause� � scree� o� hel� �
informatio� t� b� displaye� a� � memor� refresher.
:LDIRZ Command
LDIR� print� � sorte� director� o� th� defaul� librar� file� �
Th� printou� give� th� name� o� th� selecte� file� an� thei� �
sizes�� I� i� sorte� alphabeticall� b� fil� nam� an� type�� Tw� �
option� ar� permitted�� an� the� ar� th� nam� o� th� librar� fil� �
(ca� b� specifie� b� lbrfile�� i� whic� cas� lbrfile.LB� wil� b� �
accessed�� o� b�� � ful� filename.typ� an� th� fil� spe� (wil� �
card� ar� OK)� Form� o� th� LDIR� comman� are:
LDIRZ // <-- Print Help
LDIRZ <-- All Files
LDIRZ -lbrfile fn.t <-- Selected Files from Library
LDIRZ filename.typ <-- Selected Files
:LRUNZ as an Extended Command Processor Under ZCPR2
I� th� reade� ca� recall�� comman� processin� unde� ZCPR� �
follows these steps:
1. ZCPR2 receives a command
2�� ZCPR�� parse� th� command�� determine� i� i� i� � �
ZCPR2-resident command and executes it if it is
3�� I� not�� ZCPR� searche� alon� th� command-searc� �
pat� fo� � CO� fil� whic� ha� th� sam� nam� a� th� command�� i� �
found, it is loaded and executed
4�� I� thi� fails�� ZCPR� ma� eithe� searc� alon� th� �
command-searc� pat� o� g� directl� t� th� roo� o� th� pat� �
lookin� fo� a� Extende� Comman� Processor�� i� found�� i� i� �
loaded�� passe� th� comman� lin� a� th� use� presente� it�� an� �
executed; if not, an error message is given
LRUNڠ i� a� excellen� candidat� fo� a� Extende� Comman� �
Processor�� I� th� comman� t� b� execute� i� TEST.COM�� an� i� �
take� tex� a� a� argument�� the� th� comman� lin� t� execut� �
TEST.COM under ZCPR2 would be:
TEST text
I� TEST.CO͠ i� i� COMMAND.LB� (o� such)�� th� comman� lin� t� �
execute the same file using LRUNZ would be:
LRUNZ TEST text
Thi� latte� comman� i� simulate� b� ZCPR� whe� i� fail� t� fin� �
th� CO͠ file�� Th� nam� o� th� Extende� Comman� Processo� �
(recommended�� i� CMDRUN�� and�� b� renamin� LRUN� t� CMDRUРo� �
makin� � cop� o� LRUN� a� CMDRUN�� LRUN� become� th� Extende� �
Comman� Processor.
LDIRڠ fit� i� nicel� wit� thi� scheme�� COMMAND.LB� ca� b� �
kep� a� th� ROO� alon� wit� LRUN� an� LDIRZ�� an� LRUNZ�� whe� �
executed��� wil젠 g� t� th� ROOԠ lookin� fo� an䠠 findin� �
COMMAND.LBR�� a� whic� poin� i� extract� th� require� CO͠ file� �
LDIRZ�� whe� executed�� wil� searc� alon� th� pat� fo� th� �
COMMAND.LB� file� and� hopefully� fin� i� a� th� ROO� an� extrac� �
the information (file names) requested by the user.
Bot� LRUN� an� LDIR� ca� b� installe� b� GENIN� an� b� se� �
t� loo� fo� th� sam� COMMAND.LB� fil� a� wel� a� b� tol� wher� �
the path they are to follow is located.