home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug001.arc
/
PART5.IQS
/
PART5.INS
Wrap
Text File
|
1979-12-31
|
11KB
|
233 lines
.PO0
dBAS┼ I╔ PAR╘ 5
Thσ operatioε oµ dBasσ caε bσ varieΣ iε man∙ subtlσ ways« Fo≥ example¼ ì
yo⌡ ma∙ no⌠ likσ thσ wa∙ APPEN─ display≤ thσ colon≤ a⌠ thσ enΣ oµ fields¼ o≥ ì
thσ wa∙ thσ systeφ beep≤ anΣ move≤ oε t∩ thσ nex⌠ fielΣ wheneve≥ thσ curren⌠ ì
fielΣ i≤ full.
Thesσ attribute≤ caε bσ altereΣ b∙ usσ oµ ß numbe≥ oµ parameter≤ whicΦ ì
arσ describeΣ iε thσ dBasσ manuals« Therσ arσ ove≥ 2░ oµ theφ bu⌠ the∙ al∞ ì
worδ iε thσ samσ way« Thσ ke∙ t∩ thei≥ usσ i≤ thσ SE╘ command.
SE╘ anΣ parameterS.
Thσ SE╘ commanΣ take≤ tw∩ forms:
SE╘ <parm1╛ [ON]
[OFF]
whicΦ allow≤ toggleΣ parameter≤ t∩ bσ switcheΣ oε o≥ off¼ and
SE╘ <parm2╛ T╧ <opt>
whicΦ allow≤ thosσ parameter≤ tha⌠ neeΣ onσ oµ thσ differen⌠ string≤ describeΣ ì
belo≈ t∩ havσ it≤ valuσ altered.
Probabl∙ thσ mos⌠ importan⌠ paramete≥ fo≥ thσ beginninτ dBasσ programme≥ ì
arσ thosσ whicΦ assis⌠ iε debugging« Thσ firs⌠ oµ thesσ i≤ thσ TAL╦ parameter¼ ì
whicΦ default≤ t∩ ON« Wheneve≥ ß valuσ i≤ storeΣ t∩ ß memor∙ variable¼ tha⌠ ì
valuσ i≤ displayeΣ oε thσ screen¼ unles≤ TAL╦ i≤ se⌠ off.
Thσ resul⌠ oµ thi≤ i≤ tha⌠ runninτ program≤ wil∞ producσ ß streaφ iµ ì
intermediatσ value≤ oε thσ screen¼ whicΦ wil∞ confusσ thσ user¼ (no⌠ t∩ ì
mentioε thσ programmer⌐ anΣ screw≤ u≡ beautifull∙ designeΣ screeε displays« S∩ ì
thσ firs⌠ linσ iε mos⌠ program≤ i≤ usually
SE╘ TAL╦ OFF
whicΦ disable≤ thi≤ feature.
Thσ ECH╧ paramete≥ i≤ als∩ usefu∞ iε debugging« WitΦ ECH╧ se⌠ on¼ al∞ ì
command≤ whicΦ arσ reaΣ froφ ß commanΣ filσ arσ als∩ displayeΣ oε thσ screen« ì
ECH╧ default≤ t∩ OFF« Iε effect¼ thi≤ i≤ ß tracσ facilit∙ fo≥ trackinτ prograφ ì
execution.
┴ simila≥ facilit∙ i≤ provideΣ b∙ thσ DEBU╟ parameter╗ witΦ thi≤ se⌠ on¼ ì
line≤ oµ commanΣ file≤ arσ sen⌠ t∩ thσ printe≥ a≤ the∙ arσ executed« Thi≤ ì
avoid≤ messinτ u≡ screeε displays« Again¼ DEBU╟ default≤ t∩ OFF.
Aε eveε morσ usefu∞ facilit∙ fo≥ trackinτ dowε bug≤ i≤ thσ STE╨ ì
parameter« WitΦ STE╨ se⌠ ON¼ thσ systeφ wil∞ executσ ß singlσ linσ oµ ß ì
commanΣ filσ a⌠ ß time¼ theε hal⌠ anΣ wai⌠ whilσ thσ use≥ examine≤ memor∙ ì
variable≤ o≥ enter≤ othe≥ commanΣ lines¼ o≥ quit≤ thσ commanΣ filσ o≥ ì
continues« Again¼ STE╨ default≤ t∩ OFF.
è Thσ nex⌠ grou≡ oµ paramete≥ contro∞ wherσ outpu⌠ goes« Likσ Unix¼ dBasσ ì
provide≤ ß facilit∙ fo≥ redirectablσ I/O¼ anΣ treat≤ device≤ anΣ file≤ alikσ - ì
a⌠ leas⌠ a≤ fa≥ a≤ outpu⌠ i≤ concerned« Generally¼ outpu⌠ default≤ t∩ thσ ì
consolσ device¼ bu⌠ tha⌠ caε bσ changeΣ wherσ necessary.
Thσ threσ parameter≤ concerneΣ arσ CONSOLE¼ PRIN╘ anΣ ALTERNATE« SE╘ ì
CONSOL┼ O╬ wil∞ direc⌠ outpu⌠ t∩ thσ screen¼ whicΦ i≤ thσ usua∞ selectioε anΣ ì
thσ default« Settinτ CONSOL┼ OF╞ doe≤ havσ it≤ uses¼ though¼ a≤ wσ shal∞ see.
PRIN╘ i≤ usuall∙ se⌠ OFF¼ bu⌠ witΦ i⌠ se⌠ ON¼ an∙ LIST≤ o≥ DISPLAY≤ wil∞ ì
producσ aε outpu⌠ t∩ thσ printer.
Finally¼ thσ use≥ ma∙ wisΦ t∩ direc⌠ ß repor⌠ o≥ othe≥ outpu⌠ t∩ ß disδ ì
filσ fo≥ subsequen⌠ editinτ o≥ processinτ b∙ anothe≥ program« Thi≤ i≤ achieveΣ ì
witΦ thσ ALTERNAT┼ parameter« Tw∩ form≤ oµ SE╘ ALTERNAT┼ arσ involved« Thσ ì
first¼ SE╘ ALTERNAT┼ T╧ <filename╛ set≤ u≡ thσ namσ oµ thσ filσ t∩ whicΦ thσ ì
outpu⌠ wil∞ bσ sent« SE╘ ALTERNAT┼ O╬ theε start≤ collectioε oµ outpu⌠ iε thσ ì
disδ file¼ anΣ SE╘ ALTERNAT┼ OF╞ stop≤ it.
Therσ rσ severa∞ use≤ fo≥ thesσ commands« Fo≥ example¼ i⌠ i≤ commoε t∩ ì
usσ WAI╘ T╧ <memvar╛ commanΣ t∩ inpu⌠ single-characte≥ men⌡ choicσ froφ thσ ì
user« Thσ onl∙ troublσ i≤ tha⌠ thσ WAI╘ commanΣ produce≤ ß WAITIN╟ messagσ oε ì
thσ screen¼ whicΦ mos⌠ (wel∞ some⌐ programmer≤ finΣ aestheticall∙ offensive« ì
Thi≤ codσ segmen⌠ get≤ arounΣ that:
*Suppresse≤ screeε output
SE╘ CONSOL┼ OFF
*Accep⌠ inpu⌠ character
WAI╘ T╧ choice
*Enablσ outpu⌠ again
SE╘ CONSOL┼ ON
Similarly¼ somσ programmer≤ likσ t∩ disguisσ thσ fac⌠ tha⌠ the∙ wrotσ aε ì
applicatioε iε dBasσ b∙ suppressinτ thσ dBasσ sign-ofµ message:
SE╘ CONSOL┼ OFF
QUIT
Oµ course¼ the∙ als∩ renamσ DBase.coφ t∩ RUN.CO═ o≥ similar¼ anΣ thσ use≥ ì
think≤ he'≤ hireΣ ß hotsho⌠ CBASIC-▓ programmer!
SE╘ ALTERNAT┼ ha≤ ß numbe≥ oµ uses¼ sucΦ a≤ sendinτ report≤ t∩ disδ ì
files« It'≤ als∩ possiblσ t∩ creatσ skeleta∞ MailMergσ letter≤ anΣ othe≥ tex⌠ ì
file≤ b∙ usinτ SE╘ ALTERNATE« Fo≥ example║
COP┘ STRUCTUR┼ EXTENDED
caε bσ useΣ t∩ creatσ database≤ containinτ thσ fielΣ name≤ oµ thσ curren⌠ ì
database¼ anΣ theε ß shor⌠ dBasσ prograφ caε bσ useΣ t∩ producσ ß tex⌠ filσ ì
containinτ thσ appropriatσ .R╓ <fieldname╛ line≤ fo≥ MailMerge« Thi≤ i≤ morσ ß ì
matte≥ oµ ingenuit∙ thaε programminτ style¼ however¼ iε addition¼ SE╘ ì
ALTERNAT┼ caε bσ useΣ t∩ producσ audi⌠ trails.
è Somσ parameter≤ affec⌠ thσ full-screeε editinτ operation≤ oµ dBase¼ sucΦ ì
a≤ APPEND¼ EDI╘ anΣ CREATE« First¼ thosσ unfortunatσ soul≤ wh∩ d∩ no⌠ havσ ì
terminal≤ witΦ curso≥ addressinτ caε implemen⌠ ß line-orienteΣ versioε oµ ì
dBasσ witΦ thσ command:
SE╘ SCREE╬ OFF
Naturally¼ i⌠ default≤ t∩ ON« Thi≤ line-orienteΣ versioε i≤ trul∙ ì
dreadfu∞ t∩ use« N∩ furthe≥ comment
dBasσ screen≤ generall∙ usσ colon≤ t∩ delimi⌠ fields¼ s∩ tha⌠ thσ use≥ ì
caε seσ ha≈ mucΦ spacσ i≤ lef⌠ t∩ typσ iε name≤ o≥ othe≥ lonτ data« However¼ ì
iµ onσ design≤ ß men⌡ a≤ ß forma⌠ screeε witΦ ß singlσ characte≥ inpu⌠ field¼ ì
thσ colon≤ arσ ß bi⌠ oµ ß giveawa∙ a≤ t∩ ho≈ i⌠ wa≤ done.
Thσ SE╘ COLO╬ OF╞ commanΣ wil∞ ge⌠ riΣ oµ them« SE╘ COLO╬ O╬ wil∞ displa∙ ì
theφ again¼ anΣ thi≤ i≤ thσ defaul⌠ mode.
DON'╘ LIK┼ TH┼ BEEPS?
Onσ defaul⌠ oµ dBase'≤ tha⌠ ╔ don'⌠ likσ i≤ thσ wa∙ tha⌠ wheε ß use≥ ì
fill≤ ß fielΣ durninτ appenΣ o≥ edit¼ i⌠ simpl∙ goe≤ oε t∩ thσ nex⌠ fielΣ witΦ ì
ß beep« Wheε you'rσ typinτ fas⌠ (anΣ mos⌠ datß entr∙ operator≤ arσ fast)¼ b∙ ì
thσ timσ yo⌡ recognizσ thσ beep¼ you'rσ filleΣ halµ oµ thσ nex⌠ fielΣ witΦ ì
overflo≈ froφ thσ curren⌠ one.
SE╘ CONFIR═ O╬ get≤ riΣ oµ thσ problem« No≈ dBasσ wil∞ no⌠ proceeΣ t∩ thσ ì
nex⌠ fielΣ unti∞ yo⌡ hi⌠ <CR>« I⌠ wil∞ stil∞ bee≡ wheε ß fielΣ i≤ filleΣ up¼ ì
however¼ whicΦ i≤ sensible.
Iµ yo⌡ finΣ tha⌠ thσ beepinτ i≤ drivinτ yo⌡ officσ neighbour≤ u≡ thσ wal∞ ì
yo⌡ caε suppres≤ thσ beepinτ witΦ (herσ wσ g∩ again⌐ SE╘ BEL╠ OFF« I⌠ default≤ ì
t∩ on.
Somσ computers¼ likσ Kaypr∩ II¼ d∩ no⌠ havσ halµ intensit∙ video¼ anΣ arσ ì
iε fac⌠ sen⌠ ß littlσ craz∙ b∙ thσ null≤ tha⌠ dBasσ transmit≤ iε placσ oµ thσ ì
absen⌠ halµ intensit∙ sequences« Thσ Kaypr∩ display≤ lot≤ oµ apoatrophe≤ iε ì
thσ middlσ oµ forms« SucΦ machine≤ caε bσ sorteΣ ou⌠ b∙
SE╘ INTENSIT┘ OFF
(i⌠ default≤ t∩ ON).
I⌠ ofteε happen≤ tha⌠ ß lo⌠ oµ datß entr∙ tex⌠ i≤ repeated« Fo≥ example¼ ì
iε enterinτ orders¼ thσ onσ produc⌠ ma∙ dominatσ entirely¼ s∩ tha⌠ thσ use≥ i≤ ì
perpetuall∙ typinτ thσ samσ information« Thσ CARR┘ paramete≥ caε savσ worδ ì
here.
SE╘ CARR┘ O╬ wil∞ carr∙ thσ informatioε froφ thσ las⌠ APPEN─ forφ ont∩ ì
thσ curren⌠ one¼ s∩ tha⌠ insteaΣ oµ enterinτ completel∙ ne≈ data¼ thσ use≥ caε ì
simpl∙ edi⌠ thσ datß carrieΣ ove≥ froφ thσ las⌠ screen« I⌠ doesn'⌠ alway≤ worδ ì
ou⌠ t∩ bσ tha⌠ mucΦ morσ efficient¼ bu⌠ oε occasion≤ i⌠ caε savσ ß lo⌠ oµ ì
effor⌠ anΣ errors.
è Finally¼ dBasσ normall∙ insert≤ ß spacσ betweeε field≤ wheε record≤ arσ ì
LISTeΣ o≥ DISPLAYed¼ jus⌠ s∩ thσ use≥ caε so⌠ theφ out« SE╘ RA╫ O╬ eliminate≤ ì
thesσ spaces¼ s∩ tha⌠ thσ field≤ arσ concatenateΣ directly.
┴ couplσ oµ parameter≤ contro∞ thσ wa∙ thσ databasσ recorΣ pointe≥ i≤ ì
positioned« Thσ firs⌠ onσ help≤ t∩ ge⌠ arounΣ thσ fundamenta∞ 32-fielΣ ì
limitatioε oµ dBasσ b∙ lettinτ thσ use≥ linδ tw∩ database≤ t∩ forφ onσ witΦ ì
64-fields.
SE╘ LINKAG┼ O╬ make≤ al∞ dBase'≤ sequentia∞ command≤ sucΦ a≤ LIST¼ REPOR╘ ì
anΣ SU═ (tha⌠ is¼ command≤ tha⌠ havσ ß scopσ parameter⌐ perforφ positioninτ oε ì
botΦ thσ primar∙ anΣ secondar∙ databases« I⌠ default≤ t∩ OFF« ╔ mus⌠ admi⌠ ì
tha⌠ ╔ havσ neve≥ haΣ ß grea⌠ dea∞ oµ succes≤ witΦ thi≤ command╗ maybσ I'φ ì
missinτ something¼ althougΦ ╔ als∩ believσ tha⌠ therσ werσ bug≤ associateΣ ì
witΦ thσ earl∙ version≤ oµ dBase.
Thσ FIN─ commanΣ normall∙ make≤ strinτ comparison≤ u≡ t∩ anΣ includinτ ì
thσ las⌠ characte≥ oµ thσ FIN─ parameter¼ bu⌠ no⌠ beyond« Thus¼ FIN─ SMIT╚ ì
wil∞ matcΦ SMIT╚ anΣ als∩ SMITHSON¼ SMITH┘ anΣ n∩ doub⌠ others.
WitΦ SE╘ EXAC╘ ON¼ botΦ string≤ mus⌠ bσ thσ samσ length¼ s∩ tha⌠ FIN─ ì
SMIT╚ wil∞ onl∙ matcΦ ß fielΣ containinτ SMITH« I⌠ default≤ t∩ OFF.
WitΦ dBasσ 2.4¼ ß ne≈ paramete≥ ha≤ beeε addeΣ t∩ contro∞ thσ wa∙ deleteΣ ì
record≤ arσ treated« dBasσ 2.│ wil∞ locatσ anΣ displa∙ deleteΣ record≤ thσ ì
samσ wa∙ a≤ an∙ others¼ whicΦ rathe≥ defeat≤ thσ purposσ oµ deletinτ them« ì
dBasσ 2.┤ default≤ t∩ SE╘ DELETE─ OFF¼ whicΦ act≤ thσ samσ way.
However¼ witΦ SE╘ DELETE─ ON¼ deleteΣ record≤ canno⌠ bσ founΣ o≥ ì
processeΣ b∙ an∙ commanΣ whicΦ allow≤ thσ nex⌠ phrase¼ sucΦ a≤ LIST¼ DISPLAY¼ ì
LOCAT┼ anΣ others.
Tha⌠ leave≤ jus⌠ ß couplσ oµ miscellaneou≤ parameters║ SE╘ ESCAP┼ OF╞ ì
(defaul⌠ ON⌐ disable≤ thσ abilit∙ oµ thσ ESCAP┼ ke∙ t∩ interrup⌠ executinτ ì
commanΣ files¼ anΣ thereforσ stop≤ user≤ breakinτ int∩ thσ systems.
Finally¼ thσ REPOR╘ commanΣ normall∙ perform≤ ß pagσ ejec⌠ beforσ ì
startinτ t∩ print¼ probabl∙ wastinτ pape≥ a≤ i⌠ doe≤ so« SE╘ EJEC╘ OF╞ wil∞ ì
suppres≤ thi≤ deforestator∙ behavior.
Morσ Comple° SETS
Whilσ we'rσ oε thσ subjec⌠ oµ REPORTs¼ let'≤ star⌠ lookinτ a⌠ morσ ì
comple° version≤ oµ thσ SE╘ command« SE╘ HEADIN╟ T╧ <string╛ set≤ thσ headinτ ì
oµ reports.
SE╘ FORMA╘ T╧ caε takσ onσ oµ severa∞ options║ SCREEN¼ PRIN╘ o≥ ì
<filename>« dBasσ make≤ extensivσ usσ oµ forma⌠ files¼ whicΦ contaiε @..SAY.« ì
GE╘ commands« SucΦ form≤ caε bσ sen⌠ t∩ eithe≥ thσ screeε o≥ printe≥ b∙ eithe≥ ì
oµ thσ firs⌠ tw∩ options« Thσ thirΣ specifie≤ thσ forma⌠ filσ froφ whicΦ thσ ì
forφ wil∞ bσ read.
Normally¼ dBasσ create≤ file≤ oε thσ CP/═ defaul⌠ o≥ curren⌠ drivσ ì
(usuall∙ A:)¼ unles≤ thi≤ i≤ over-riddeε b∙ explici⌠ drivσ naminτ a≤ par⌠ oµ ì
thσ filσ names« However¼ iµ al∞ command≤ anΣ datß file≤ fo≥ aε applicatioε arσ ìèoε drivσ B║ theε thσ defaul⌠ drivσ caε bσ se⌠ t∩ B║ b∙ SE╘ DEFAUL╘ T╧ B:« Oε ì
earl∙ version≤ oµ dBase¼ onσ haΣ t∩ omi⌠ thσ colon¼ thus║ SE╘ DEFAUL╘ T╧ B«
SE╘ DAT┼ T╧ <datestring╛ set≤ thσ systeφ date¼ withou⌠ performinτ an∙ ì
validatioε oε it¼ whicΦ i≤ thσ simples⌠ wa∙ t∩ ge⌠ arounΣ versioε 2.3'≤ ì
predispositioε fo≥ thσ U╙ datσ format«
Finally¼ SE╘ INDE╪ T╧ <indexfile>¼ <indexfile>,.« i≤ anothe≥ wa∙ oµ ì
sayinτ US┼ <datafile╛ INDE╪ <indexfile>,.« wheε you'vσ alread∙ saiΣ US┼ ì
<datafile>« It'≤ ß bi⌠ quicker¼ that'≤ all.
Tha⌠ conclude≤ ou≥ guideΣ tou≥ arounΣ dBasσ parameters.
EN─ PAR╘ 5.