MDBS_V104_System_ation_Aug1980 MDBS V104 System Ation Aug1980
MDBS_V104_System_ation_Aug1980 MDBS_V104_System_ation_Aug1980
User Manual: MDBS_V104_System_ation_Aug1980
Open the PDF directly: View PDF .
Page Count: 267 [warning: Documents this large are best viewed by clicking the View PDF Link!]
MDBS Data Management System Documentation
Version 1.04
Micro Data Base Systems, Inc.
P. O. Box 248
Lafayette, Indiana 47902
(317) 448-1616
(317) 742-7388
August 1980
Copyright Notice
This entire manual is provided for the use of" the customer and the
eustomer"s employees. The entire contents have been copyrighted by
Micro Data Base Systems, Inc., and reproduction by any means is
prohibited except as permitted in awritten agreement with Micro Data
Base Systems, Inc.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 1
MDBS 2!at: aManage: ment System Documentation
?REFACE
Tk i'3 rnan"ctai Z·3 cc: ncerTjed wiU"z data base management. and :it.s use as a
t. ocj !in soCtware development. Many exµerts Rave rn^edicted t.ha t. two
innovaiions wit! dominate th ecomputing scene iri t.he 1g7;g"s- Th f'
first innovation i sirí th ear' e a o fcomputer hardware w.i t" r2 t. he
devel"jµrr\e-nt of" the micro—computers (computer o n a chip") .The seconc!,
asof't.ware advarice, is the us eofhighly sophisti.c"ttéñ 'iía" ab3-s e
management techniques to eont:"o1 complex data structures. The :et.wo
ínríovatícmc are com'{'i";nec! together in th e!v!im^e TJata Ba ""' 1> j7y"7teTt" '
soghisticated í'at.a Ba: 3e ?4anagement System. We be! iev that íj?á .-."g E3sf±
mar,agernent systems (DBMS) wit. !7 their' capability o[ supporting
selective retrieval to "what. i-f"" t:yµe inquirü-es and their ability to
suppc·rt restructuring as the riat-ure of the dernrnds change, will become
the focal software in uüicro"s as they are already in mini— and :mixi-"-
computers. The uÜcro—coírµuter. wi th its fantastic computing power c) yj
a- per—dollar basis, combined wi th apower"í"v-l data base management
system, will be aformidable tcol i" ormana¿"ing enterprises cf" a}l
types .
Th epurpose o?th isuser "smanual is twoPold. First there is
introduc".or,y material to the area of" data base management. Since this
issuch avast and important area we real ly cari" tdo complete justice
to this topic and suitable references are:
1.Haseman .\n' .D.an dA.B.Whinston, Introduction toDa ta
Management, Richard D. Irwin .Inc. ,Homewood. I L,1977.
2. Martin, J. , Comouter Data—Base Organizat.íori, Prericice Ha I!,
Englewood Cliffs, NJ, 1975.
©COPYRIGHT 1979, 1980, bFcro Data Base Systems, Inc. 2
MDBS Data Management System Documentation
3. Holsapple, C., Primer on Data Base Management, MDBS Inc., Box
248, Lafayette, IN, 1979.
The second goal of this manual is to give adetailed guided tour
through the use OÍ" MDBS.DDL and MDBS.DMS. Here our aim is to be as
complete and as comprehensive as possible.
Finally, we request comments from our readers as to how successful,
in their view, we have been in achieving these goals. Have you been
able to follow our description of how MDBS.DDL and MDBS.D!A.S should be
used and actually have you achieved the expected results? Or have
there been points where the steps were unclear or ambiguous? We plan
to incorporate these suggestions in future versions to finally achieve
amanual that is atit companion to what we feel is aremarkable and
truly innovative sQt"tware product in the micro--computer area.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 3
MOBS 2ata Management System Documentation
TABLE OF CONTENTS
Page
I. INTRODUCTION... .!5
II. MDBS.DDL DATA DESCRIPTIObl LANGUAGE.... .... 1'7
A. Introduction..................................... i':'
B. Features. ... .... ..................... . . . . . ... . ...18
C. Getting Started With MDBS.DDL.................... 2C
i. Initial loading and test. run........ -........ 20
2. Relocating KIDBS.DDL.......................... 2Z
3. Important MDBS.DDL addresses:
Personalizing and patching MDBS.DDL.......... 23
D. MDBS Data Description Language................... 25
1. Iritroduction and, Definitions................. 25
2. IJDL Example.................................. 27
3. Many—to—Many Example......................... 33
4. Multiple owner/member example................ 40
5. LU)L Specifications........................... 44
El. Notes on Data Bm: eFiles.......... 7C)
E. Modes of Operation............................... 72
1. Introduction................................. 72
2. Text Entry/Commanci mode...................... 75
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 4
MDBS Data Management System Documentation
3. Line editing mode............................ 95
4. DDL analyzer mode............................ 103
III. MDBS.DMS DATA MANAGEMENT SYSTEM...................... 149
A. Introduction..................................... 149
B. Features .............................. 150
C. Getting Started With MDBS.DMS.................... 151
1. Relocating MDBS.DMS.......................... 151
2. Personalizing and patching MDBS.DMS.......... 151
D. MDBS Data Management System...................... 155
1. Introduction............... ....... 155
2. Calling procedure............................ 174
3. Data management system routines..-........... 177
IV. CONCLUDING REMARKS........................ 258
APPENDIX 1........................................... 262
APPENDIX 2........................................... 264
-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 5
MDBS Data Management System Documentation
DDL COMMANDS
(a) By Mnemonic Pa ge
BAGKSPACE-key Delccte text. . . . . .. ... ... ... . .. . . . . . . . . . . 74
BYE Return to operating system. ."7 q
CChange aline of" text. .e .... .... ........ 97
CRepeat changes. . . . . . ...... . . . .-..... . . . .1 C) Ci
Ccmtr<il CInterrupt ap operation. . . . . . . . . . . . ... . . .74
Control HBackspace and delete acharacter. ..... . .'74
Control PToggle outpu!- ...,... . ..... . . . . . . . .. . . . . 73
Control XInterrupt. aline of" input. .... .. . . .. .. .. 73
DDelete t-ext........ ...... ............... 80
DDL Data Definition Language Analyzer. ... . .. 82
ÚELETE Key B.acksp·ace and delete acharacter. . . . .. . .73
DR Data description format. for dri'íe. ......83
it Enter line edit mcAe. -. . ... . . ..... . .....85
¿—d
EN Data description format for end line. ... 83
ESCAPE- Key Return t-o ogerating system. . . .. . ........79
FIF'at-a. description format Í"or file. ..... . .83
IT Fcítta descrij"±: ion format for" item. ... . . ..83
LList te x t. . ..... . . ......... . . . . . ..... . ..86
ME Data description format tor member. . . . ..83
NRenumber thc' text. ..................... . 88
OW Data description format f"or owner. . . . . . .83
pPrint a. space ruler. ......... .... .. . .... 9O
PA Data de'umi"iption í'ormat for password. ,..83
RRead atext tile........................ 91
©CC'"YF?IGHT 1979, iggj, Micro Data Base Systems, Inc. 6
MDBS Data Management System Documentation
RE Data description format for record...... 83
RETURN-Key End the current line Oí7 input....,...... 73
RETURN-Key Move through text....................... 96
SLeave the editor" mode................... 99
SE Data description format for set......... 83
WWrite atext file....................... 93
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 7
MDBS Data Management System Documentation
DDL COMMANDS
(b) By Function
Backspace and delete acharacter". ... ..... . ... . ...... . . 73
Change aline of" text. ... ..... . . .. .. ..... .......... ... .97
Data def"inition language analyzer. ... . .... . . . ..........82
Data description Í7ormat. c'cmman&m ...... . . - . . .- . .. . -. . . . 83
Delete text-. .... .... . . .. .. . . . . . . . ........... .. . . -.. .. ..'3 Q
End the current line 'jf iní?'Llt. ....... . . . . . . . . .,..... - . .73
^
Enter line edit mode . . .... . . . ...... . . .. . . . - . -. . ..... . ..85
Leave t-he editor mode. . . .q9
List text. ...................... . . . ........ . . . . . ...... . 86
Move through text. . . . . . . . .,......... . ...-. . . . . . . . . . . .. , 96
Print aspace ruler. ............ . . . ..,. . ., . . . . . . , . . . , ..ga
Read atext ri1e.. <4j
aV * · *0t·O · *D06 6 »0b.PbrE4 P r+·P y · P · V· · t · L~"
Penümber t. "h etext- . . ....... - ...-.......-........ . . . .....88
Repeat charÁEes- .. . . . . . . .. . . . . . . ....-.. . .. . . .. . ..........1 O C)
Restart a)ine. ... . . ........0 . ............. 0 . ....-. > ..7:"3
Return to operating system. . , 79
Write atext file................... ........... .... .... 93
©COPYF'IGHT 1979, !980, Micro Data Base Systems, Inc. 8
MOBS Data Management System Documentation
DDL ERROR MESSAGES
?age
ADEPENDING ON ITEM CANNOT BE A REPEATED FIELD ... .. . .. 105
AVARIABLE LENGTH ITEM MUST BE LAST IN ARECOFD ... . . .. 106
CANNOT WRITE TO DISK ....... .. .. .. ......... .. .-........ !0'7
CAN'T HAVE OTHER OWNERS WITH SYSTEM ................ . . . !08
DEPENDING o'\í ITEM MUST BE Éí TWO BYTE BINARY VARIABLE .. .l lj9
DEPENDING ON ITEN lvlUST BE BINARY ....... . ... . . . . . . . . . . .t 1 C)
DEPENDING ON ITEM t{oT pREvIc)Ugij.Y DEFINED If.! THLS RI'CCRU j. 11
DUPLICATE ITEP! NAME IN RECORD .. ............. . . . . .. ... .í12
DUPLICATE RECORD NAME .... . . .... . ..... . . . . . .. . ... . . .. . . 113
DUPLICATE FET NAME ...... . .................. . . . .. . . . . . :. i4
ERROR .. . . .. . .... . .. . ... . . . ........ . ..... . . . .. . . . ... . . . .1i5
EXPECTING ANUMBER IN AFIELD .. . !1(3
EXPECTING ARECORD, ITEM, DR SET LINE .... . .. . . . .. . . . . . :r'
EXPECTING AUTO OR MAN . . ....j1 8
EXPECTING GET OR END ZJNE ................... .......... 119
FILE HAS NOT BEEN CREATED: PLEASE DC SO .. . .. . . ... ..... !ZG
IMPROPER DRIVE NUMBER .. . .. . ... . . . . . ... . .. . . . ....... . . . 121
INCORRECT MEMBER ORDER ... . . . . . . .... . . .... . .. . .. . - . . . . 122
INCORRECT OWNER ORDER . . - .. . .. . . . . . .... . , . . . . . . . . . . . - . - Z23
INVALID ITEM TYPE ... . . .. .. .. ... .. ... .. ... .. . . .. , . . .. .12-l
INVALID SET CHARACTERISTICS .. ...... .. . . ... . .. .. ..... !25
INVALID SET TYPE .. ..... .'2(3
ITEM READ OR 'n'EITE ACCESS LESS THAN RECORD'S . . . .. . . . . . 12'7
KEY UNDECLARED ........ . . . . . ......... . . . . . . . ..........128
eCOPYRIGHT 1973, 1980, Micro Data Base Systems, inc. 9
MOBS Kata Management. System Documentation
MAY LENGTH FOR BINARY \'ARIA!3LE IG 2 . . . .. . . ....... . . . . . 129
MAXIMUN RECORD SIZE TOO LARGÉ TO FIT ON PAGE ... . . .. . . ', 3C
N.LMES CANNÜT START WITH A$OR BE BLANK .. ... . . .. ...... 131
NG) XEMBER AÑD/OR OWNER LINE FOR A SET ... . . . . .. . .......F32
rn: PAGES ALLOCATED Tci AFILE .. . . . ........ . . . . . . . . . . . . .E23
¡'.;¿y; ENñUgH ROOM CEil DEI'/E 1... .... . . ... .. . .. ..... . . .. .. 135
NUMBER LARGER THAN 255 ... . . . ............... . . . . . , . . . .136
PAGE LENGTH MUST BE DI\U31!3LE 3Y 256 ... ... ............ 137
PASSWORD LINE EX7ECTED ........ . . . . . ........ . . . . . .. . . . .138
PASSWORD ENTRY OR RF: ZORTJ LINE EXPECTED .... . ..... . . . . . .139
PREMATURE END OF INF'U" ... . ...i"tc)
READ ACCESS GREATER THAN :.\/PITE ACCEF3 ..... . . .. . . .... . .i-41
EzccíRD ACCEGG GREATER THAR' GET 'S ....-. . . . .......-.. . .i42
RECGRD NOT FOUND . . . ........ . .. . .... . ............ . .. . ..143
REPEATED ITEM TOO LARGE .. ........ .. ... . . . . . . . . . . .. ... . 144
R/W ACCESS NOT EQUAL FGR DZ7ENDTNG AND CURRENT ITEM .. . 145
SECOND LINE OF GET DEFINITION INVALID .. . . .... .. ... .. .. i46
£OF?T KEY NOT IN RECORD .......... . . . . ...... .... . . . ... ..147
SYFJTEKJ CAb' 'T BE EMEMBER. ......... . . . .. . . . . . . ...... . . .148
C: COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. IC)
MDBS Data Management- System Documentation
INDEX OF DML COMMANDS
DML Cornmand Page
ÁCS Add Current OÍ" run unit to Set ......,.......... 179
AMS Add Member to Set .............................. 180
CCT Check Current of run unit Type ..¥.............. 182
CLOSE CLOSE the data b¿)se ............................. 183
GMT Check cLlrrer}t Member Type ...................... 184
COT Check current Owner Type ....................... 185
CR Create Record ................................M. 186
CRS Create Record and Store data ................... 1É37
DEFINE DEFINE adata bloek............................. 189
DEC Delete Record based on Current of run unit ..... í90
DRM Delete Record based on current Member .......... 192
DRO Delete Record based on current Owner ........... 194
DRR Delete Record based on current Record .......... 196
EXTEND EXTEND adata block............................. 198
FFM Find First Member .......,...................... 200
FFO Find First Owner ............................... 201
FINDM FIND Member ...............................,.... 202
FINDO FIND Owner ......,....................,......... 2C3
FLM Find Last Member .....................,......... 204
FLO Find Last Owner ................................ 205
FMSK Find Member based oí": 'Sort Yey .................. 206
FNM Find Next Member ............................... 207
FNO Find Next Owner ................................ 208
E) COPYRIGHT 1979, 1980. Micro Data Base Systems, Inc. 11
MDBS Data Management. System Docuraentation
FC'FK Find Owner'" }: .;,.)e't3(i on Sort key .....-- . ..... . . . . . :'Z'.: "i":'
FP\' Find F"evi:>us M±mber . - . . ...X..... . ... . .. . . , . , :Z IC'
t"'"--; IMind F'"u?v.lo1j3 C:wne" "7) 1:
GEtC GET ciaf"a frorú Curr"e,"ít. of" run uniÁ. . . "" '"'
GETM GET data !"""'cm: 'currerzt Member ... . ..... . . . . . . ..2.í ::"
GETO GET data fror current Üwner" .?.; l
GETR GET data from curr"e'nt Record ... . . . ..... .. . . .. . - 215
GFC GET Field from Current of" run unit. .... .. .... ,.. me
GFM '-;et Field f"rcm current Member" ..... ... . . . . . . . . Z 17
GFO Get Field from current: Owner ,.-. . -.,..., . .. . . . ;"' !S
GF RGet Field t"rnm current Record ........ . . . . .. . :"' "g
GMC Get Member Count .. . '"2C\
GCg get'7)wn er"íounf . P 22 i
GTC Get record-Type oÍ" Current of" run unit . . .. ..... :222
GThC Get record-Type of" current Member . . ... . .. . ...223
GTO Get recorcí-T,ype of current Owner .. . . . . . . ... . . . . Z24
X
OPEN OPEN data base .... . :'">5
PUTC PUT data into Current of run unit ... ...... . . ...227
PUTK! FUT data irAo current Member . . . . .-... . . . ... . .. . 22t?
T" UTO PUT data :nt:o current. Owner .... . . . . . . . . . . . .. . . 23C)
FUTR PUT data into current. Record . . . . . . . .. . ...... . . . ¿'32
RMS Remove current Member from Set .. . . . . . . . . . - . . . ..233
RSM Remove all Set k4embers . . . . . ....... . . . . . . . . . , . . . 234
SCM Set Current of run unit based on Member . . ... . ..235
seo Set Current. of run unit based on Owner . . . ... . ..236
SCR Set Current of r'jn unit based on Record . . . . . . . . 23'7
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 12
MDBS Data Management System Documentation
SFC Set Field in Current OÍ" run unit .. . . . .. . ..... ..238
SFM Set Field in current Member ... .. . . . . . .. . ... . . . . 239
SFO Set Field in cur-rent Owner .. .. ......... .... .... 241
SFR Set Field in current. Record . . . . .. ... .... .. ... -. 242
SMC Set Member based on Current oí^ run unit . . ......243
SMM Set current Member based on current Member . . . . . Z44
SMO Set current Member based on current Owner . . .... 245
SMR Set current Member based on current Record .. . . .Z4S
SOC Set Owner based on Current of run unit ....... . . 247
SOM Set current Owner based on current Member ... . . . 248
SQQ Set current Owner tmsed on current Owner ...... . 250
SOR Set current Owner based on current Record ... . . . 252
SRC Set Record based on Current of" run unit ...... . .253
SRM Set current Record based on Member . . ..... . . - . ..254
SRO Set current Record bz'sed on Owner ........... . . . 25'q
STAT return run S'TATistics. ... .. .. .. .. . .. ... ... . ... ..256
TOGGLE TOGGLE run optimization switch. . . ... . . . .... .. . ., .257
(9 COPYRIGHT 1'379, 1980, Micro Data Base Systems, Inc. 1?
MOBS Data Management System Documentation
NEW RELEASES, VERSIONS, AND A WARNING
Any programming endeavor of" the magnitude cjf' the MDBS system.s is
bound tc) continue toevolve over time. Realizing this, Micrr' Data
Base Systems vows to provide it.s users with updates to t.heir version
f" co ranomina! handling fee. Updat.es can be pr(?vided only z-f'ter the'
signed End [Jeer Agreement Form is on t'i le with MIJB3, In c.
New versions of" MDBS sort\/are wi I!beconsidt=r: :zd as sermraZe
products. However ,owners of previous versi.ons will I)? entitled to a
preferential rate str'-iU.ure (as sc.on as the signed End User A.gr"."emer,t
Form is received by MDBS, In c.).
Finally, each '33py fj f^ MOBS products isperso: nalized with the
licensee's name. There are several levels orth isj;ersonal i zat.ion,
some o rwhich involve encryption methods gum^ariteed t. cbe
combinatorally hard cc ciecyphe: '". 1vU)BS products were produced wiEh Za
sizable investment of" capital and labor to say nothi: "ig of" the year'¶: O!"
prior involvement in the data base management area. byprin3iµalt> ot"
MOBS .Accordingly, we are seriously concerr,ed about. any uríauthcrized-
copying of" our products and will take an y anc". ail:2vai!?.b|e lega!
action against i.llegal copying or distribution of' our products.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 14
MDBS Data líanagement System Documentation
I. íNTEIODUCTION
The Micro Data Base Systems (MD!3S) has components for defining data
structures and f'or the storage and retrieval of data. Add—on packages
available for N!DBS a! low the kgging oí transacticns Icu" recovery, th e
restructuring of adata base, and query handlirig. MDBS is not amere
í' iIemanagement system. Th eideas used in designing MOBS take the
CCJDASYL Data Base Task Grcmp Report {Apri l 71 )as asEart.ing point.
However" ,2'!DBG p1"cu/ ides man ymdditional da la struct.uring and data
mar)ip'Á!atioI1 f'eA: ures that are not- available in strictly CODASYL data
t.ase systems. MDBS is implemented entirely in machine language.
Fo reach appAication system alogical structure oí" the data base
must initially be defined; that. is, af"orrnal definition ismade in
which th erelationships hetu'een th edata e1er,ients is presented.
Ríitial!y auser may list the various data items (field names) that
'ñ 'i lIbe involved in aparticular apptication. The process c>f" def"ining
alogical data structure consists of" grouping data items into record
types (or,in conventional data Kjrocessing terminology, into logical
files) and indicating appropriate relationships between record types.
These Te|ationship3 are only conceptual and do not imply any physical
storage allocation. Nowhere ir. t:he use of' the data managernerít. system
does auser refer to an actual data storage location, but rather, he
refers toth econceptual structure as initially defined. Th is
defining orthe.data structure is done via the DDL (Data ljef"init ior':
Language) and µr'ocessed by the program narííed MDBS. DDL.
e: COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 15
MDBS Data Management System Documentation
Alter the structure has been defined the application programs t·: iIl,
of' course, need to access dM:a from or place new data luto the ("íat.7.
base. An application program cÍOé3 not, however ,r" u3 zí (or" "ii!" it-a :' t. hC'
desired data directly f" rom (orto)t'n edat 3bas e.l?1ste¿"('j. it".
requests the data management routines (MOW. D!d3) top¿!rforY. t.h e
necessary operations. This requires the writer o!" the applicatio»
programs to know only the conceptual structure of" the data base; the"
OMS isresponsible f^ ormaintaining th eph.ysi cal structür'e. Th e
requests to the DMZ are made via subroutine c¿: . l l swh ich ma ke u;" ¿-i
collection o!7 commands cc'mpz"isir.g t.h eDML Pata M3r: iµu!at.iori
Language) .
The basic MDB3 package consists of" MDBG.DDL and ?.¢!3!32 .CJMC .Ther· e
ar" e other", very useUi! ,add—ons to M!JB3- C'ccasior;a!ly, it. tiay become
necessary to alter the logical struc-t'-ire OÍ ari existing dzz t. abas e,
The MDBS.DRE system is designeá U) permit chemges to bE: made tcj 3i.ata
base structure without the need Cc) dump an d i'e-]c¿íci zh eda t3base .
Another add—on is !V1DBS. RTL which logs al! transactions made cr. j, ci-atní
base since the last data base backuµ. In the event of asyster,: crash
(e.g. , power loss) thedata base car. be restored autotüat-ica! iy by
invoking arecovery utility. Athird add-on is MDBS.QRS whích accepts
English—like, rlonprocedur(3 Iqueries an dproduccs desired r"eµort.s.
This cuts programming effort substantial ly. Fu l idetai Is about dt-he3e
?
add-ons may be found in the MDBS.DRS. MDBS.RTL, and MIJBZ.QRG User s
Manuals.
E) COPYRIGHT 1979, 19F3Q, MicrQ Data Base Systems, Inc. !C:
MDBS Data Managemen'c System Documentation
I I .?v!D!3S .. DDL
A,Int-roduction
Ir, this section, we concF"r)trat.e or ldicro Data Ease Svs'um 's "Da i". a
%'
Description Ana .iyzer/'Editor which we cal lMDBS.DDL (for M,icro .3.ata
Base System 's 3ata Descr"ipt.ion LanÉ"uage) .
In Part Bwe list severa! features orMDBS. BOL which zr et."ien
described in more det.ai- !inlater sect: íons. Iii Sect.i.: mt": t.l?.e user"
is]nstruc-ted 3ñ h("w t-o "bring—up "MDBS .!JDL ;tb ei: ind o!'
modif"icaticn" Jhat can ba made to t'ais are alsa descr Jbed.
Tcdevelop adata base proper, data base management c7ríc€pcs "ire
necessary. Ii' Section I-J, we discuss such concepts and present. the
data description language (DDL) for describing adata base
structure. The user may also want to look ahead to Section iII .!J
to see how such conceK)t.s are used.
To create adata base, the user must first describe the structure
Qr the data using the data description !anE"uage (as discussed i r,
Section IJ ) and then pnysical ly initial ize the data base with the
proper tables. This is a) ]. óone by the DDL ana],yzer,/eaitor which
is discussed in Section E. The anal yzer/editcr permití: t-ne in?ut ,
editing and z-tza!ysis of" adata description.
©COPYRIGHT '1979, 1980, iQicro Data Base Systems, Tríe .i":'
,;
MOBS Data Management System Documentation
B.Features
MDEIS.DDL allows the user to describe adata bas estructure an c!
initialize adata ba se.Adata base structure is dcfined using
the data description language (DDL) .Suc h adescription is
entered into the computer (either inlower or upper" case) via the
Text Entry/Command mode of MDBS.DDL. This mode supports:
1. Text entry
2-Listing
3. Deleting
4. Saving
5.Ret.r"ieving
6.Renumbering
as well as providing formats and other text entry aids.
Once entered, the t.ext can be edited using th eline editor or
MDBS .DDL. Finally, th eDDL analyzer processes ada ta bas e
description and, if no errors are detected, initializes adata
base. If" asyntactical orlogical error i" detected, an error
message is displayed and the user can quickly correct the problem
using the text entry or edit features.
MDBS supports the fol lowing features for data base design work:
i.Variable and Í"ixed length records.
2. Character, integer, floating point (real), logical,
internal decimal, externa! decimal ,an dbinary
record fields (data items).
©COPYRIGHT 1979, 1980, Micro Data Base Systems, tnc .18
i4}L);2S Data i\áanagerne.nt System 'Doeumentat ion
.-2 ,{jr-"--tc_íme, cm e—to—many ,many_:ío—one ,and many_to—
':'!2¿Fny s:€:t- types.
ESc :'Led ,'- IFO .FIFO ,next,prior. and immaterial s e t:
-:jrderZn,gs.
5.Automatic or manual record insertion into sets.
t": .Read and write access protection via passwords at
"·77
z-he item, recora aria set levels oeorganizat-ion.
mORecord t.yp es may own other occurrences o'? the same
'"'ecord- type (i.e.,recursive set".) .
e e T
8.M""'ny reccmd t: ypes can Dart1cipat.e ín aan í'éñ set.
g,Fu- ;lnetwork data structures.
These i'eatu.res are discussed in Section !1.
Adata base can be physical ly spread over anumber of" drives '" 8
maximum) an dthe drives can be floppy (mini—or ful!— sized) or
hard disks.
The data base is organized using apaging system. Asingle drive
can logically contain 3191 pages an dapage islogiealiy
restricted to, at most, 65536 bytes. Thus large data bases can be
supported {subject to opermting system constraints on the size of'
afi le).
Gnc: eadata- tú'íse descr i.pZion has been entered an dadata bas e
initialized, tFi euser ear, ezzsi 'l, y access the data base through a
host lar)guz: gc (¿;uch as BASIC) us i-rig MDBS. DMS. In Section I I Iwe
take up the discussion of" í\'!DF3: ;. DMS.
©CCTYRIGPÁ 1"'7.9, 1980, Micro Data Base Systems, Ir.c. 19
MOBS Data Management System Documentation
C. Getting Started with MDBS.DDL
1. initial Loading and Test Run
The details specific to your system for making an initial t.est of
the MDBS.DDL package are outlined in the MDBS system specific manual
which is supplied when 'Iou purchase the system. !2rief"\y. you will
execute program DDL (see the manual MDBS system specific manual f"'or
its f"ul!y qualifi-ed name) which will display:
MDBS.DDL VER X.X
(C) COPYRIGHT 1979, 1980, \'Jicro Data Base Systems, Incorporated
Reg #XXXXX
Your name and
address
At this point you can read asample data base deseriptiorj stored
in file INVNTRY (again see the system specific manual for the fully
qualified name). The procedure is shown below (underlined text is
generated by the MDBS.DDL system):
1This example was used by M. Gagíe, G. Koehíer, and A.B. Whi"nston in
their article "Data—Bame Systems And Micro—Computers: An Overview",
published in BYTE magazine.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. ZO
MDBS Data Management System Documentation
R"Read aFi le" command
FILENA}j'"i computer prompt
INVNTRY fully qualified f"ile
name for INVNTRY
To list this sample description type "L". To actually initialize a
smal ldata basc· with this description type DDL. This will result in
the prompt:
DATA-BASE FILENAME?
to which you should respond with afully qualified file name which
exists on th efirst drive of your system (use atemporary file for
this purpome). The data description will then be displayed (without
line numbers) and adata base initialized.
The complete sequence looks like
DZ)L "Enter DDL Analyzer" command
DATA-BASF FILENAME? computer prompt
name fully qualified f'ile rame
(DDL out,gut) computer generated output
DDL PROCESSING CCJMPLETED
I r you have not had. aeuecessf"ul run ,re—read this sgctic-F) and the
system specif'ic manual and try again. Iry ou still have n o :uc k,
please cal }Micro Data Rase Systems, In c.Í"or help.
©COFWRIGHT 1979, 1980, Micro Data Base Systems, Inc. 21
MDBS Data Management System Documentation
2. Relocating MW3S.DDL
Under some opera-ting systems, it may be desiraiAe to locate
MDBS.DDL at aposition other than that supplied by Micro !J)aÜ Ease
Systems. For thi.s purpose, we have provided arelocatable f"o""rr. oí' the
—
data description analyzer and arelocator so that. an executable form
of the analyzer can be ORGed to any place in memory. Please refer to
the system specific manual for further information.
©COPYRIGHT 1979, 1930, Micro Data Base Systems, Inc. 22
MDBS Data Managem'"nt System Documentation
3. Important Addresses: Personalizing and Patching MDBS.DDL
MDBS.DDL consists of aprogram region and work area region. These
are contiguous ancí the work area immediately follows the program area.
The size of the 'm:mk area can be increased or decreased through a
patch to the sys em.
There are several addresses that the user should be aware or in
MDBS.DDL. The user may alter these as shown in the system specific
manual. Abrief description of" each item follows.
(a) Initial Entr;,' Point
Upon entry at this point, all program variables and regions are
either physically or logically re—initialized. Registers are not
saved but the entering stack is preserved.
H: jI/O Entry Points
Dif"f"erent operating systems handle input and output to terminals,
printers and disks in avariety of ways. To keep this manual
free of system specií"ics the I/O inf"ormation relevant for your
sYstem is published in the system specific manual. Patches to
non—standard. I/O routines should be made in accordance with the
instruction"i of the system specific manual.
.. (C) Echo Toggle (Default 00 hex)
This byte is: checked to see if" the user wants to have MDBS.DDL
echo input to the output device. It the byte value is zer~í,
echoing will take place- If it is the value one, no echoing will
be performed..
GCOPYRIGHT 1979, 1980, Mie: -o Data Base Systems, Inc. s>m
w»m.·
MDBS Data Management System Documentation
(d) Last Word of Memory (Def"ault OBFFF hex)
Th eaddress stored here gives the last aval lable word cjf memory
that the MDBS.DDL program may use. Note that MDBS. ijDL uses al!
-V,
memory starting f' rom its load address up to t.he value in this
field. Needless to say, the user" should make sure that lhe !ast--
word of memory is physical ly beyond the end of the program.
(e) Screen Control Byte (Default OB hex)
This byte should have one of" the following values:
Screen Width Byte Value
less than or equal to 64 1 1 (OB hex)
characters
greater than or equal tCj 80 15 (OF hex)
characters
64 to 80 characters per greatest irzteger less
line (ca:lit N) than cu" equal t- o:
N/5 -1
(t) Re-entry Point
Ifth euser wishes tore—enter MDBS.DDL. whi le ;:'resen"ving al ].
program varimbles and regions, then he must issue ajump to th j. s
address.
In the next. section we discuss the data descript.ion language. Th e
data description langut-tge and í"eatures oradata bas edesign ar e
illustrated with examples.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 24
MDBS Data Management System Documentation
D.DDL (Data Definition Language)
1.Introduction 3ñcÍ Definitions
The DDL isused toformally describe aconceptual (or logical)
structure of adata base. These descriptions are interms otdata
iterns ,record types, and sets.
ADATA-ITEM is the smallest unit of named data. An ITEM—OCCURRENCE
is arepresentation of avalue OÍ" adata--item. (Eg .AGE i3adata—
item, an dan a ge or 21 might be an occurrence of" AGE) A"repeating
,.- . I
item" acts as ao?\é?—dimensional array whose maximum rep! i-cation factor
must bespecii"i -i; a"depending on" item may optionally be specified
.~~N%~~~Nu -'f ·.' . · ae ·· '-u we
which indicates the current. "len&th" .,.QjL==La_rray. "
A RECORD—TYPE is anamed collection of" zero, on e,ormore data—
items. A RECORD-OCCURRENCE is asampling of values of" the data-items
\
def"ined to be contained by the record—type. There may be an :":rbitrary
number of occurrences in the data base OÍ" each record—type sp'ecified.
No two record—types may have the same name. The data—item names mus t
beunique only within the record-type. (The same data—item name may
be used in more tlían one record type. )The order, type ,an dsize of"
theitems within arecord type are defined in the record description.
Consider the f"ol lowing example ot arecord description:
RECORD EMPLOYEE
ITEM NUMBER INT 8
ITEM 7AME CHAR 20
ITEM !/1AGE REAL 8
ITEM "i'AX REAL 8
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 25
MDBS Data Management System Documentation
The above example defines arecord—type EMPLOYEE containing rour
data-items: NUMBER (employee number) ,NAME, WAGE (wages) and TAX
(taxes withheld). The "types "orth edata—items 3reinteger, ""Y
character, rea l,and rea!, respectively, and NAME is specified to be a
maximum óf7 20 characters in ler.gth. An occurrence of this record—type
might be (1520 ,ABSMITH, 7520 .20 ,158. 42) .There would be an
occurrence tor each employee in the company.
"Record—type" isused indef"ining astructure ,an d"record-
occurrence" isused to reler to the actual data values. Agroup of"
data values may make up arecord occurrence, and they are sUmed using
th ename of the record—type and the names of the data—iten'.u. If the
names of al lernployees are desired (using the definition az" inth e
above example) ,the application program would request of" th·:±DMS a! !--
occurrences of t-he record—type EMPLOYEE and [oreach on eitwould
request the occurrence (the value) of" the data-item NAF-IE.
ASET is a named relationship between record—types. One or more
record—types are dec lared as the "owners" and one or more record—types
ar edeclared a s th e"members" of the set.. Any record—type may be
declared as the owner record—type of one or more sets; liktt'".'ise ror
member record—types. Aset occurrence may have an arbiti"ary r,umber of
occurrences of each of the record—types. The "set order" (the logical
order of the memEer record occurrences) must be declared.
Th eset is t.r'" basic struct.ural unit of" tlú" data base. I t" is used
todefine th erelationship between different. recorA—2:.y;:'es. In
particular, the set links ezch owner record occurrence to it-3 related
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 2é
MDBS Data Management System Documentation
member record occurrences. This is best explained through examples.
2.DDL Example
Asimple but c"ommon business problem is the need to maintain lists
of" people or orgcmizations sorted in diíferent orders. Consider th e
case oí' acompany which maintains lists of" customers sort: od by name,
address, and zi-p code. The !4DB2 s,y3tern handles this problem using the
dat.a structure of' 7i gure II.D. 1. The actual options avaiÁuble f'or the
data definition " '"' edetai led inth eremaining portions orthi s
section. Note t"mt only one record type (CUSTOMER) has been defined,
while three sets Oames, NUMBERS and ZIP) are shown. The record type
SYSTEM, used as owner in these sets, is aspecial recorc'. predM"ined by
KÍDBS.DDL which permits access to data in the data base. There is only
on e instance of" t.he SYSTEM record—type in the data base and there is
no data associate.-i with t.h isrecord—type. Th eSYSTEM record is
discussed later in this section.
The CUSTOMER recc)[""d type contains al!the data re!aLing to a
customer. Data—item NUMBER contains the customer number" ,item NAME
tb ecustomer name ,etc.A l Iof" the data—items store g}]aracter data,
as indicated by the CHAR specification. Th eitern size foilows the
word CHAR.
Th eus eOT '¶: '2ree sets is the key to maintaining the customer file
in three differe orders. Th eMDBS. DMS system wi Ilautomatically
insert arecord i nthe proper" location in each of these three sets
when the record is created. Note that this i salogical construct
on ly—-- arecord is only physical ly present in one place. By use of"
eCOPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 27
MDBS Data Management SysA: em Documentation
approprÑate DML conmands, agiven record can be accessed eU"ícíent.iy,
or,t: yus e o rother DML commands, asorted list. oí' '"'ecords can be
accessed. Examples of such programs are ii iustrated in Section III.D.
A I ithree sets inFigure II.D. 1are SORTED. The "sort. key" is
stated for each set (NAME for set NAMES ,et c.)an dist!i efield-
defined f" ortheset to be sorted upon. Each customer recc.rd occurs
only once in the data base, yet three logical set orders exist..
There are six allowable set orders. Besides SORTED ,t'aere ar e
also: FIFO —re\.ord occurrences are added to the end oí" thc. set. such
tmt each new rec- :,rd occurrence beccnnes logically the ]as tmember of'
t:heset; LIFO —record occurrences are added to the f'ront c¿" the set
such t.hat each new record oc.: nírrence becomes logically "L 'je first
member of" the set; NEXT —a rú=w record occurrence is ioi;ically placed
in the set after the "current" member record oí the set ("current" is
defined i nth eDML discussion) ;PRIOR —a new record occurrence is
logically placed in the set beíore the "current." Inem: ,'jer record of' th e
set; an dIMMAT —the user does not care about the set" orúr. Note
that the IMMAT set ordering al lows the MDBS sy'U.em to !^ea 1i-ze certain
ef"ficieneies and shouk2 be used if possible.
In th e s e tdescription of Figure II.D.1 the specification "AUTO"
appears. This indicates that. as occurrences of" record tyoe CU3TOI','!EF
are created, the records will automatical ly be inserted in set ONORDER
by the MDBS system. The word "MAN" (for manual) could also ;'"ñiíve been
specified. These options ar ediscussed fur-b-her in 3+ctio iI!.IJ.5.
Also, the specification "1: N" states that the relationship between the
©COPYRIGHT 1979, 1980, Micro 'Jata Base Systems, Inc. 28
MDBS Data Management System Documentation
owner of the seb and its members is aone—to—many relationship. For
each owner occurrence there may be many member" occurrences, but not
vise versa. Most data base systems support only this type of
relationship —— amany—to—many (N:M) relationship supported by the
MDBS system is described in the next section.
0
Developing the DDL for adata base to be used in the MOBS system
does not require any knowledge of t-he DML (Data Management Language).
The user needs only to define the data base structure; the system will
take care of data storage and retrieval for application programs.
However, much insight will be gained ir the sect.ion describing the IJML
is read (Section III.D). By seeing what commands are available, it
will be easier to understand how to design the data base and establish
set relationships. Also, the additional examples will be extremely
helpful.
Our example of7 Figure II.D.1 can be extended to include more
inf"ormation. Suppose that we wish to keep arecord of orders that a
customer has placed. Conceptually, each customer may have several (or
one or even zero) orders that have been placed. Each order though is
associated with just one customer. Thus we have what is called a
"one—to—many" structure (one customer to many orders), which is a
natural structure for adata base set relationship. In order to
extend the example of Figure II.D.1, we derine asecond record type
which represents acustomer order (see Figure II.D.2). or course, to
actually define the complete DDL for this example, we would add the
new record descri.ption after the description tor the CUSTOMER record.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 29
MOBS Data Management System Documentation
Note that in record type ORDER we have def"ined five da t-. aitems:
NUMBER (for order numb'zms) ,DATE (order date) ,PART (the stock rüsmber
of the part ordered) ,QUANTITY (the quantity ordered) anti I"R'CE (t.h e
invoice price). Three ofthedata items hold chareíetar é-iata, but.
QUANTITY and PRICE have data t','pes BIN (Binary) and REAL respectively.
QUANTITY isstored as abinary data itern t. c) r?duc-í- storage
requirement.s. This is reasonab!e since QUANTI TY will n e v erexceed
É35535 inthis application. Th ebinary dat-a type is usec2 to stcr·m
integral values in binary format. instead of" the packed decimal format.
common tomari y BASICs. The digit. "2" aí't.er" BIP' indicate -that two
bytes should be a! located t: ostore thebinary va il) e.Th eREAL
specification for PRICE is areal number whose data ler,gt-.h i' 8bytes.
LOG (Logical) and INT (Integer) data types are also supported.
The set ONORDER links eac hcustomer tohisorders. Th e s et.
ordering isFIFO ,sotha, t,[or" each customer, the orders will be
maintained in afirst—in, first—out basis, which will normally be th e
sequence inwhi.": h the orders were received. The new set- dE'3cription
would be added to the DDL after all the record descripti ")ñ3 72Lre gi'ieri.
?CO?YRIGHT 1973, 1920, ;.q'cr-c 7g"r Bqlgc? Systexs, Idc.?Q
MDBS Data Management System Documentation
RECORD CUSTOMER Customer record
ITEM NUMBER CHAR 8 Customer number
ITEM NAME CHAR 20 Customer name
ITEM ADORERS CHAR 20 Street address
ITEM CITY CHAR ZD City
ITEM ZIP-CVJE CHAR 5 Zip code
SET NAMES AUTO Í:NSorted by Name
SORTED NAME
OWNER SYSTEI'4
MEMBER CUSTC'"."ER
SET NUMBERS AUTO 1:N Sortcu"! by Number
SORTED NUMBER
OWNER SYSTEid
MEMBER CUSTQÉIER
SET ZIP AUTO 1:N Sorted by Zip code
SGRTED ZIP-CODE
OWNER SYSTEM
MEMBER CUSTCMER
END
FIGURE II.D.1
DDL Declarations for Multiply Sorted Records
9COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 31
MDBS Data Management System Documentation
RECORD ORDER Custemer orders
ITEM NUMBER CHAR 6Order number
ITEM DATE CHAR 8Date received
ITEM PART CHAR 6Part number-
ITEM QUANT'TY BIN 2Quantity ordered
ITEM PRICE REAL 8 Unit cost
SET ONORDER MAN I:NLink customers
FIFO to orderc
OWNER CUSTOIW"R
K!ENB"R ORDER
END
FIGURE II.D.2
DDL Declarations for Cu3toIner Orders
?COPYRIGHT 1979, t980, Micro Data. Base Systems, Inc. 32
MOBS Data Management System Documentation
3.Many—to—Many Examp) e
.t? t?
Standard (COñÁSYL) data base systems require aone—to—many
relatiQric.hip between th eowner' and the members of aset üccurrence.
Thi" restricticn may fújrce the use of" unnatural data structures .wh ic::"\
complicates DIVÍL programs unnecessari ly, making the program harder to
conceptualize anf7 to maintain. These unnatural structures re a Iso
quite ineff"icien"'" interms orboth storage and processing. As an
example, imagine .. computerized bibliography system in which we have
book titles that may be classified by anumber oí" l'.ey\t.".jrds. We wish
to be able to obtain: I) Asorted list of" books corresponding t. oa
given keyword, a: "id ,2)Asorted list of keywords corr"c: ¿sponding t.o a
given book. Sinc"" each keyword describes many books, an dsince on e
boo kcan have severa' Ikeywords, amany—to—many relat.ion: íhip exists
between keywords nnd books.
If we are restricted to standard "one—to—many" sets, wewoul dbe
forced tointrod'iíce artificial "link records" wh ieh are used f.o
simulate many—to—many sets in conventional database systemm These
link records force us to adopt ahighly unnatural ,rest.ric'ted dateg
structure which, Nríce the link records contain no data ,has little
conceptual va !ue .ADDL (Data Description Language) descriptiori of'
such astructure is shown in Figure II.D.3.
The set relations involved are alione—to—many relationships
however, we mus tcreate an occurrence of" reccu"d type LINK for each
book—keyword pair' in our database. In amore complex example (such as
when authors a:"·--' introduced), the actual data relati'.mships present.
CCOPYRIGHT 197IL 1980, Micro Data Base Systems, Inc. 33
MOBS Data Management System Documentation
quicjcly become unclear. An additional problem with this structure is
that itisquite dif1"icult to maintain asorted order between the
books and keywords. Also, the u s e orlink records results i n a
wastage of data base storage space.
.
Th eMOBS Data Management System permits explicit use of many-·to—
many sets. Aspecial internal structure is used which a!lowí: the li'!I)BS
f
system toautomc'tically maintain the data base pointers necessary to
represent such sets. Th ismeans that situations such asth e
bibliography exai'üp} ecan beconveniently handled byth ·2 schema
declaration of Figure II.D.4.
In the declaration for set. S3, the specification of asecond s e t
ordering indicatc-s that theset is amany—to--many set anc" that the
owner records are to be maintained in sorted order. The f'irst set
ordering speeif"ication indicates that the members of" the set are also
to be maintained in asorted order. Note that this feature al lows one
to either rim all keywords for agiven book or t.o list- all books for
agiven keyword.
Use of" many—to—many sets blurs the distinction between theowners
an cl members ofa s et,since the rigid one—to--many ordering is no
longer required. The terms "owner" and "member" are thus arbitrarily
assigned and are used for notational convenience only.
Many—to—many sets areprocessed like conventional (one—to—many)
sets —i.e. ,DML commands such as Find Next Member '¿ FbIIvI ') -m dFind
Member based on Sort Key (FMSK) are used. Additional DML commands
have been defined to process the OWner"y OÍ7 aset: Find Next Owner
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 34
MDBS Data Management System Documentation
(FNO) and Find Owner based on Sort Key (FOSK). These are fully
described in section III.
.
©COPYRIGHT 1979, 198C, Micro Data Base Systems, Inc. 35
MD13S Data Management System Documentation
BOOK KEYWORD
LINK
I
Data Diagram for Many—to—Many Example
FIGURE II.D.3 (a)
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 36
MDBS Data Management System Documentation
RECORD BOOK Book record
ITEM TITLE CHAR 30 Book title
ITEM AUTHORS CHAR 30 Author(s'
ITEM PUBLISHR CHAR 60 Publisher
RECORD KEYWORD Keyword
ITEM KEYWO72 CHAR ío
RECORD LINK Link record
SET SI AUTO 1:N Sorted list
SORTED TITLE of" books
OWNER SYSTEU
MEMBER BOOK
SET S2 AUTO 1:N Sorted list
SORTED KEYWORD of" keywords
OWNER SYSTEM
MEI'4BER KEYWC'AJ
SET S3 MAN 1:N Linkage set
IMMAT for books
OWNER BOOK
MEMBER LINK
SET S4 MAN 1:MLinkage set
IMMAT tor J'eywcu"ds
OWNER KEYWC'?D
MEMBER LINK
END
DDL Tor Link Record Example
FIGURE II.D.3 (b)
©COPYRIGHT 197.9, 1980, Micro Data Base Systems, Inc. 37
-
MDBS Data Management System Documentation
BOOK
l
S3
KEYWORD
}
Data Diagram for Many—to-Many Example
FIGURE II.D.4 (a)
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 38
y
MDBS Data Management System Documentation
RECORD BOOK Book record
ITEM TITLE CHAR 30 Book title
ITEM AUTHORS CHAR 30 Author(s)
ITEM PUBLISHR CHAR 6C) Publisher
RECORD KEYWORD Keyword
ITEM KEYWORD CHAR 10
SET SI AUTO 1:N Sorted list
SORTED TITLE of" books
OWNER SYSTEM
MEMBER BOOK
SET S2 AUTO 1:N Sorted list
SORTED KEYWORD of" keywords
OWNER SYSTEM
MEMBER KEYWORD
SET S3 MAN N: M Book/keyword
SORTE3 TITLE SORTED KEYWORD relationship
OWNER BOOK
MEMBER KEYWORD
END
DDL for Many-to-Many example
FIGURE II.D.4 (b)
i9 COPYRIGHT 1979, !980, Micro Data Base Systems, Inc. 39
MDBS Data Management System Documentation
—.
4.Multiple Owner/Mernber Example
Mo"t set relationships have one record type defined as tht: owner of"
th e s ettype tu" danother defined as the member record type. An
example of" this would be aset (SET1) with owner reco"""d " ype DEPT
t
(Department) an d member EMPLOYEE ,corresporAing to a grouping of""
emp! oyees within depart.ment.s. Suppose record type EMF'L'-'YEE contains
payrol linformation such ashourly wage ,un ion membership, and.
seniority. Ir we wish to define arecord type SALARIED cc)rr"3!sponding
tosalaried employees (which presu!nab] ywould require different.
payrol Iinformation than tújurj yemployees") ,it might 'be des i."ab l etc)
allow both record. types EMPLOYEE and SALARIED to be possitle members
OÍ" SET1. This is permitted in MDBS; in Úact, as many re'·": clrd types as
needed ma y be delined as member") (or owr.ers) of" aset type. Special
MDBS routines are aval lable to determine the actua ]. record type of the
active member '(or owner) of' aset.
Th isconcept is f1irther extended in MDBS by allowing a sc.c to have
mmp
the same record type as both its owner record type an d. it. '3 member
record type. Imagine aset SUF'ERVIS wh ich indicates tne hourly
-.··F'.~mKq~~
employees (EMPLOYEE )wh osupervise other hourly eínploy.'es. A
~Me
.. .. ....,. ... ...
¶KS~bK
..>..a
hierarchy ofsupervision c an be conveniently repres=nted by such a~
~w"~ , , ..,.
data structure (Fi gure II.D.5).
· .·.""m'*
~\.
©COPYRIGHT 1979, 1980, Micro Bata Base Systems, Inc. 4C\
MDBS Data Management System Documentation
RECORD E!.4PLOYEE Employee record
ITEM NU7.¢BER CHAR 6Empíoy'ze number
ITEM STATUS CHAR 6F.KlK)!oyec"· status
ITEM bIA!'7E CHAF' 2C) Emr)ioy+Q name
ITEM WAGEEATE REAL. 8Hourly i",at-.e
ITEM ADIJ QEÍ3S CHAR 20 3t.r·eet :
-.ddi-ess
!T"M CITY Ci-íAE 23 City ar\.-' state
RECORD ZALARIEJJ 7aj¿Ári'-" c', empl oyee
ITEi'.4 i'ñjÉ.'i7ER CHAE (3 Em;: 'i0.)/"-± number
ITEM ST,'", TfjF CHilE Cl E:í!j)íoVt£·z· stat.u: í.
ITEM HAFE CH/',F: 20 2mp!o;""c narn·: -
ITEM WACTRATE REAL 8Hourly rate
ITEM ADL'REGG CHAR '20 Gtírz·Qt 3cÍcÍress
ITEN CJTY CHAR 25 City í""aí·: !state
SET SI AUTO 1:6! Em!7!c'yee )ist
SORTED NUMBER by employee number"
C)\'/NEE SYÁTE!.7
MENBER EMF'LC)YEE
SET S2 AUTCJ '! :H7 Salaried employees: .
SORTED NUMBER by erítpioyee number'
9\",'NER SYCTEM
21Eb1E?ER SALARIED
.P SET SUF'EF: VIS MAN 1:?'1 Supervisory
FORTED NUbqBK: Rre}atj.LDp-3hiDc.
O': /FIER EMPLOYEE
O'i/b'ER SAL,'4RIED
tb.iEMBER E!4FLOYEE
-1'·, K4E\1BER SALARIED
'4
Pb, '¶
DLI!-. for Employee Gu.pervision Exmnple
""IGURE II .D.5
T) COPYRIGHT í979, 19?C, ?4 LCro Data Base Systems, tnc .41
MOBS Data Management System Documentation
Fina! ly, consider adata base used tocross—refc,u'ence. computer
subroutines. Itis desirable to be MAe to obtain sor': -?d lists of" all
subroutines which cal IaÉ>jerj routine and. of" ¿"í.}j szíbrouf.ines ca3Ñ led.
by agíven routi: je. Consider rec-: n"d type GUBR in Fj.,c:'..1.re Ií.!j.G.
Record type S'UBR stores the name of" each subroutine in the system
Set SI al lows any subroutine ñ?ñie to be accesseci easi ly- :i:u. CALL i- s
amany—to—many s e ttyp ewi th record type £U3?2 as bM--h owner and
r'
P
member .' To obtain asorted. list of" a1 I subrcmt 17?2£ that cal !a
specified routine, a!lthat i snecessary iv to make the specií"icid
routine tk.e currer)t. member of set t-'me CALL arid then 'acces -; the ;"..'n er
records in sequence. Gimiíarív, aso=c: ifled routi/","-' c...ulc! ',:)e rn.ízde tI") e
?'
current owner of' set type CALL and the members of t": '? s±' t7CCÑJÑ"ü-c-!ñCt"
accessed in turn t-o produce- aí:ort.ed list of" sL'.l'·r'{.-)\.íC': .:"-,. z:. c::",l1ed.
Muc hmore powerful elata structures than thos.± pos£-i: 3j") 'si'th other
data base systems c.7-ñ te conveniently used ck-z etCl 3!L?BS 'i3 e: At.rem(=
flexibility. The basic tools 3í^e prement in !"TlBS 'I.c! :"r'3'2'!7s c-"j2ñ tine
most complex data structures ir'. aclear, intuit: ive way.
©COPYRIGHT 1979, 1980, Micro Zkzta Base Systerrm, Inc: .42
MDBS Data É'!ana3em(3r.t System Documentation
RECORD SUB??. Subroutine name
ÍTEM NA?.4F CHAR 8
SET SI AUTO 1 :NSorted list ooí"
SORTED NAME names
2í','lUR SYSJTÉM
M7\iBER SUER
SET CALL MAN 1:II! Subroutine cal ling
SORTED NAME SORTED NAME relat.io: -íship
,(°'"""' '7"
?,, ltiEMBER SU 'R
END
DDL for Subroutine Cross—reference Example
FIGL'RE II.D.6
gCOPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 43
MDBS Data Management System Documentation
5.DDL Specification
Inthe following lists asummary of" the paramepers f'or eac-h of the
DDL specifications is presented. This cectior. details eac hoi' the""'"
parameters indet.ai l.Th e o rd. '-' rinwhi ck tlm: ±sections must be
presented to the DDL analyzer is:
FILES (optional)
DRIVE
PASSWORDS ""
RECORD
ITEM (optional)
SET
C':,'NER
MEMBER
END
Each line of text rnust be preceded by a4digit line nv.raber an da
blank space s o that column 1would refer to the si: &'z character
entered (See the Pcommand of7 Section I I .E).F i gm-e lI.D.7
ii lustrates atypical DDL stream. Th isgi.gur'= ap,?ears Í"gj lo':ing
descriptions of" the various kind-s of lines that. can appear inaDDL —--
specification stream.
Before presenting th eIayouts ,the following summary is gi·ven on
the various relationships between access levels: one m'.-'st- ac7-,ar to: ----
©COPYRIGHT 1979, 1980, Micro Data Base Systems, inc .l|l1
m.
.
MDBS Data Management System Documentation
For any data item type, record type or set
its write access leve! I: its read access level
For any data item type
i t sread aecems level " the read access level of" itsrecord.
type
itswrite access levezl "the write access level oí" its record
typ e
For any variable length item type
its read access level =the read access level of' its depending
on it:. er.í
itswr líe access level =th ewrite access level of its
deper.din,q c·n item
Fcm any record type
its read acc'ess level s, the read access level oran y s e tin
which it 'oart.icipates
+
itswr i te access level ES the write access level of any set in
which it participates
DDL errors will result if' these conventions are not observed.
It is recommended (but not mandatory) that the data bas edesigner
observe the fol lowing convention:
For any sort key
itsreñí access 1evel s the read access level for the set(s)
which it is asort key
SCOPYRIG}iT 1979, 198Ci. Micro Data Base Systems, Inc. 45
MDBS Dnta Management System Documentation
its write access level mthe write access level for the set(s)
which it is asort key
NoDDL errors wi }lresult if" adesigner decides not to f"ollow thie
convention.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 46
m~'
,
MDBS Data Management System Documentation
.--
DRIVE Line
The DRIVE iine specifies. the number of data base pages that reside
on aparticular drive. Th euser"s f"irst physical drive is called
drive 1. The second drive 2, et. c.The DRIVE !inc: Kivout. '.s:
J
Columns Parameter Description
1—5 "DRIVE" —liríe type
8Drive number
12— 15 Number OÍ" pages allowed on
Notes:
1. The drive numbers must be one of 1,2,3,4,5,6,7, or 8.
"" 2.The last drive line will be used if" there ar etwo ormore
drive lines with the same drive number.
·.
3.The number of" pages must be non—zero.
4. The DRIVE lines must immediately follow aFILES card.
©) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 47
MDBS Data Management System Documentation
END Line
The END line is used tc signify the end of the data base
description to the DDL analyzer". The format is:
Columns Parameter Description
1-3 "END" -line type
-.-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 48
MD2S Data Management System Documentation
FILES Line
The FILES line and FILES section (which includes the DRIVE lines)
ar eused to define the data base name, size and location. This is an
optional section wh ieh ,if missing from adata description, i s
supplied by the system using standard defaults.
The FILES section information consists of:
1.The data base ri lename ,
2.Th emaximum number of" disk drives on which t-he data base wil }
reside (default. is I), and
3. The data base page size (def"au1t is 512).
If" the FILES section is not present, the user is prompted for aful ly
qualified filename by:
DATA-BASE FILENAME?
Th isname ,together with the standard defaults, is used in place of
the FILES section.
The FILES line format is:
Co lumns Parameter Description
1—5 "FILES" —line type
8— 1 9Data base Í"i le name. This must be fully qua1ií"ied
according toth econventions of" the operating
system.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 49
MDBS Data Management System Documentation
23 Maximum disk drive number". Calling t-h eÍ7i.rst.
drive number 1,this f"ielc' must contain the
number of" the maximal such index.
26-29 Data base page size. This must be amultiple of"
25€3 .Arecommended value is 512.
Notes:
1. When the FILES section is missing, the def"au!t.s ar€: equivalent
to:
FILES "prompt name" 1512
DRIVE 150
2. Suppose the user wanted his data base on the first and third
drive. Column 23 would contain the number" 3. There ',\'c)1-líd be n o
DRIVE line for drive 2.
3.Th efirst drive must always be used in aC'.r3¿a base'. II there
is not enough room on the first drive to hold ali of i: hetab les
need tc) gerierat.e th edata base ,art errc.r mc"ssage x:'il! be
generated.
4. The DDL analyzer expects afile on the first drive having the
name of the data base file specified in colurnr,s 8—19. II" this is
not the case, an error 13 generated.
5.For amultiple drive data base, the DDL analyzer rü±Qijires ünly
that the first drive have afile with the data basc· filename. O C
course, the MDBS.D!4S system requires that al iréi'erenced drives
©COPYRIGHT 1979, 1980, Micrú> Data Base Systems, >")c. 50
MDBS Data Management System Documentation
—-
have afile with the data base filename,
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 51
MDEIS Data Management System Documentation
ITEM Line
The ITEM line defines adata item within th:±iñQst recently defined
record—type. Parameters define the item 's t- yµ e,sizt= ,replications
and access levels.
Columns Parameter Description
1-4 "ITEM" -line type
8— i5Item name —tí"ii"j field must contain avalid name
for" the it=m .The name mug. ty! ot. star t: wi tb a
dollar sign ("j': ") or be blank.
17—20 Item t:ype. Valid item tyoes are:
INT {Integar) -- The item i:-: stored under your hoí:t
language format for integer variables.
REAL —The item is stored under your host language
Í"ormat for real variables.
BIN (Binary) —Th ei teíi i L'? aí'í integer \.':}to3e
maximum value is limited by th ei t em size
specified. Binary variables ríi: áy only be 1
or 2bytes in length.
LOG (Logical) —The item has azero/one (true,/
false) va Iuc± and 13 stor'eti in c'ríe byte i n
the dat.a base.
CHAR (Character) —The ite: ,í is ¿Ik character 3tring
an dis3 stored as afixed leiágth 3t.ring,
padded or. th eright \k/ it' hblari7s il"'
3COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 52
MOBS Data Management System Documentation
necessary.
IIJFC (Internal Decimal )—The item is stored under
your host language format. rorinternal
decimal variables, (i.e.,COBOL
COMPUTAT!ONAL-3 fields).
XDEC (External Dec imal) —The item is stored uridem
yo u.r host language format. rorexternal
clecir,ial variables, (i.e., CC'BÜL fields with
¿j S999 picture).
21—24 Item size. Th isvalue isthe number of" bytes
allocated in arecord occurrencE rortheitem .
Size ranges vary according to the item type:
INTeger an d- REAL —The number of bytes specified
should be the number oÍ" bytes used. by.your
host language tostore in'ceger and real
variables internally (see the MDBS. SYS
manu3 1).Using asize larger than this wi I!
result in wasted space i. nthedata base;
using asmaller size will result ina
standard default (see the MDBS.SYS manua l).
l9ote tPr'zt INT always wijl use the default
value.
BINary —The size may be 1byt.e c) r2bytes. A
size c) r1allows values from —127 through
127 to be stored. Asize of 2allows veCues
from -32767 through 32767 to be stored.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 53
MDBS Data Management System Documentation
LOGical -- The size may only be tbyte.
CHARacter —Th esize should L) t? equal to the
largest- ".'Crin% size tQ be ztored i nt.h is
ite m .i'·jo bytes need be a! locatc·d !"or string
headc'rs.
2@—28 (optional)ReaA access level —anurrkcr between zero and 255
ma ybespecified here to deCine the iterri"s read
access !e v ¢X·l.Aitem with aread access leve! oi"
zero riay be ac:cessed by may vali.d data ÍÚás2 user.
30—32 (optional)i'dr"i.te accé3s leve! —an\.Im}.?er between zero and 255
may be specified her'e to deí'ine the record's write
access leve!. Arecord with awrit.e acc'.±".s level
orzero iñcú.-y be created, deleted cc- altere{:.: 3.?y any
valid data base user.
"'7Á
36—43 (optional)0epending item name. ,If" the last data item of" a
record type is a repeated item (see columns 4t3—
47 ),the ncin.ber of" replications can be controlled
bythe value of" another data item in t.his record.
This other data item is called the depending (Cl r
depending—on) itern .Adepending item name can
only be sprcified for the lz,s tdata itern Cyf7 a
record t. yp e.If" n o depending item name is
specified 7ú"nc| if" the it.em is arepeated item, it
is assumed to repeat afixed number of" times.
C) COPYRIGHT 1979, 1980, Nicro Data Base Systems, Inc. 54
MDBS Data Management System Documentation ?
V
44—47 (opticnal)Replication íactor. Ifth edata it. em isa
~repeated item, the replication factor is specified
inthis field. If" the item is avariable length
item, the replication factor is the maximum number
of times t!"ie item is allowed to repeat-.
Notes:
1.If" no read access level (columns 26—28) is specified, the read
access level for the item will deíaul i: tot.h eread access
leve! of the record containing the iteñj.
2.Th eread access level for the item must not exceed the write
access level.
3.The read access level tor the item rríust begreat: er than or
equal to the read access leve! Í"or the record type containirg%
the item.
4.The write access level for the item must be greater t.P'.an or
equal to the write access level for the record typc: containing
the item.
5.Avariable length data item can only be sµecif"ied as the iact:
item in arecord type.
6.Th eread an dwrite access levels of avariable length item
type must be equal to the read and write access levels OÍ" it. s
depending—on item type.
©COPYRIGHT 1979, 1980, Micro Data Base Systerns, Inc. 55
MDBS Data Management System Doctzmentation
MEMBER Line
The MEK'1BER line is used to specif"y amember record type of" aset..
The format is:
Column Parameter Description
1-6 "MEMBER" -line type
8—15 Record type name of" apreviously defined record
type that i. stobe t.r"eat.ec! as. arn.cunber record.
type .
Notes:
1. One or more MEMBER Iines must fol low th eQ: Ñí\'ER Un=(s) ror
each set in the DDL specification.
jg COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. se
MDBS Data Eianagement System Documentation
(J7.'NER Line
Th eOWNER line is used t".: j3peciry an owner re(zorc'- type of" aset.
The format is:
Co Iumns Parameter Description
1-5 "OWÍIEE "-li"í^ietype .
8— 15 Record type name of' apreviously defined record
type (or S2t"STEM) that is to be treat.ed as an owner
record type.
Notes:
1.One or more O\'IldER lines must f"ollow each SET i ine pair in the
DDL specification.
2.SY3TEM owned sets may have only one owner.
©COPYRIGHT 1"í79, 1980, Micro Dat.a Base Systems, Inc. 57
MDBS Data hianagement System Documentat ion
PASSWORDS Line
Th ePASSWORDS line and section specifies the system's users, their
passwords and access levels. The format for the PASSWORDS line is:
Co ]. umns Parameter Description
1-.9 "F',",SSWORDS" -line type
Following this lin= are the i-jeer definitions. The formats are:
Co lumns
8—23 User identification.
t
26—28 User sread access level. Th euser can access
(look—at) an y record, itern or set having read ""
access level of" this value or lower. Th evalue
must }')e ir. the range 0—25".
30—32 User 's write access level. The usor can write
(rnodify) any item having awri te 3ccéss level of"
tP! isva Iu.e orIower. The value must be in the
range 0-255.
36—47 User's Password.
Notes :
1.Auser name need not be the actual name of an individual. For
example, the user may be called "RECEIVING CLEPK" or "SECRETARY. "
©COPYRIGHT 1979, 19!30, Micro Data Base Systems, Inc. 58
·"
MOBS Data Management System Documentation
2.The" names and passwords 3r'e st.ored in the da f.a ba 'i3 einan
encrypted form.
EJ COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 59
.~
MOBS Data Management System Documentation
·
RECORD Line
The RECORD line defines th estart orarecord description.
.~
Parameters include the record name and, optionally, read an dwrite
access levels for the record.
Co I umn Parameter Description
1-6 "RECORD" -line type
8— i5RECORD name —this field must contain avalid- name
for the record. The name must not start wi th a—
dollar sijzn (""t") or be blank.
26—28 (optional)Read access level —anumber betvjpen zero and 255
may be specif"ied here to d.eí"ine t.ke record"s read
access level. Arecord with a:mí±ad ac': es': leve!.
of" zero rm.zy be accessed by any VIl ]. idda t- a1.3zásg'
us e r.+.
30—32 (optional)Write access level —anumber between z".ero and 25E
8·
may be specirie"i here todx. rinég± the record's
write access level .Arecord with awrit-e access
level oÍ" zero may be created., de ! eted or' altered
by any va). id data base user.
Notes:
1.The read access level Í"or the record must not: E:xceed. the write "
access level.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 6C)
..
MDBS Data Management System Documentation
2. Arecord-type named "SYSTEM" is predefined by the MOBS system;
thus, no user—def'ined record can be named ".SYSTEM"
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 61
.
MDBS Data Management System Documentation ...-.
SET Line
Th eSET l ine actual ly consists of two card. Set characteristics
-\--
include the set. type, setmode, usage ractors ,access levels an d
ordering information. ~m.
Co lumns Parameter Description
m.j
1·- 3"SET" -line type
8— 15 Set. name —this field must contain avalid name
for the set. The name must rj ct start 'n i th a-'
dollar sign ("S") or be blank.
17-20 Se tmo de -Either "AUTO" or "MAN "may be
specif"ied. Aset mode of" AUTO indicates that "
whenever an occurrence of the member record type
for this set is created, t.h erecord occurrence
will beautomatically added toth es e t.if"
MANua lis specif'ied, the user must explicitly add
the record to this set.
22—24 Se t type -One of" the fol lowing set types must be
specified:
1 :N-- Each owner record occurrence may own zero,
on '? ormore member record occurrences.
Each member record may have atmost on e
owner .(Note: Th is is astandard "one—to—
many" set) .
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 62
MDBS Data Management System Documentation
N: M —Each owner rec^rd occurrence may "'wn zero,
on e o rmo remember record occurrences.
Each member record occurrence may be owned
by more than one owner'. (Note: This is a
·- "man y—to—man y"set) .
'1 :1—Each owner record occurrence can own at most
one member r'ecord occurrence. Each member
record occur"rence can be owned by no mo re
than one owner record occurrence.
N:1—Each owner record occur"renoe c a n own at most
one member record occurrence. Each member
record occurrence may be owned by one or
more owner record occurrences.
213—28 (optional )Read access level —anumber between zero and 255
may bespecified here to define the set"s read
access level .Aset with aread, access level c) I)
zero may be 'accessed by any valid data base user.
30—32 (optional)Write access level —anumber between zero and 2E5
ma ybespecified here to define the set"s write
access level. Amet with awrite access level of
zero may be modified (i. e. , records may be added
or removed) by any user.
34—36 Set usage f"actor. Th e s etusage factor is a
parameter which affects th ¿= trade off |':)¿·:.ween
processing time and disk space usage. Asmal I
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 63
MDBS Data Management System Documentati on
value (1isth eminimum value) optimizes disk
uti iization at the cost of" increased overhead for
each record insertion. Alarge value wi llresg.í t
in less overhead for record insertions, but wi)l
result i nawastage oÍ" disk "pace. Sets whi.ch ·--·
tend to have few occurrences (i.e.,Í7 ew ovriéT
record occurrences with one or more members) but
are highly dynamic in terms of" record insertions ...
an dremovals should have alarge value (such as
32) mpecified. Relatively static: sets with many
set occurrences should usp alow value (such as 1
--...
or 2) .Choosing aset usage f"aetor is arather
technical point and we recommend that: you Let it'..
..-
deMult. (The def"au1t. value is currently 8). Ir
to o large anumber is specified, adefault value
is computed giving the maximum numt'er consistent
-..G
with the data base page size.
8—13 (Line 2) Owner order —An order may be specified for the .-..-
owner records OÍ" N: Mor N:1sets. F'er"missable
set orderings are:
FIFO —When anew owner record occurrence is a.dded
..-..
to the set, it is logically placed as th e
last owner record occurrence in that set. ._
LIFO —When anew owner record occurrence is added
tothe set, it is logically placed as the
first owner" record occurrence in that set..
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. ÉÁá
~—'
MDBS Data Management System Documentation
SORTED —When anew owner :"ecord occurrence is
added to the set, it is placed in asorted
order in the set. The record occur"rence
—.
with the smallest sort key value is
logically Í"irst in the set.. Sets can be
accessed in descending order by use of" the
FLO and FPO commands.
IMMAT —The user is not concerned with the circler
of the record occurrences in the set. Use
of" the IMMATerial set order signals that
MDBS.DMS may insert records into the set
to maximize access efficiency.
17—24 (Line 2) Owner sort key -ir the owner set order is SORTED,
an item name may be specified as the sort key for
the set. This must be adata item that has been
defined in the owner record type. If this field
is blank, the f"ull record is used as asort key.
--
30-35 (Line 2) Member order -An order may be specified for the
member records of N: M or N: 1sets. Permissable
set. orderings are:
FIFO —When a new member record occurrence is
added to the set, it is logically placed
--.-
as the last member record occurrence in
that set.
LIFO —When a new member record occurrence is
added to the set, it is logically placed
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 65
·,
MDBS Data Management System Documentation ·
as the first member record occurrence in
that set.
SORTED —When a new member record occurrence is
added to the set, it is placed in asorted
order in the set, Th.? record occurrence
with the smallest sort key value is
logically first in the set. Sets can be
accessed in descending order by use of the
FLM and FPM commands.
IMMAT —The user is not concerned with the order '"_
oT the record occurrences in the ".et. Use
—--
of the IMMATerial set order signals that
MDBS.DMS may insert records into the st: t
to maximize access eÍ"tíciency.
PRIOR —When a new member record occurrence is
added to the set, it is logically placed
before the record indicated by the current
member of" the set. If" the currency
indicator for the current member of the
set—type is null, the FIFO ordering is
used.
NEXT —When anew member record occurrence is
added to the set, it is logically placed
—-.
after the record indicated by the current.
member of" the set. If the currency
indicator for" the current rrlerAb(=r oÍ' the
set—type is null, the LIFO ó'"de.ring is
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Ui,c. 66
'W
MDBS Data Management System Documentation
used.
39—46 (Line 2) Member sort key —ir the member set order 13
SORTED, an item name may be specified as the sort
key for the set. This must be adata item that
has been specified in the member record type. ir
this field is blank, the full record is used as a
sort key.
Notes:
1. If the set has amember sort key and has more than one member
record type, then the set's sort key must exist as adata item
type in each or the member record types. It must. have the
same name, type, and size in each of these record types.
2. If" the set has an owner sort key and has more than one owner
record type, then the set's sort key must exist as adata item
type in each of the owner record types. It must have the same
name, type, and size in each of these record types.
(á COPYRIGHT 1979, 1980, Micro Data Base Systems, Ine. 67
MOBS Data Management System Documentation
l
,''"' 'UP
,ii
t' Y' '
y
0010 FILES DUM 2 512
0020 DRIVE 14
0030 DRIVE 2 2
0040 PASSWORDS
0050 PAM FROGGY
0060 GARY 255 255 646-413-1322
0070 ANYONE C)04 004
0080 RECORD A 001 007
0090 ITEM Al CHAR 001 Cl02 040
0100 ITEM A2 LOG 001 007
0110 ITEM A4 BIN 002 --
0120 ITEM A5 REAL 012
0130 ITEM A6 INT 006
0140 RECORD B
0150 ITEM Bl CHAR 003 004
0160 ITEM B2 LOG 2
0170 ITEM B4 BIN 002 4
0180 ITEM B5 REAL 012 3
0190 ITEM B6 INT 007 2
Cl200 RECORD C
0210 ITEM CO INT 004 —%
0220 ITEM Cl BIN DOZ
0230 ITEM CZ CHAR 001 Cl lOó
0240 RECORD D009 012
0250 RECORD E004 1)06
0260 ITEM El CHAR CliO 012 016
Sample DDL Input
FIGURE II.D.7 (Part I)
©COPYRIGHT 1979, 1980, Micro Data Base Systems, >ic. 68
MDBS Data Management System Documentation
0270 SET SI MAN 1:N 020 030 006
0280 SORTED Al
0290 OWNER SYSTEM
0300 MEMBER A
0310 SET S2 MAN 1:N 005 Cl32
0320 SORTED Al
0330 OWNER B
0340 MEMBER A
0350 SET S3 MAN N: M 007 007
0360 IMMAT FIFO
0370 OWNER A
0380 MEMBER B
0390 SET S4 MAN N: M
0400 SORTED Cl LIFO
0410 OWNER C
0420 MEMBER C
0430 SET S5 MAN N: M 007 007
0440 NEXT PRIOR
0450 OWNER A
0460 MEMBER E
0470 SET S6 MAN 1:1007 007
0480
0490 OWNER A
0500 MEMBER B
0510 SET S7 MAN N: lOC8 008
0520 FIFO
0530 OWNER C
0540 OWNER B
0550 MEMBER B
0560 MEMBER A
0570 MEMBER E
0580 END
Sample DDL Input
FIGURE II.D.7 (Part 2)
©COPYRIGHT 1979, 1980, Micro Data Base Systems, inc. 59
MDBS Data Management System Documentation
6. Notes on Data Base Files
.-
An MDBS data base is organized by aµaging system and can be
—r-
physically spread over up to 8disk drives (fúoppy or hard disks may
be used). The first drive of" the user's system must have adata base
file. The u".er can select other drives to participate in the data
base. ^-
During Data Def"inition analysis, adata base is initialized, and
the first disk drive needs to be "on—line." However, whenever the
data base is accessed by the Data Management System, all drives need _
to contain the appropriate disks.
'
Once the data base has placed irdormation on a disk loaded on a
particular drive, the disk must always be placed on that drive.
The maximum number of pages per drive is 8,191 and each page is
logically restricted to 65,535 bytes. However. a !-'age rau3t also be
able to fit in memory so apractical page size limit is probably under
4096 bytes.
.
In deciding on a page size, auser should take into account the
trade—ofT between the number of" pages that can be memory resident at ""
one time and the number of' times new pages will have to be read into -
memory. No simple rules can be given. However, the following ad hoc
settings have been reliable in anumber OÍ" app!ieat-ic.ns: '
1. Choose apage size so that at least 3µage3 can be memory ~··
resident (see Section III.C.2).
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 70
MDBS Data Management System Documentation
2. Apage siz(" allowing 8pages in memory usually is quite
ef"f"icient.
3. In the absence of the above rules, choose apage size of 5í2
bytes.
In the appendix we present the results of an experiment which
relates processing time to the number of" memory resident pages. Since
the number of" memory resident pages is af"unct-ion of" both the page
size and the amount of memory available to the DMS, the page size can
play an important role in the execution efficiency of the data base
system.
We conclude this section with awarning to BACK UP YOUR DATA BASE
af"ter any accesm that physically alters the data base.
.
-..
.-.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 71
MDBS Data Management System Documentat ion
E. Modes OÍ" Operation
1.Introduction
Th epurpose of" MDBS.DDL is to describe adata base s"ruct.ure and,
once the description has been completed, to initialize adata bas e.,+.
To accomplish this task NDBS.DDL provides f'eatures which allow the
user to enter, alter and analyze his data base description. Th edata ""
description analyzer attempts to initialize adata base using the data
'
base description inputted by the user. This analysis i3intEr]'"upt.ed
when asyntax or logical error is detected by the anal. yzer. At. t.h is
point the user can quickly alter his description an da ga- intryto
initialize th edata base. This feature allows the user considerable ""
flexibility and provides immediate feedback ir, huí lding ada-ta base
.-,..
description.
MDBS.DDL has three integrated modes of" operation. They are:
1.Text Entry/Command Mode —where data deseriptioná are entered. -
2.Line Editing Mode —where text lines are altered.
3.DDL Analyzer Mode —where adata base description i sanalyzed
and adata base initialized.
In the next three sections each of" these areas will be discuSsed in
detai l.
The normal procedure f"or using the MDBS.DDL pac'kagú istofirst
enter adescription orth edata base usi.rig text. entry and command
features such as listing, deleting and saving; second, toedit. 'ch e
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 72
MDBS Data Management System Documentation
--.
text to correct errors; and third, to analyze the description and
initialize adata base. If" the analysis fails, the user automatically
re—enters the Text Entry/Command mode so that changes can be made to
the data base description.
Upon first entering MDBS.DDL, the user is in the Text Ent.ry/Command
mode. To enter the line editor or the DDL analyzer mode the user
enters the appropriate command.
We will turn to adetailed discussion cjj; the Text Entry/Command
"" mode after the following general comments concerning conversation with
MDBS.DDL.
Line—input editing conf"orms to the standard features of" your
operating system. While the system specif"ic manual covers more on
this, the following general comments are usually applicable. When
entering aline (either of text or acommand) the following keys are
of special importance:
RETURN (ENTER) this key terminates aline of input
CONTROL-X this key interrupts the line entry and restarts the
input.
CONTROL-P this key toggles the DDL output between t.he console
and printer.
DELETE this key causes aphysical backspace and character
deletion ir. aline being entered.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 73
MDBS Data Management System Documentation
CONTROL-H same as DELETE.
BACKSPACE same as DELEñ"E.
CONTROL—C this key interrupts aDDL operation and returns
control to the ent.ry mode. """
When too many DELETE or BACKSPACEs are entered (i.e., the user has -.
deleted ali of his current line), these keys act as aline feed.
One key that operates the same in all three modes of" operation is
the ESCAPE key. Pressing thi"z key always results in an exit from
MDBS.DDL and returns control to t.he operating system.
The input buf"f"er is limited to 80 positions. Hence aline longer
than 80 characters cannot be entered. If" the user attempts to type
more than 80 characters, the message
*** LINE TOO LONG
will be displayed and the input line will be ignored. The user is
still in Text Entry/Command mode.
An empty line (i.e., aline entered by pressing only the RETURN
key) results in the message:
*** ERROR
As above, the user is still in Text Entry/Command mode.
(9 COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 74
m·
MDBS Data Management System Documentation
2. Text Entry/Command Mode
In the Text Entry/Command mode, the user can enter both commarids
and text. Commands can be entered in lower or upper case. However,
the user should be aware of the fact that file names are translated to
upper case and that in the actual tables created for the data base,
all names are stored as upper case. Specifically, user names and
passwords, record names, item names and set names are stored in upper
case. or course, data to be stored in the data base via MDBS.DMS
routines are maintained as specified by the user.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 75
MDBS Data Management System Doeumentati on
a.Text Entry
Aline of" text i spreceded by a Í7our (4) digit line number.
-
Entered text is maintained in the order índicat:ed by the line numbers.
Examples of" valid lines are:
0010 LINE OF TEXT
0020 MORE
7301 STILL MORE
0000 THIS IS OK
0732SO IS THIS
9999 HIGHEST LINE NUMBER
Aline started with aline number consisting of" fewer than 4digits
results in an error message:
*>k*=RROR
and the line is ignored. The user is still in the Text Entry/Cemmand
mode .
I r too much text is entered (i.e. ,ir there is insufficient memory
to hold all or the text) the following message is É>'^in|: 2d.:
·
>K**OUT OF ROOM IN MEMORY
and the current line being entered is lost. However a! 2text. entered
up tothis point is sti !1 preserved. The user can expand the amount
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 76
MDBS Data Management System Documentation
of" room available as outlined in the section "Important MDBS.DDL
Addresses" (Section II.C.3).
II aline number has already been used, its subsequent re—use will
remove the pricm line.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 77
0
·
MDBS bata Management SYstem Documentation
b. Commands
In the following pages we describe each command. Commands are not
preceded by blanks and must be followed immediately by aRETURN. If
the command is not recognizable, the message:
***ERROR
is displayed. The user is still in Text Entry/Comr.and mode when this
happer.s.
©COPYRIGHT 1979, í98Cl, Micro Data Base Systems, Inc. 78
MDBS Data Management System Documentation
(BYE, ESCAPE-key) Return to the Operating Systern
Purpose:
Exit from the program and return to the operating system.
Command Syntax:
BYE Return to the operating system
ESCAPE-key Return to the Operating System
Notes:
1. All text and variables are preserved so that the user ean re—
enter through the normal re—entry point.
2. The ESCAPE-key differs from the BYE command in that the BYE
command is limited only to usage in the Text Entry/Command
mode while the ESCAPE key can be used in all the mcAes of"
MDBS.DDL.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 79
MDBS Data Management System Documentation
......
(D) Deleting Text.
.
Purpose: Delete all or aportion of" the entered text.
Command Syntax and Prompts:
Dndelete line n
Dn,m delete from line nto m(inclusive)
Dnmdelete from line nto in (inclusive)
Ddelete all f-he entered text
results in computer prompt of:
+
DELETE ALL? (Y/N)
the text is deleted ir aresponse of Yis given.
Examples or valid usage:
D10 Deletes line 10
.,
D10, 50 Deletes lines 10,11,...49,5n
DIO 50 Deletes lines 10,11,...49,50 "
D10 50 Deletes lines 10,11,...,49,50 --
DDeletes all lines
DELETE ALL? (Y,/N)
yuser responds with "Y" "'"
Notes:
I. Commas or blanks serve as delimiters.
2. If there are no lines in the range to be deleted, the program
returns to the Text Entry/Command mode.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 80
-
MDBS Data Management System Documentation
3. Mter lines a-re deleted the program returns to normal Text
Entry/Cowtumd mode.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 81
MDBS Data Management System Documentation
————
(DDL) Data Definition Language Analyzer
Purpose:
This command is invoked to analyze the data base definition
currently in text and, ir no errors were encountered, to
initialize adata base.
Command Syntax: .
DDL invokes the data definition language analyzer.
Notes:
1. The DDL analyzer proceeds until eit-her an error is encountered
or adata base has been successf'uliy initialized. Both types
of terminations return the program to the Text Entry/Cornmand
mode. A!! text is preserved in memory.
2. The CONTROL—C key terminates the analysis process and returns
the program to normM Text Entry/Command mode.
3. During the analysis, pressing aríy key (except CONTROL—C or
ESCAPE) causes apause until another key is pressed.
4. Before invoking the Analyzer, create the data base File on the
primary drive. The file name should match the name given on
the FILES line of" the data base description being analyzed.
5. See Section II.E.4 for amore detailed discussion oí the DDL
Analyzer.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 82
MOBS Data Management System Documentation
(DR, EN, FI, IT, ME, OW, PA, RF, SE) Data Description Format Commands
Purpose:
Display the format for the:
DRIVE
END
FILES
ITEM
MEMBER
OWNER
PASSWORDS
RECORD
SET
commands of adata base description. These are extremely useful
while inputting text to describe adata base.
Command Syntax:
DR For" the drive section format
EN For the end eard format
FI For the tile section format
IT For an item Í"ormat
ME For aset member format
OW For aset owner format
PA For the password section f"ormat
RE For arecord format
SE For aset format
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 83
MDBS Data Managem=mt System Documentation
Examples of Valid Usage:
PA Prints the password section rormat
PASS Prints the password section format
PASSWORJJi3 Prints the password section rorrc!at
Notes:
1. These commands do not afYect the current text in any way. The
user remains in Text Entry/Commarid mode.
2. Each of" the commands can be entered by typing aportion of" the
section cr card. type name as long as at least the Íü.rst two
characters are typed. For example SE or SET results in the
set card format but Salone will result in 3ñ error.
3. Al! the Iormats are displayed taking into account the the four
digit line number and aleading blank (which is necessary in
the data description text).
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 84
MDBS Data Management System Documentation
(E) Enter Line Edit Mode
Purpose:
This command is used to enter the line editor. The user is
referred to the next cection on LINE EDITING.
Command Syntax:
Eedit the entire text
En edit the text starting at line n
En, medit the text starting at line nand ending at line
m(inclueive)
Examples of" Valid Usage:
Eedit all text starting at the the first line
E100 edit text starting at line 0100
E1OO, 200 edit text between lines 0100 and 0200 inclusive
ElOó, 2'JO edit text between lines 0100 and 0200 inclusive
ElOó 200 edit text between lines 0100 and 0200 inclusive
Notes:
1. If" there is no text within the range to be edited, the program
returns to Text Entry/Command mode
2. If" there is text within the range to be edited, the first such
line is displayed. The user is now in the line editor mode.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 85
·.
MOBS Data Management System Documentation
(L) Listing Text
Purgose:
.~.
List the text entered by the user.
Command Syntax: ....
Llist al! lines OÍ" text —.
Lnlist line number n
Ln,m list text from line nto line m
Examples of" Valid Usage:
Llist all lines of" text
LIQ, 20 list lines 10 through 20
LIÓ 20 list lines 10 through 20
LIÓ ,20 list lines 10 through 20
...
LIÓ list line 10
LO list line O
"
Notes:
ÍL. Commas or blanks serve as delimiters.
2. During alisting, pres".ing any key (except CONTROL—C or
ESCAPE) causes aoause until another key is pressed.
3. The CONTROL—C key terminates the listing process and returns
the program to normal Text Entry/Command mode.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 86
MDBS Data Management System Documentation
4. If there is no text to list the program remains in normal Text
Entry/Command mode.
5. At the end oÍ7 the listing the program returns to normal Text
Entry/Comnand mode.
E) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 87
MOBS Data Management System Documentation
(N) Renumbering Text
Purpose:
Renumber all of" the text entered by the user.
Command Syntax:
Nrenumbers al! text giving the first line the number 0000 and
increments by 0001.
Nn renumbers all text giving the first line the number nand -
increments by 0001.
Nn,m renumbers al! text giving the f"irst line the nurr'.ber nand
increments bv rn.
Examples of" Valid Usage:
NFirst line will be 0000, second COOl, etc.
N30 First line will be 0030, second 0031, etc.
N1O,1O First line will be C)Cll0, second OQ2C, etc.
NlO, 10 First line will be 0010, second 0020, etc.
NO, 3 First line will be 0000, second 0003, etc. ~
Notes:
—
1. Commas or blanks serve as delimiters.
2. If" an increment of" zero is specified, the f"ollowin,g message is
printed:
>k**IMPROPER LISTING PARAMETERS
and the text is renumbered using N0001 0001.
3. If" the parameters nand mare such that. aline number greater
than 9999 would result, the following message is printed:
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 38
MDBS Data Management System Documentation
W<>UMPROPER LISTING PARAMETER
and the t-ext is numbered using:
Ln0001
At the completion of" renumbering the program returns to normal
"Text Ent.ry/Command mode.
-.--
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 89
i-
MDBS Data Management System Documentation
(P) Print aSpace Ruler
Purpose:
This command is used to produce aspace ruler to aot as aguide
tor text entry. For example, on a64 character output device
this command results in
1...5...10...15...20...25...30...35...40...45...50...55 _.
so that text can be entered as:
1...5...10...15...ZO...25..."30...35...40...4"...50...55 """
0020 TEXT
.~.
--
Command Syntax:
PProduces aspace ruler.
Notes:
1. This com!"Hand does not affect the current text in any way.
The user remains in Text Entry/Command mode.
~-
——
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 90
.....
MDBS Data Management System Documentation
(R) Reading aText File
Purpose:
Allows the user to read apreviously saved text file.
Command Syntax and Prompts:
Rread apreviously saved file
FILENAME prompt from computer
name the user should respond with avalid file
name (fully qualified)
on a successful read the computer
responds with:
XXXXX BYTES
Example of Valid Usage:
R
FILENAMZ
name
463 BYTES
Notes:
1. Any text in memory is replaced by the Í7ile brought in by a
successflíl read.
2. If aí'ile is not successfully read the message:
***ERROR
is displaved (in addition to any messages the operating system
may print.). Some read errors may result in areturn to the
operating system in which case the user may re—enter MDBS.DDL
© COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 91
MDBS Data Management System Documentation
~'··
through the standard re—entry point.
3. If" atile is not successfully read, text present in memory may
still be intact, depending of course on the nature of the read
error.
4. Normal causes tor read errors include the absence of the
indicated rile on the indicated disk drive. Other standard
-..0
problems causing read errors may also be encountered.
5. To escape from aFILENAME prompt the user may enter anull —
line (a simple RETURN). This will result in the message
***ERROR
but will return the user to the normal Text Entry/Command
mode.
€3. The response to asuccessful read:
xxxxx BYTES
gives the total number of bytes transferred. ··
6. If there is not enough memory available Í7or the text to be
read—in the following message is displayed:
***OUT OF ROOM IN MEMORY
and reading discontinues. Text in memory before the Rcommand
remains in memory and the program returns to Text Entry/ ,..
Command mode.
..
-.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 92
MDBS Data Management System Documentation
(W) Writing aText File
Purpose:
Allows the user to write atext file.
Command Syntax and Prompts:
Wwrite the current text onto afile
FILENAME prompt from computer
name the user should respond with avalid file
name (fully qualified)
on a successful write the eomputer
responds with:
XXXXX BYTES
Example of Valid Usage:
W
FTLENAME
name
463 BYTES"
Notes:
1. Asuccessful write will produce an image of the text on the
appropriate file. The text still resides in memory. At the
eompletici" of the WRITE operation the program returns to
normal TeA: Entry/Command mode.
2. If afile is not successfully written the message:
***ERROR
is displayed (in additior] to any messages the operating system
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 93
MDBS Data Management System Documentation
may print). Some write errors may result in areturn to the
operating system in which case the user may re—enter MDBS.DDL
through the standard re—entry point.
3. Normal causes for write errors include the absence of the
indicated file on the indicated disk drive. Other standard
problems causing write errors may also be encountered.
4. To escape from aFILENAME prompt the user may enter anull
line (a simple RETURN). This will result in the message
***ERROR
but will return the user t.o the normal Text Entry/Command
mode.
5. The response to asuccessf"u1 write
xxxxx BYTES
gives the total number of bytes transferred.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 94
MDBS Data Management System Documentation
3. Line Editing
In the line editing mode, current text can be altered within aline
without retyping the line. The line editing mode is enterti·d. through
the Ecommand of" the Text Entry/Command mode. Once in the line
editor, the current line being edited is displayed. At this point,
the user may advance to the next. line of text or may make changes in
the current line. Agiven line can be repeatedly altered before
advancing to the next line.
As in the Text Entry/Command mode, all communication with the
system can be performed in lower or upper" case and all special keys
retain their norrr.al functions.
"We now turn to adetailed discussion oÍ" the line editing features
and commands. Note that the entry of" an improper eommemd syntax
results in aprompt. ofü
"7
O
.-
When this occurs the user is still in line editor mode and can give a
correct response-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 95
-
MDBS Data Management System Documentation
—
(RETURN key) Move Through Text
Purpose:
This al lows the user t-o advance fj"om the current line of" text to
'4.
.
the next line of text and to make the next li.ne of' text currerít-.
.-.
Command Syntax :
Press RETURN key to move to the next line of text
Notes:
1. When entering the line editor mode through the E command of"
the Texc Entry/Command mode ,the user specifies cr target
region for editing. Once the end of) the region i'É. encountered
and the user presses the RETURN key, the program r·"-' '- ur ns to
Text Entry/Command mode.
~
Z. After pressing the RETURN key, the new current ]ine of" text is
displaye\".- ~
+-
..-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 96
"
MDBS Data Management System Documentation
(C) Change aLine of Text.
Purpose:
This commanc'. is used to alter astring of" text within aline.
t
Command Syntax:
CdSOURCEdNEWd where "d" is any delimiter, SOURCE is the
original string and NEW is the
replacement string.
Example of" Valid Usage:
Assume the following is being edited:
0010 HTIS IS TWO DEMANSTRATE THE LINE LINE EDTOR
C/HT/TH/ results in:
0010 THIS IS TWO DEMANSTRATE THE LINE LINE EDTOR
C.TWO.TO results in:
0010 THIS IS TO DEMANSTRATE THE LINE LINE EDTOR
CQMAQMO results in:
0010 THIS IS TO DEMONSTRATE THE LINE LINE EDTOR
C. LINE. results in:
0010 THIS IS TO DEMONSTRATE THE LINE EDTOR
C/ED/EDI results in:
0010 THIS IS TO DEMONSTRATE THE LINE EDITOR
Typing:
S
returns the program to Text Entry/Command mode.
Notes:
jg COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 97
·~
MDBS Data Management System Documentation -.
1. The rirst character following the Cis used- as the delimiter.
2. The last delimiter is optional. The RETURN key also acts as
the last delimiter.
3. If" the source string is not found, the computer responds with:
?
and aproper response can then be given.
'~"
4. The line number carínot be .altered by the line editor.
·"*
-,.
·"
.
...-.
--~.
-..
-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 98
MDBS Data Management System Documentation
(S) Leaving the Editor Mode
Purpose:
To return the program to Text Entry/Command mode.
Command Syntax:
Sreturn to Text Entry/Command rr,ode
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 99
~7"
MDBS Data Management System Documentation
+~
(C) Repeated Changes
Purpose:
To make the same changes within and across lines. """'
T
Method:
When achange is entered, it is "remembered". The next change
replaces the remembered change and becomes the ner.' "remembered"
.-
change. Up': mentering the text editor, the "remembered" change
is the default of -..
C///
Entering aCfollowed by aRETURN invokes the last remembered
change. This can be done within aline or, after "izdvancing
lines, within a new line.
Command Syntax:
Cmake remembered change
Examples or Valid Usage:
~
Suppose. the fol!owing text is to be edited:
0010 PRODUCT 64KGB IS NOT NEW
0020 64KGB AND 64KGB DERIVATIVES
0030 HAVE BEEN AROUND FOREVER.
0040 ... 64KGB REPORT.
and the user entered Ein the Text Entry/Command mode. This
results in:
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 100
--
MDBS Data Management System Documentation
0010 PRODUCT 64KGB IS NOT NEW.
being displayed. At this point the remembered change is:
C///
Suppose 64KGB is to be replaced by T47S. The user may enter:
C.64KGB.TA7S
which will result in:
0010 PRODUCT T47S IS NOT NEW.
and the current remembered ehange is:
C.64KGB.T47S
Pressing the RETURN key will result in:
0020 64KGB AND 64KGB DERIVATIVES
Pressing Cand then RETURN results in:
-- 0020 T47S AND 64É'GB DERIVATIVES
since C.64KGB.T47S was remembered. Repeating with Cand RETURN
gives:
0020 T47S AND T47S DERIVATIVES
Pressing RETURN gives:
0030 HAVE BEEN AROUND FOREVER
Pressing RETURN gives:
0940 ... 64KGB REPORT.
Entering Cand RETURN gives:
0040 ... T475 REPORT.
Notes:
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 101
...
MOBS Data Management System Documentation
1. A remembered change will not be forgotten until either another
properly entered change is submitted or the program returns to
Text Entry/Command mode.
-
—
—.^
....
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 102
MDBS Data Management System Documentation
4. DDL Analyzer
In the DDL analyzer mode, text containing adata base description
is first analyzed and then, ir error free, used to initialize adata
base.
While adata base may be spread over several disks, (as explained
in the FILES section of the Data Description Language discussion),
-- MDBS.DDL expects to initialize af"ile on the first physical drive.
Only this drive needs to have the indicated tile present during the
DDL analysis. or course, during MDBS.DMS operations, all files need
to be active.
If' adata description is successfully analyzed and adata base
—- initialized, the message
DDL PROCESSING COMPLETED
is displayed. The program then returns to Text Entry/Command mode.
All text has been preserved.
If" an error is d=tected during the analyeis, an error message is
displayed and the program returns to the Text Entry/Command mode. All
text is preserved.
During aDDL analysis, pressing any key (other than CONTROL-C or
ESCAPE) results in apause until akey is again pressed. This is
useful for purposes of controlling the output displayed.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 103
MOBS Data Management System Documentation
CONTROL—C interrupts the analysis and returns the program to the
Text Entry/Command mode. The ESCAPE key returns control to the
operating system.
The DDL analyzer builds tables in memory beyond the text region.
.....
Ir there is insufficient room in memory to complete all of the tables,
the message ,
***OUT OF ROOM IN MEMORY
is displayed. As with all errors, control is returned to the Text ....
Entry/Command mode and all text is preserved. The user should refer
to Section II.C.3 for inf"ormation on expanding available memory.
While analyzing the data description, each line of' desoription is
printed (without line numbers).
In the f"ollowing, alist of errors detected by the DDL analyzer is
given along with explanations and possible causes. ""'
m··±
—.
.--.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Ric. 104
.
MDBS Data Management System Documentation
..-
*** A DEPENDING ON ITEM CANNOT BE AREPEATED FIELD
Line Type: ITEM
Columns: 36-43
Explanation:
A"depending on" item was specif7ied in columns 36—43 for the item
currently being processed. The depending on item was def"ined as
arepeated field, which is not permitted.
Possible Causes:
1. Typographical c"rror.
2. Incorrect item specified as depending item.
3. Data base design error.
—-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 105
MDBS Data Management System Documentation
*** AVARIABLE LENGTH ITEM MUST BE LAST IN ARECORD
Line Type: ITEM
Explanation:
Avariable length item (i.e., one with an entry in columns 36—43)
must be the last item in arecord. The ITEM line being processed
immediately follows avariable length item. Only one variable
length item may appear in arecord, and it must be the last item.
Possible Causes:
1. ITEM lines out of" order.
2!. Missing RECORD line.
3. Data base design error.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 106
MDBS Data Management System Documentation
*** CANNOT WRITE TO DISK
Explanation:
Arequest to the operating system was made by the DDI- analyzer to
write to aÍ"i!e. The operating system returned an error flag.
Possible Errors:
1. Refer to the standard causes f"or disk error's.
2. Afile with the data base name cannot be found on drive 1.
íj COPYRIGHT 1973, 1980, Micro Data Base Systems, Ine. íC)7
MDBS Data Management System Documentation
*** CAN'T HAVE OTHER O\'MERS WITH SYSTEM
Line Type: OWNER
Columns: B—13
Explanation:
Two or more owner lines were specified for this set and one of"
the lines defined SYSTEM as an owner. If" 2YSTEM is the owner
record f"or aset, then no other owner record types may be defined
for that set.
Possible causes:
1. Specified OWNER instead of MEMBER on a line.
2. Data base design error.
—
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 108
MDBS Data Management System Documentation
*** DEPENDING ON ITEM MUST BE ATWO BYTE BINARY VARIABLE
Line Type: ITEM
Columns: 36—43
Explanation:
A"depending on" item was specified in columns 36—43 for the item
currently being processed. The depending on item is abinary
variable, but does not have length two as required.
Possible Causes:
1. Typographical error.
2. Incorrect item specified as depending item.
3. Data ba".e design errcm.
—
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Tnc. 109
MDBS Data Management System Documentation
*** DEPENDING ON ITEM MUST BE BINARY
Line Type: ITEM
Columns: 36-43
Explanation
A"depending on" item was specified in columns 36—43 f"or the item
currently being processed. The depending on item must be BINary
with alength of" 2bytes.
Possible Causes:
1. Typographical error.
2. Incorrect item sµecified as depending item.
3. Data base design error.
©COPYRIGHT 1979, 1980, Micro Data Basé Systems, Inc. 110
MOBS Data Management System Doeumentat ion
*** DEPENDING ON ITEM NOT PREVIOUSLY DEFINED IN THIS RECOR3
Line Type: ITEM
Columns: 36—43
.
Explanation:
Th eitem specified in columns 36—43 of" the current ITEM line was
not def"ined on a prior ITEM line f'or' the current record type.
Possible Causes:
1. The ITEM line for the depending on item is missirg or out or
sequence.
2.Th ename of" the depending item was missr)elled when the item
was defined.
3.The it>"m name is columns 36—43 is misspt"l led.
4.The item ríame for the depending—on item does r. ot: st.art in
column 36.
5.Typographical error.
6.Data base design error.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Iríc. 111
-
MDBS Data Management System Documentation
***-DUPLICATE ITEM NAME IN RECORD
Line Type: ITEM
Columns: B—15
.
Explanation:
The same name has been given to two ITEMs in the same record.
Possible Causes:
1. A redundant line of" text.
2. Typographical error.
3. Missing RECORD line before the replicated ITEM.
"-'t
4. The second ITEM line should have been aRECORD or SET line.
5. Data base design error- --
·
Notes:
1. An ITEM may be replicated across RECORDs. That is, the same
E
ITEM name may appear in difYerent RECORDs. .-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 112
.-
MDBS Data Management System Documentation
*** DUPLICATE RECORD NAME
Line Type: RECORD
Columns: B—15
Explanation:
Two RECORD types have the same name.
Possible Causes:
1. Aredundant line of text.
2. Typographical error.
3. The second RECORD line should have been an ITEM or SET line.
4. Data base design er'ror.
f9 COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 1í3
MDBS Data Management System Documentation
*** DUPLICATE SET NAME
cm
Line Type: SET
Columns: 8—15
~—
-..
Explanation:
-—
Two SETs have the same name.
Possible Causes:
.·
1. Aredundant line of" text.
—
2. Typographical error.
.
3. Data base design error".
."
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 114
MDBS Data Management System Documentation
*** ERROR
Explanation:
This is ageneral purpose error message.
Possible Causes:
1. Empty line input.
2. File not on indicated drive during aW,R, or DDL command.
3. Control—C break.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 115
MDBS Data Management System Documentation
*** EXPECTING ANUMBER IN AFIELD
Line Type: See Below
Columns: See Below
Explanation:
Anon—numeric character was entered in anumeric field. Valid
numeric characters are the digits O—9 arid blanks.
Possible Causes:
1. Typographical error.
2. Number entered in wrong columns.
Note:
Numeric fields are fÚjúncí in the following columns:
PASSWORDS line FILES line
26-28 22-22
30-32 26-29
DRIVE line RECORD line
8-8 26-28
30-32
ITEM Une SET line
21-24 26-28
26-28 30-32
30-32 34-36
44-47
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 116
MDBS Data Management System Documentation
*** EXPECTING ARECORD, ITEM, OR SET LINE
Explanation:
Something other than aRECORD, ITEM, or SET line was encountered
after the PASSWORDS or FILES section or within the RECORD
section.
Possible Causes:
1. Sections out of" order.
2. Typographical error.
3. Missing RECORD, ITEM or SET line.
4. Columns 1—6 of the line were blank.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 117
MOBS Data Management System Documentation
*** EXPECTING AUTO OR MAN
Line Type: SET
Columns: 17-20
Explanation:
Sets may be either AUTO or MANua!. One of" these two set modes
was not specified.
Possible Causes:
1. Typographical error.
2. The word AUTO or MAN did not start in column 17.
3. No set mode was specified.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 118
..
MDBS Data Management System Documentation
*** EXPECTING SET OR END LINE
Explanation:
Something other than aSET or END line was encountered while in
the SET section.
Possible Causes:
1. Sections out oÍ" order.
2. Typographical error.
3. Missing SET or END line.
4. Columns 1—6 of line were blank.
E) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 119
MDBS Data Management System Documentation
*** FILE HAS NOT BEEN CREATED: pLEtisE DO SO
Explanation:
The DDL analyzer has attempted to initialize adata base, but the
data base rix does not exist on the disk on the first physic=j
drive.
..
Possible Errors:
i. The user has not yet created afile with the appropriate name.
2. The file exists on a disk located on some drive other than the
rirst drive.
3. The filename may have been misspelled in t]2e FILES section or -..-
in the DDL prompt ir there is no FILES section.
-...
.
—
·—
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 120
MDBS Data Management System Documentation
>j<>;n;< IMPROPER DRIVE NUMEER
Line Type: DRIVE
Column: 8
Explanation:
Adrive number was either zero or greater than the number of"
drives allowed. The number of drives allowed was sjjecilied on
the FILES line.
Possible Errors:
1. The FILES line has too small an allocation.
2. Column 8of" the current DRIVE line was lelt blank.
3. Typographical error.
©COPYRIGHT 1979, 1980, Micro Data Base Sysi: eir.s, Inc. 121
-,.
MDBS Data Management System Documentation
>l<>k>k INCORRECT MEMBER ORDER
"r~
Line Type: SET (line m
Column"c 30—35 '
Explanation:
The ordering specification f"or the members of' the current set is
not valid. Defined orders are:
FIFO first in—tirst out.
LIFO last in—first out
NEXT insert "after" current member
PRIOR insert "prior to" current member
IMMAT ordering is immaterial
SORTED set is sorted
Possible Causes:
.+-
1.0 Typogr=phical error.
2. The ordering inf"ormation does not start in column 30.
Notes:
1. If" columns 30—35 are blank, IMMAT is assumed.
2. It is not meaningful to specify an member ordering for N: 1or
1:1 sets. However, if an order is given, it will be checked
for validity.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 122
MOBS Data Management System Documentation
*** INCORRECT OWNER ORDER
Line Type: SET (line #2)
Columns: 8—13
Explanation:
The ordering specirieation fbr the owners of" the current set is
not valid. Derined orders are:
FIFO First in-first out
LIFO last in—first out
NEXT insert "after" current owner
PRIOR insert "prior to" cu:"rent owner
IMMAT ordering is immaterial
SORTED set is sorted
Possible Causes:
1. Typographical error.
2. The ordering inf"ormatjon does not start in column $3.
Notes:
1. If columns 8—13 are blarík, IMMAT is assumed.
2. It is not meaningful to speeií"y an owner ordering in 1:M or
1:1 sets. However, if" an order is given, i.t will be checked
for validity.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 123
MDBS Data Management System Documentat.iQn
*** INVALID ITEM TYPE
Line Type: ITEM
·Columns: 17-20
Explanation:
The type speciried f"or the item being processed is not one of the
types listed below:
BIN Binary
CHAR Character
INT Integer
LOG Logical
REAL Real
..
Possible Causes:
1. Typographical error.
2. The item type name does not start in column 17.
—
3. No item type was specified.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 124
MDBS Data Management System Documentation
*** INVALID SET CHARACTERISTICS
Line Type: SET
Explanation:
An inconsistency was detected by the DDL Analyzer while
generating the set description tables for the set being
processed. This error is internal to the DDL Analyzer code and
should not normally occur. If" it can be determined that the
possible causes listed below are not responsible for" this error,
please coni: act MDBS for assistance.
—Possible Causes:
1. Improper user patch. Check MDBS manual for proper patch
procedures.
2. Ahardware or software malf"unction has caused the set
descriptors to become inconsistent.
.
-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 125
..
MOBS Data Management. System Documentation
*** INVALID SET TYPE
Line Type: SET
Co lumns: 22—24
Explanation
-'~
One of" the rour possible set types has not been spec ifiec! on the
SET line. Valid set types include:
1:NOne owner record occurrence may be associated wit.h
zero ormore member record. occ'.írrences (Standard
CODASYL set)
N:MEach owner record occurrence may have more than one
member record occurrence and each member record
occurrence may have more than cme owner record
occurrence (many"-to-----many).
1:1Each owner record occurrence: may be associated with
at moct oru= member record occurrence.
N:1Each member record occurrence ma y beassociatcd
with on eormore owner record ocunn"rences; eac h
owner ma yhav eat most o n etnemb '2x" recora
occurrence.
',·
"pr
Possible Causes:
1. Typographical error.
2.The set type specification does not start in column 22.
3.No set type was specified.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 126
MDBS Data Management System Documentation
*** ITEM READ OR WRITE ACCESS LESS THAN RECORD"S
Line Type: ITEM
Columns: 26-28 or 30-32
Explanation:
Either the read or write access level f"or the item being
processed is less than the corresponding access level for the
record containing this item. This usually indicates that an
error has been made in the record or item acoess level
specifications.
Possible Causes:
1. Typographical error'.
2. Data base design error.
Note:
ir the access levels fújr an item are left blank, they will
default to the record access levels.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 127
MDBS Data Management System Documentation
*** KEY UNDECLARED
Line Type: SET (line t'2) ""
Columns: 17-24 or 39—46 -
·
Explanation:
Asort key was specified which does not appear as an item type in
the owner (for sorted owner type) or member (í'or sorted member
—.
order) record type.
Possible Causes:
1. Typographical error.
2. Sort key name does not start in proper colu.mn.
—
3. Data base design error.
Notes:
1. It is not meaningful to specify asort key unless the set
order is SORTED. II" the set order is not SORTED and asort
d
key is specified, the sort key name will !-)cz: checked tor
validity, but will not be used.
2. It is permissable to not specify asort key íor asorted set..
II" this is done, the full record is used- as the sort key.
©COPYRIGHT 1979, 198C), Micro Data Base Systems, inc. 128
MDBS Data Management System Documentation
*** MAX LENGTH FOR BINARY VARIABLE IS 2
Line Type: ITEE!
Columns: 22-24
Explanation:
An item of" type binary (BIN in column 17—20) has keen encountered
1'/ i th a n itern size (columns 22--24 )larger than 2.Binary
variables iruzy be only one or two bytes in length.
Possible Causes:
1.Typographical error.
2.Bata base design error.
3.Item size not right just.ified in columns 22—24.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 129
""
MDBS Data Management. System Documentation
*** MAXIMUM RECORD SIZE TOO LARGE TO FIT ON PAGE
Explanation:
This error is displayed af"ter the END line has been reached when,
in the process of^ initializing the data base, the DDL Analyzer
t"
discovers that arecord is too large to Ut on a data base page.
The data base page size is defined on the FILES line. Each page
also has a10 byte page header,i
·
Possible Causes: -,.
i. Page size on FILES line (columns 26—29) too small.
2. An item in arecord has an item length and specirication count
too large.
..
—..
1It is possible that future releases or MDBS.DMS will require ""
slightly larger record and page headers. We recommend that you make
allowances for this when you select the page size and record sizes fújr
your data base.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 130
MOBS Data Management System Documentation
*** NAMES CANNOT START WITH A$OR BE BLANK
Line Type: RECORD, ITEM, SET
Columns: 8-15
Explanation:
All records, items and sets must be given anon—blank name.
Names starting with adollar sign are reserved for use by MDBS
processors.
Possible Causes:
1. Typographical error.
2. Incomplete specification.
3. Data base design error.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 131
MOBS Data Management System Documentation ·"~
*** NO MEMBER AND,/OR OWNER LINE FOR ASET
Explanation:
Aset declaration was encountered which did not cor.!tai-n at least "
cne owner line and at least one member line.
...
·'·
Possible Causes:
1. Typographical error in word OWNER or MEMBER.
2. Omitted OWNER or MEMBER line. _
3. MEMBER line specified before OWNER line.
..--.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 132
MDBS Data B.4ana,gement System Documentation
>K>kzk NO PAGES ALLOCATED TO AFILE
Line Type: DRIVE
Columns: 12—15
Explanation:
ADRIVE line speeif"ied afile length (on that drive) of zero
pages.
Possible Causes:
1. Conceptual error (see note below).
2. Missing DRIVE line.
3. Typographical error.
Notes:
1. Af"ile of length zero can never be used by the data base
management system. F!enee this error points out anull
request. If tha user has entered such aline in the mistaken
belief) that the data base must be allocated on drives in a
U
contiguous Í"ashion, the following illustration may be oÍ" use:
DRIVE 320
DRIVE 120
This example state= that drives 1and 3will hold the data
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 133
MDBS Data Management. System Documentation
base (notice drive 2will rtot be used) an dthat each wi 1l
hold, at maximum, 20 pages.
.-
'^
"
~
·
·
V·"·
b
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 134
MDBS Data Management System Documentation
>i<>k>k NOT ENOUGH ROOM ON DRIVE 1
Explanation:
The DDL analyzer has at-tempted to initialize adata base, bw" the
amount OÍ" information needed to be placed on the Í"ile on drive 1
exceeds the amount c)r room available on this file.
Possible Errors:
1. A specification line for DRIVE 1(in the FILES section) does
not provide for enough riages on the drive. Provide for more
room if possible.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, inc. 135
MDBS Fata Management Sy3tem Doeumentati on
*** NUI.IBER LARGER THAN 255
Line Type: See below
Exp lanation :
—
Anumber larger than 255 has been encountered. The following
numeric fields are íi'iiited to amaximum v7Íuq of :-'S5:
?ASS\t1Ol?DF RECORD
26-28 26-28
3C)-32 30-32
ITEM SET
26-28 2€-28
30-32 "30-32
34-36
—.
@COFYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 1ÁYJ
MDBS Data td.anagement. System Documentation
>f<>l<>k PAGE LENGTH MIJST BE DT'.'ISIiíLF BY 25é
Line Type: FILES
Columns: 26-29
Explanation:
The data management system assumes that fK3¶é sizes are multiµfes
of" 256 .Hence apage length rnust be evcrjy divisible by 256.
Possible Errors:
1-Apage length of" Zfí"O generates this mess3ge!. Hence columns
26-29 may be blank.
2.Typographical error.
3.Improper specií"ication.
.
©COPYRIGHT 1979 ,1980 ,Micro Data Base Systems, Inc .l. ?'"
MDBS Data Management System Documentation
..
*** PASSWORD LINE EXPECTED
Explar,ation:
APASSWORDS line must be the first line of the data d2scription.
Possible Causes:
--,
1. Sections out of order.
Z. Typographical error.
3. PASSWORDS section missing or PASSWORDS lines missing.
4. Columns 1—6 of line were blank. "
-—
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 138
!ADBS Data. yan&.Eem-orlt" System Documentation
*'** FASSWOPD ENTRY DR RECCJFD I-INC EXPECTF'D
Explanation:
A}ine t"o !1OWi?l2 t:h:- PAG£I'|3PD: ; 1ine 1')3c± bemi encountet"ec2 whi cñ'í ":. ;:
not. apas3.vlz;rd cnt".""y or ¿i. F?EC(U?2 i:ríe .
Fossik'le Cau.c.es:
Í."FECOPí: '° m,isspe1 icd o:nRECORD 1 :. ríe
Z.Co iunir'.s 1'·'7 of" µ?"-3")wor-d entry Iin-e non—b! ank.
3.Sections cmt of" 'úí-cier.
ti ="'?yric!': 7' imu, :cY';t"' ,1\' iCt:jIcU ,t Base System"" ,Tñ¢"' .13í'
MOBS Data Management System Documentation
*** PREMATURE END OF INPUT
tv
Explanation:
The data description is incomplete.
-
Possible Causes:
1. The END line was not present.
2. Not all sections of adata base description are present, or,
ir present, possibly are out of" order. The sections (in
appropriate order) are:
PASSWORDS
FILES (optional) --
DRIVE (optional)
RECORD "
ITEMS (optional)
-—-.
SET
O\·1NER .· -
MEMBER
END
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 140
—~.
MDBS Data Management System Documentation
*** READ ACCESS GREATER THAN WRITE ACCESS
Line Type: PASSWORDS, RECORD, ITEM. SET
Co lurííns :26—28, 30--32
Explanation:
Th eread access level specified (in columns 26—28) was greater
than the write access level specified (columns 30—22 ).Since
larger access levels indicate more restrictive access, the read
acct2£s is more highly restricted than the write access, which is
not meaningf"u1 .
Possible Causes:
1. Typographical error.
2.Data base cIesign error.
3.Omission of an access level entry.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 141
MOBS Data Management System Documentation
*** RECORD ACCESS GREATER THAN SET'S
Line Type: OWNER, MEMBER _
.
Explanation:
The record specif"ied on the OWNER (MEMBER) line being processed
has ahigher (i.e., more restrictive) read or write access Xvel
than the set to which it belongs.
Possible Causes:
1. Typographical error. --
2. Data base design error.
3. Omitted access level. ..
""
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 142
MDBS Data Management System Documentation
:'e>f<>k RECORD NOT FOUND
Line Types: OWNER, MEMBER
Co 1umns :8— 1 3
Explanation:
Th erecord type specified on columns 8—13 was not previously
def"ined.
-..
Possible Causes:
1. Typographical error .
2.Record :íame does not: st:art in column 8.
3.Nc) recc"d name specified.
4.Record :'íam-e mis--specified on RECORD line.
..-
5.Data base d..tsign error.
—.
©COPYRIGHT 1979, 198(J ,Micro Data Base Systems, Inc .143
MDBS Data Management System Documentation
—
>:<:l<>l< REPEATED ITEM TOÜ LARGE
Line Type: ITEM
Columns: 22—24, 45—47
-
mwpr
Explanation:
Areplication count was specif"ied ror the item under """"
consideratiori and the product OÍ" this replication count (columns
4=k-47) and the item length (columns 22—24) exceed': .65535.
Possible Causes:
1. Typographical error.
--
2.Data base design error.
'
·
©COPYRIGHT 1979, 1980, Micro Data Base Systems, H-kj. 144
m
l
MOBS Data Management System Documentation
m
l
/
t
t*** R/W ACCESS NOT EQUAL FOR DEPENDING AND CURRENT ITEM
r"
i
TLine Type: ITEM
6
Columns: 26-28 or 30-32
"Explanation:
i
\
The current item has been determined to be one which depends on
the item specified in columns 36-43 (the depending item). The
read and write aecess levels of the current item must equal the
respective read and write access levels of' the dependi.ng item.
b
Possible Causes:
m~'
,1. Typographical error.
T2. Data base design error.
T3. Omitted aecess level.
É
t
0
i
t
r"
7
i
T
t
~
t
l
l
S
r
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 145
r"
i
.~J
MDBS Data Management System Documentation -
*** SECOND LINE OF SET DEFINITION INVALID ·
~.J
Line Type: SET
Columns: 1—6 "
Explanation:
The set description actually consists of" two line—images. The
rirst has the word SET in columns 1—6 and the second has blanks
in these columns, Avalid first line of" the set description was
processed, and aline which was non—blank in columns 1.—6 has been
encountered after it. ~a
Possible Causes:
)
1. Omission or seeond line OÍ" set description.
2. Typographical error. _
.m~d
.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 146 —
r"
MDBS Data Management System Documentation
i
*** SORT KEY NOT·· IN RECORD
r
"Line Type: OWNER, MEMBER
Columns: 8—13
Explanation:
Asort key was speeified ror the owner (member) or this set, but
the record on this OWNER (MEMBER) line does not contain the sor"c
key.
/_
Possible Causes:
m"
S
1. Typographical error.
2. Data 'base design error.
m
i
r~
F
S
b
i
T
t
\
P'
r© COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 147
r"
l
L
MDBS Data Management System Documentation
*** SYSTEM CAN"T BE A MEMBER
Line Type: MEMBER
B-13
Explanation:
SYSTEM was defined as amember or aset. SYSTEM is cmly allowed
to be the owner of aset.
Possible Causes:
1. Data base design error,,
i
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc". 148
T"
MDBS Data Management System Documentation
i.
''·-'" III. MDBS.DMS
1~
,A. Introduction
"In this section, we present Micro Data Bace Systems" Data-
Management System whieh we call MDBS.DMS (for ,M.icro Data Base Systems"
Data Management System). Auser controls the Data Management System
through the Data Manipulation Language (DML).
-
In part Bwe list several features of the system which are
described in more detail elsewhere. In section Cthe user is
--- instructed on how to "bring-up" MDBS.DMS and how to modify the
package.
In the MDBS system, various data manipulation language commands are
used. In section Dwe discuss each (DML) command in detail. Section
Dalso provides examples of" the use of" these commands. It is strongly
recommended that these examples be read before the detailed
information or Section III.D.3 is studied.
Understanding of the DML commands can be expedited by first
texamining the following commands. These commands enable auser to
actually use adata base, and serve as abasis tor gaining an overview
~of the system:
T- 1. DEFINE 6. FNM
l
2. OPEN 7. GFM
3. CRS 8. SOM
É
4. AMS 9. SMM
t
'5. FFM 10. CLOSE
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 149
~·
MDBS Data Management System Documentation
.
B. Features ~
MDBS.DMS allows the user to store and retrieve data in the data m
base and to establish and use the various set relationships defined in
the MDBS Data Derinition Language. All details or physically managing "
the data are handled by the MDBS.DMS system -- specifically, the tasks
or reading, writing and managing disk storage are handled by MDBS.DMS.
MDBS.DMS supports the following features for data base management "
work:
1. Convenient host language calling sequence.
,
2. Powerful data block features tor communication with host j
language variables— amust for non record oriented
languages. "
3. Records may be rixed or variable length.
4. Data items may be character, integer, real (floating
point), logical, or binary.
5. Sets may be one—to—many, many—to—many, one—to—one, or
many—to_one, instead oí" merely one—to—many. "
6. Sets may be ordered as SORTED, FIFO, LIFO, NEXT, PRIOR or r
IMMATerial. The immaterial ordering allows the system
to achieve certain economies in accessing the data· base.
7. Automatic or manual insertion of" records into sets is
supported. —
8. Read and write access protection via passwords at the
item, record and set levels of" organization.
J
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 150 _
MDBS Data Management System Documentation
C.Getting Started with MDBS.DMS
1.Relocating MDBS.DMS
For interpreted languages it is often desirable "¿ obeab leto
relocate the da-ta management. system to aposition iíi memory other than
that provided by Micro Da ta Base Syst.ems. In part. icular, itis
frequently use f'ul tomesh MDBS. DMS wi th tb ehost language. For
example, iÍ" BASIC isthe host. language ,t.h euser ma ywi sh to
physically append MDBS. DMS tohisBASIC interpreter and store the
appended version as, say, BASDMS. Undoubtedly, MDBS.DIJL 'Ñi Il have to
be relocated fújr this purpose.
Fo rth ispurpose we have provided arelocatable form of the data
C
management system and are ). ocator so that an exec\Átµab!e [orm ofthe
system can beORGed to an yplace in memory. Refer to the system
specific manual for further information.
2. Personalizing And Patching MD3S.DMS
MIJBS.DMS consists of aprogram region, table region, page region
and defined block region (in ñcjñ record oriented languages). Th elast
three are contiguous arid dynamically allocated.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 151
MDBS Data Management. Sys: tem Documentation
-.
To roughly compute the size of' the table region. add. the following
partial sums :
42 --
+25 *Number of Record Tg'pes
'+
+21 'K Nurnber or Items
+'L2 *Number of Sets .,
+3:}< Number of" Owner' Lines
+3'k Number of" :'"2rr!bei" Lines -·
+30 >?: k'urnber of"' Password Lines
..
+2'@ Total N\Ám.b(=r oí' Pages Al located.
+44 ':'Number of' Disk Drives
We will refer to this value as T.
Th epage region consists of' at least. one bloc?: o? memory t"qual iti
"F
size to the page length specili.ed. in the FILES se"': ti on oí" 'Lh edata
bas edescription. Th isar ea is al located ("'-e';3e-: t""2(.]-j.iFtÉ: on 2- n'.'.mber of ..
factor's Iisted below. An extremely important ract.cjT iú: the last word
of memory speci.f^ication, \.'/}']ich is discussed ], a'r- g· "." in t.: 13 section. _-,
Finally, in n on record or"ient.ed languagús the ho:"'.i: lang'.:iage user
defines data—bíocks for transferring information '- nt(" (OLI'É of' )t'h e
data base rrom ('co )hisprogram variables. T}'e s- z"e of" t.he block
region can be computed by:
12 ':'Numbé"r of defined blocks
+2>1' Total number of"' variables occurriñA int.h ?defined
blocks.
©COPYRIGHT 1ñ79, 1980, Micro Datm Base Gyst.eris, '" nc .152
MDBS Data Management System Documentat ion
We will refer to this value as B. For record oriented laríguezges
(COBOL, PASCAL, PL/I, etc. ),use B='j.
There are severa! addre: mes that the user s?"iould be aríare of" in
MDBS .DMS .Two of" these give the first and last: word OÍ" níeriiory that-
the data management system can L'se. Ca l t these values |"\rj' an dL\^i .
Given FW and L'Ñ and the size of the user tables, 'the :]urn!.:T.?;^ of pageim
available for buflering data t: o an drrom uíemory iscomputed '-":' y
MDBS.DMS as followm
(I-W -FW -T-B)
=#of Pa%es
(Page Size +3)
Whenever anew data—block- is def"ined in auser pro%ram, t!ae number' Qt"'
pages is recomputed by the data management syst ein. Tí t.his nu-rüber is
less than one, an error is returned to the user.
In th eAppendix we present th eresults e!) an experiment wFíich
relates processing time to the ntzmber of" memory resident pages. Since
th enumber ormemory resident pages is af"unetion oí both the gage
size and the amount of memory aval lable to the D?·'fS ,th enumber' of"
pages available can play an important role in the c,xec'-ztion eff'iciency
of the data base system.
Below we discuss addresses of' interest to tA euser orMDBS. D!c5S .
The user may alter" these. Abrief description oí eal': :'j follow's:
(a) Data Management. System Entry Poiot(s}
Th eu".er e'7t.e'í'": "j ^these points tr execute all c) rt.h e
Dk4S commañcj3,
©COPYRIGHT 1979, 1980, Micro Data Ease Systems, tp.c. i53
....
MDBS Data Management System Documentation
-.
(b) Last Word of Memory
The address. stored here gives the last. aval Iable word
of memory that MDBS.DMS may use.
(C) First Word of" Memory
The address stored here gives the Í"irst available word
of" memory that MDBS.DMS may use.
(d) Operating System Entry Points
IJifTerent operating systems hand ledisk read an d'
writes in avariety of" ways. To keep the manual f"ree m"
of" system specifies, such information relevant tcj your
system ispublished i nthe systen' specific manual.
Patches to non—standard routines should bemade in
··
accordance with the instructions found there.
."
m"
-—
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 154
MDBS Data Management System Documentation
D.MDBS' Data l\iariagement System
1.Introduction and Definitions
The Micro Data Base Systems" Data Management System supports aData
Management Language (DML) wh ich iscomprised ofalarge set o[
subroutines. When called f rom ahost program, the DML routines
request the DMS to perform certain operations with th edata base .
These operations include finding, adding an ddeleting record
occurrences, í"etching an dputting i tern occurrences, an dsetting
currency indicators. Se eAppendix 2for abrief description of" the
DML functions.
In this discussion, adata item in arecord type will be referred
toas a"field"; the fields are ordered, and their values occupy
consecutive words in memory in arecord occurrence. Consider the
record type:
RECORD EMPLOYEE
'TEM NA'4E CHAR 2.0
ITEM NUMBER INT 8
ITEM WAGE REAL 8
ITEM TAX REAL 8
Inan occurrence oft.h isrecord type, a20 byte value for NAME is
first, fo!lowed by an 8byte value f"or NUMBER, etc.
ADML command. is actually asubroutine cal l. The FMSK command (for
example) has the BÁGIC format:
ED =CALL (AO ,"FMSK, set-type, data-block-name" )
Most commands ('the DEFINE and EXTEND commands are the only except.ions)
pass astring which indicates the command t. obeprocessed an dth e
©CO"2tRIGHT 1979, 1980, Micro Data Base Systems, Inc. 15">
MDBS Data Management System Documentation
parameters [orth ecommand. Th ecommands return avalue (herT: to
variable ED) which is set to zero if" the command executes properly and.
non—zero upon detection of" any error or abnormal st.at: 'as .Alist oí"
possible errors is given later in this manual. The AC) refc.rs toth e
address of the entry point of" the DMS. --
OADATA—BASE KEY (refered to as the "key") is an address3 associated —
with arecord occurrence indicating where in tjje data tüzee ::}')3':' rccord
occurrence is physically located.. Each record occurrence P\&s aunique
key associated with it. No two record occurrences can P!@vf: th 2! same
key .
OACURRENCY INDICATOR isaspecial ke ymai-ntained by the DMS
containing the data base address oí aparticular record occv.rrence. —
There ar etwo currency indicators for each set—tyµe, o: ae indicating
the current owner record occurrence an dth eother :imd-ícatin¿; th e
current member record occurrence. So ,í' orea ctí s3 et: ,tí"\ e"í" eis a
PP
"current owner" and a"current member. There' isalso acurrúncy
indicator roreach record—type, specifying thecurrent record
occurrence of that record—type. Athird type orcurreney indicator
maintained by the DMS is the current of run unit. The ctír'rer.C of" rum
unit is simply the data base key oí the record last. referenced by th e
DMS .Certain DML commands use the currency ind-ic¿':-'cor's t-o s:'>Qci[y on
which record occurrence to operate, and others wii !change a!j: ?ro:3ria!:.e'
currency indicators; the currency indicators will be changed to show
that another record occurrence is now current.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 156
MDBS Data Management System Documentation
For example, ir GET SI is sorted on NAME and has owner SYSTEM and
member CUSTOMER,
SYSTEM
sí
CUSTOMER
NA!JE
then the Find Member based on Sort Key ccmimand:
ED =CALL (tío, "FMSK, si ,SiO")
causes t.he f'oi Iowing to happen: The system uses abinary search or, the
member record occurrences of set Sí until it f"indc one with th eNAVE
t"icc!d equa2 to the value of variable NO. It t-hen saves tl:íe data—base
key of that reccú"d in the currency indicator for the member reecmd or
setS1.That-. is,t.he system makes that record. the current member of
SI.
The statement:
ED =CALL (AO, "DRM, :3i")
(the Delete Ro{µc)i^d bascd or: .current Member comrr.?.nc1 )irmtruets the
sys: tem to d.e!c±te t.!"n± current. m.ember record occurrence of" set SI. Th e
system gets the key írcm the currency indicator for the member record
c[setSIL "'mcf. c: ei ístes,, tlie record beginning at: tneloc"rtio' inc'icU.ed
by the key. T}")e sc±cg-ience of the above two comr'iand.s wou 1d. cause th e
record wiíh CL s o rt: keyvalue eq ua Ito variable N(-) to be deleted.
©COPYRIGHT iS79, 1980, Micro 2ata Base Systerns, Inc. 157
MDBS Data Management System Documentation
(Actually, in the above discussion NO is the name oradata block
pointing to auser variable called NO.)
Every time the data base system is used, an initial ization process
must take place at the beginning of execution. Th "i sisha""id-led via
the OPEN command. Wi th the possible except-ion OÍ the DE: FIF'IE arid
EXTEND commands ,the OPEN command must be t.h efirst FML command
executed each time MDBS.DMS system is used. The formal". of" the c·omrnaríd
iS:
EC) =CALL (AO, "OPEb', OPFNLÍST")
.—
OPENLIST is adata block pointing to four user v¿2-!"iablQs. In bh i";
case the four variables must be character strings cont.z-inir.g:
1.The data base name ,for example:
F$ ="CUSTOMER "'m
2.The user"s r.ame, for example:
"
N$ ="GEORGE SHELL"
3.The user "s password, tor example: ».<'
PG ="IGLOO "
4.The data base access status, for example:
S$ ="MODIFY"
--.
Th isa! lows th euser tomodify (i.e. ,write ontcj) the data
base .Any other string would restrict the us ei" ¿'íj reaC—oríly
"-.~
mode.
,%,
At the beginning of execution of MDBS.DMS, all currency indicators
are initialized. Execution of" the OPEN command has th cZ f"ollowing Ky
effect: A l lsets which have been defined in the DDL as h'zving SYSTEM
as their owner record—type will have their currency indica"C.or f' or
©COPYRIGHT 1979, 1980, Micro Data Base Systems, 1.nc .158
MDBS Data Management System Documentation
current omjer equivalcmced to SYSTEM .These sets will initially be
the only ones with current owners, and almost al 1DML commands work
with acurrency indicator to obte.in aparticular record. So it can be
seen that the OPEN command and aset with owner- SYSTEM is required to
ge t"afoot i nth edoor" tobeg in fetching orstoring record
occurrences.
Just as OPE6i must be executed as the í7irst DML command, CLOSE must
be executed as the last DML command. CLOSE has no parameters.
Th eowner—member relationships of sets is avery important concept
to understand. In the examples tmt follow, diagrams will be used
similar to those inthe DDL discussion. Fi gure III .D.1isa
representation of set SI having owner SYSTEM and member Aand setS2
having owner Aan d member B. (In all future diagrams, the topmost
record—type is assumed to have SYSTEM as the owner, a:nc! th ebo xfor
th eSYSTEM record—type will n o tbedrawn .)Th elines in these
diagrams indicate th eowner—member relation ortwe record—types.
Remember t. ha tFigure III.D. 1represents record types; Figure III.D.2
gives an example c) rrecord occurrences. (Fut: ur'e examples wi II
illustrate on! ytF. erecord—type; therecord occurrences will be
implicit.. )
Retrieving records i sdone through current owner—member
combinations. Th 2OPEN command wi l1set SYSTEM to be the current
owner of set SI in Figure III.D.Z. Since set SI has acurrent owner ,
itis a!lowable (and possible) to f"ind amember record occurrence (or
member) of" set Sí. The method ordoing this wi lIbedie-cussed
©COPYRIGHT 1979, 1980, Micro Data Base Systems, 1"nc. 159
e
MDBS Data Management System Documentation
shortly. Once amember OÍ" Sí is Í"ound, the DMS will denota it to be
the current member ol" SI .Other commands \a' i!Iallow us ndw to
retrieve the data from the record (the item occurrtmces c·r fields) .
So tar, set SI has acurrent owner and acurrent. ñ?.émj>em These are
the only currency indicators trlat have been set. Currency indica'l".ors
í" or set S2 .are still null. (Currency indicators for "current of
record type" are set by certain commands. These cortímands wi! }not. be
used inexamples presented here, ar) dtheref"'or"e changes in t7íe.se
currency indicators wit lnot be mentioned in the examples. Th eusctr
wi li learn th eus eor these through experience in writing !"oUt.ir,e3
with DML commaríds. )
At this point there is no way of) fetching any member" records of set
S2 (that is,occurrences of" record—type E).There is acommand,
though, which wi 1lset. the current member or set SE. to be the 2urrent
owner otS2 ( SOM) .So now we have f'ound. the 1ink t:hat atté!.: ch{±'3 an
occurrence of Ato the related occurrences of E?. SiricÉ S2 now }"j as a
current owner, then members ofS2 (B) may be searched 'thrcn.:,gh tcj
locate and define acurrent. member, which in turn alio'.7js u-s t^fetch
the data fTom the particular occurrence of" B that is cur'rent.
Example: The data base has been opened, setting acurrent owner Tor
set SI. We desire the data from B4. We f"irst search through member
y
records of SI to find A2 (which is automaticaCy set to be the current
member of SI). Then we set the current member of SI tc be the current
owner of S2 (make A2 the current owner of SZ) .We now sQ2-rch ti,rougn
member records of S2 to find B'i and execute acomrna: ^A i.o get aÍ":ield
(i') COPYRIGHT 1979, !980, Micro Data Base Systems, Tyjc. if\O
MDBS Data Management System Documentation
from the current member of S2.
iTh eset structure of adata base can be thought of" a3 anetwork of"
record—types with one or mor e wa ys of' getting to a record—type.
Getting toarecord occurrence is amatter of' chaining through the
structure, finding amember of" ore set, making it th eowner orth e
next set ,finding amember of" that set and making it the owner of the
next set, on down the line until the set havin¿; the desired record—
type as amember is reached. Then after one more search through that
last set- the data is ready to be r'etrieved. A
Figure III .D. 3shows two paths to reach record—type F.On epath
involves finding members and setting owners through sets SI. ,S3 ,S4 ,
and S= .The other pat-h is through sets SI, S2 and S7. The 'iser need
notbeconcerned ab ou': oosmible interactions between t.h= currency
indicators of" these sets —— once currency indicators ar eset,they
remain until they are changed; setting the currency indicators of" one
set does not affect those oÍ" another set. Ifthe Sl-S2-i'7 path is
chosen to fetch an occurrence of" F, the user can then easily i^etc?i an
oecurr'ence of" Ethat is related to the current. record occurrence of"
S2 .Th isisdon ebysetting the current member of' S2 to be the
current owner oÍ S6 (it is already the current owner" of" S7) .
f9 COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 161
MDBS Data Management System Documentation
SI
A
S2
B
FIGURE III.D.1
si AA
Al A2
-
l
'S2
BB
B3 !34
S2
El El
Bi B2
FIGURE III.D.2
E) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 1132
MDBS Data Mana<ement System Documentation
SI
A
l l
l
l
S2 i'S3
i
DB
ill
i!
)
l
,
i
,
l
lSÁ
)l
:36 S7 C
lI
)
l
l:'
l'
lS5
E!F
,l
I
FIGURE III.D.3
3COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 163
MDBS Data Management System Documentation
The following lengthy example should clariry not only the us e o r
the DML, but also the design of" the DDL. The actual DML commands will
be given along with explanations. Adetailed description of" each DML
command is given in alater section. The sample :"outiries are written
in BASIC.
We are going to develop asystem to work with odalia bas ei" or a
high school district containing severa! separate schools. We have
decided beforehand what types c'f data wi i l b esaved: school names; """
teacher names an dseniority; student names ,n'müber arte' grade point
average; class titles, room and semester offered; :tiNi t:hegrad 2an d
teacher for each class each student takes. Given thi:-: information it:
is asimple matter to define the record ari ddata—i terns (see Figure
III.D.4).
Th enext step ,to define 'che sets (or how the r·2cord—typec relate —.
to one another) ,is based upon the type of queries t.heü'. wi 1. l b emade
of" th edata base .We will assume that it was decided to limit the ""
queries to the f"ol!owing (refer to Figure III.D.5 while reading this
list):
1.alphabetical list of all schools (handled via set SI)
2.alphabetical list of" all students at apar'ticular school (hand-! ed
via sets SI and S2A)
3.list of all students by student number at aparticular school
(handled via sets SI and S2B)
4.alphabetical list ofallclasses offered at aptmMUcular school
(handled via sets SI and S3)
5.alphabetical list of all teachers at aparticular school (handled
via sets SI and S4)
(É) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 164
MDBS Data Management System Documentation
6.l1st of" classes taught byeach teacher at aparticular school
(.handled via sets SI, S4, ¿njcí S5)
7.list of classes taken by aparticular student- at aparticular
school (handled via sets SI, S2A, S6 and S7)
8.list of all students in each class at aparticular school (handled
via sets Si ,S3, S8 and S6 [not: only can amember be í' oun df" rorn a n
owner ,but an owner can also be round f"rom amc-mberj )
Fi gure III .D. 5 lists th eDDL for th esets. Figure III ,D. 6
illustrates the set structure as defined inth eDDL .Ti-i eeasiest
method of developing the DDL is by drawing the picture first: identify
r
each type of reeQrd, and t-hen dr"aw arrows between the :"ecords showing
what typ eorrecord i sdesired tobe linked from the particular
record—type. Each arrow r€: pre<erlts aset with "the owner at the tal 1
and the member at the head.
We n ow begin programming the desired queries. Ple asmume the data
base is already open and that the following data blocks hav ebeen
defined:
Block Name Variable List
SCHNM S$
SCHOOL S$ .
NAÉ5E N$
NUMBER N
AVERAGE A
NAMET T$
DATA CS ,R. S
DATA2 G
GRADE F
STUDENT P¿':
DATA3 N$ ,!\Í ,A
TITLE LS
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 165
!4DBS Data H°lanagement System Documentation
O1.
1ED =CALL (AO, "FFM, SI" )
2 ED =CAL'- (AO ,"GFM, NAME ,Sí ,SCHKM" )
3PRIÍ'IT =
4ED =CALI- (AO ,"7NM, SI" )
5U' EC) =OTHEN 2
NOTES :
iFind First Member in set SI and make it current-.
2Get Field Mom Member. Get the NAME field from current member of
SI and put it in the BASIC variable S$.
4Find Next Member of" set: G1 and make it current.
5If" ED is 255, t-he end of" the set has beeri reached, signifying th e
last school has been processed.
OZ.
1ED =CALL (AO, "FRISK, SI ,SCHOOL" )_
2IF ED =DTHEIJ 6
3í7 ED <255 THEN 500
4PRINT "SCHOOL NAME NOT FOUND "
5GOTO 500
6EC) =CALL (AO, "SOld, S2A ,S1")
7EC =CALL (AO, "GFM, NAME ,S2A ,NAME" )
8ED =CALL (AO, "GF!VÍ, NUMBER ,S2A ,NUMBER" )
9 FO =CALL (AO ,"GFM ,GPA ,S2A ,A'/ERAGE" )
10 PRINT í\jS, N, A
11 ED =CALL (AO, "FNM, S2A ")
12 IF ED =C) THEN 7
NOTES :
1Find Member" Based on Sort Key. Search through set SI looking f"or
NAME equal to value of SZÁ The NAME f"ield was identified as the sort
key in the DDL. When found, make the record the current member cjr Si .
2IfEC isnon—zero, some error was encountered, mo st likely
indic: zt.ing aSC}"lc)ol with tíie d+sired name was not found.
3 Se tOwner Based on Member. Make the current member of SI the
ci-'.rrent owner of" G2A. Wo hzive locked ont.o aparticular" school; we now
@COPYRIGHT 1979, 1980, Micro Dat.a Base Systems, Inc .166
MDBS Data Management System Documentation
link to the students at that school. The first member of S2A is
automatically set by this command to be the current member of S2A.
O3.
1ED =CALL (AO, "SOM, S2B ,S1")
2ED =CALL (AO, "FFM, S2B ")
3 ED =CALL (AO, "GFM, NAME,S2B ,NAME")
4 ED =CALL (AO, "GFM, NUMBER,S2B ,N'JMBER")
5ED =CALL (AO, "GFM, GPA ,S2B ,AVÉRÁGF")
"6PRINT N$, N, A
7 ED =CALL (AO, "FNM, S2B")
8IF ED =OTHEN 3
NOTES:
1We have already set the current member of Si írom aprevious
query.
O4.
Similar to 3.
O5.
—-
Similar to 3.
O6.
_1ED =CALL (AO, "FMSK, S1,SCHOOL")
2ED =CALL (AO, "SOM, S4,S1")
3EC) =CALL (AO, "FV.SK, S4,NAMET")
4 ED =CALL (AO, "SOM, S5,S4")
"5ED =CALL (AO, "GETM, S5,DATA")
6PRINT C$, R, S
7ED =CALL (AO, "FNM, S5")
—8IF EO =OTHEN 5
iNOTES:
1Find the school.
2Link that school to its teachers.
3Find the teacher's record. Here, N$ is assumed to be astring of
_up to 20 characters as defined in the DDL.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 167
—-
MDBS Data Management System Documentation
4Link that teacher to the classes he teaches. Again, the first
member of S5 is made the current member.
5GET Data from Current Member. This replaces the three GFM's that
would have .been necessary to Mteh the rie|ds from the record. GETM
will fetch all the fields from the current member of" S5 and place them
into the variables C$, Rand Sas defined by the Data Bloclrs. _
o7á
1ED =CALL (AO, "FMSK, S1,SCHOOL")
2ED =CALL (AO, "SCN, S2A ,S1")
3ED =CALL (AO, "FRISK, S2A ,NAME") "
4ED =CALL (AO, "GFM, NAME,S2A, NAME")
5ED =ctiLL (AO, "GFM, NUMBER, S2A ,NUÉ4BER")
6ED =CALL (AO, "GFM, GPA ,S2A ,AVERAGE") —
7PRINT N$, N, A
8ED =CALL (AO, "SOM, S6, S2A ")
9ED =CALL (AO, "GETM, S6, GRADE") _
10 PRINT G
11 ED =CALL (AO, "SMM, S7, S6")
12 ED =CALL (AO, "GETO, S7, DATA")
13 PRINT C$, R, S_
14 ED =CALL (AO, "FÑÉ/Í, S6")
15 IF EC) =OTHEN 9
NOTES:
1Find the school.
2Link to students.
3Find the student. "
4Get the data.
~~h
8Link the student to his classes.
9Fetch the grade.
11 Link to classes.
12 Fetch class title, room, semester. —
14 Find the next class the student has taken.
~
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 16i3 "
#W§ EMS M&Nsg€#©Ñt Sy§tÁg% D©©uR©Ft&ti©R
Mc
Thís ©8T9 t© 4@v§j©p©d Sjñ9% U§ pHme£pj©s &mmctrated in 7. The
§©Ñ$WMÁ Mt4 will E7# =MM E© 2imk b&ek%#rds thrmígh gét se.
Wé§f b©w a9Mmpk t© M4 @ñ@w studmt who has taken severa! eourses.
iE9 uCALL (A©, "9EA$K, S1,$CHOOL")
2EC) *CALL (AO, "3QM, S2A ,$1")
3E¢i *CALL (AC), "SCM, S2B ,$1")
4El) »CALL (AG, "MM, $3,$1")
®E9 *CALL (AO, "FMSK, F2A ,STUDENT")
6 iP Etj *OTHEW 1¢)
7E9 sCALL (AO, "CRZ, STUDENT, DATA3")
gEO %CALL (A¢l, "AMS, STUDENT ,S2A")
gE9 *CALL (AO, "AMS, STUDENT ,S2B")
it) Etj *CALL (AO, "COM, C3B, S2A")
Ñegeat the lblKwing r©r smh ©lr tMi stucíen> classes:
r~
ii ED *CALL (AD, "FMSK, S3, TITLE")
12 IF E¢l gOTHEN 900
1& EC) *CALL (AC), "CRS, SCLASS, GRADE")
i4 E¢J %CALL (AC), "AMS, 6'CLA3$, Sé")
19 EQ %CALL (AO, "AMS, CLAS3, S7")
FKJT99 9N AÉKJVE EXAMPLE:
©@@é if §Eud€Rt already @xi§É§,
7©reatm añ@w ©éGüM§TW@ ©t' ree0rd=Eyp@ STUDENT and store the
§ÉídÁ@HÉ'§ name, ríumbcr anei grails palnt avarage,
@EM MembeF Eg .E3pE, Add Ehe newly created record occurrence to set
@@A, piaeing iE irí aIphab@uelal Qrd@r as indicated in the DDL.
gAdd Che r@e@rd ©eeurr@Yí@@ Eg s@t S23, also, ylacing it in numerical
@FEÁÉ9F,
!0 Link the ñgw §EudenE r@@Qrd to his e!assem or whXh there are
eurrently nene, "$29" é©üíd have been used in place Dr "S2A",
©COPYRIGKT 1979, 1980, Micro Data Base Systems, Inc. 169
MDBS Data Management System. Documentation
achieving the same result.
11 See if" the course exists.
When removing data from the data base, the user must be very
careful. Read about the DRM and the RMS commands. When arecord. is
deleted, it is actually lost such that it can never be recovered. On
the other hand, when amember is removed fí"om aset, only the linkage -..
between the implied owner and member is lost. This is important when
arecord is amember of multiple sets.
~
">-
0W*
m~..
..
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 170
MDBS Data Management System Documentation
RECORD SCHOOL ALL SCHOOLS
ITEM NAME CHAR 10 N&ÑÉ OF SCHOOL
RECORD TEACHER ALL TEACHERS
ITEM NAME CHAR 20 TEACHER NAME
ITEM SENIORTY INT 8SEK'IORITY
RECORD STUDENT ALL STUDENTS
ITEM NAME CHAR 20 STUDENT NAME
ITEM NUMBER INT 8 STUDENT NUMBER
TTEÉA GPA REAL 8 GRADE POINT AVERAGE
RECORD CLASS ALL CLASSES OFFERED
ITEM TITLE CHAR 30 COURSE TITLE
ITEM ROOM INT 8ROOM NUMBER
ITEM SEMESTER INT 8 SEMESTER OFFERED
RECORD SCLASS STUDENT"S CLASSES
ITEM GRADE INT 8GRADE RECEIVED
FIGURE IíI.D.4
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 171
MDBS Data Management System Documentation
SET SI AUTO 1:N Schools sorted by name
SORT NAME
OWNER SYSTEM
MEMBER SCHOOL
SET S2A MAN 1:N Students sorted by name
SORT NAME
OWNER SCHOOL
MEMBER STUDENT
SET S2B MAN 1:N Students sorted by number
SORT NUMBER
OWNER SCHOOL
MEMBER STUDENT
SET S3 MAN 1:N Classes offered by aschool
SORT TITLE
OWNER SCHOOL
MEMBER CLASS
SET S4 MAN 1:N Teachers in aschool
SORT NAME
OWNER SCHOOL
MEMBER TEACHER
SET S5 MAN 1:N Teachers teach classee
FIFO
CMNER TEACHER ""
MEMBER CLASS
SET S6 MAN 1:N Students take classes
FIFO
OWNER STUDENT
MEMBER SCLASS
SET S7 MAN Í:NClasses consist of students
IMMAT
OWNER CLASS
MEMBER SCLASS
FIGURE III.D.5
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 172
MDBS Data Management System Documentation
p31
schooll
name
s2a
s4 s2b
l
teacher student
l i
name name
seniorty number
?gpa
s3 s6
sclass
l
s5 grade
s7
classl
title l
room
semester
figure iii.d.6
©COPYRIGHT 1979, 1980, Nlicro Data Base Systems, Inc. 173
MDBS Data Management System Documentation
2. Calling Procedures
MDBS.DMS routines can be called from either machine language
routines or from higher level languages such as BASIC, FORTRAN, COBOL,
PASCAL, PL/I, etc. While the machine language calls result in a
faster more efficient usage of the DMS package, calliríg from ahigher
level language simp!iries programmer tasks and results in aquick and _
easily programmed data base application.
a. Calls from Machine Language Routines.
Machine language callable forms of" MDBS.DMG use calling conventions
that are afunction OÍ" the CPU. These are discussed in detail in the
appropriate system specific manual.
b. Calls From Higher Level Languages
Acall to aDML routine from ahigher level language (such as
BASIC) will look (generically) like:
EO =CALL (A, "routine name, arguments", host language arguments)
where:
AADMS entry point address
Routine name Name of aDML routine
Arguments Alist of arguments, separated by
commas, giving item, record, set or
data block names as required by the
DML routines.
Host language arguments Host language variables separated by
commas. These are used only in the
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 174
A
MDBS Data Management System Doeumentation
·¶
t.
N" DEFINE and EXTEND DML commands.
"ED Represents aprogram variable where
astatus value is returned.
The exact rorm of" host language calls on your system is given in the
—system specific manual.
Apowerful feature of the Data Management System is the usage of"
data blocks. Adata block is anamed collection oí" host language
_variables. Agiven variable may participate in more than one data
block.
As an illustration, consider the following record type that may
"appear in an order processing system:
RECORD CUSTOMER
ITEM NAME CHAR 16
ITEM STREET CHAR 16
ITEM CITY CHAR 16
"ITEM STATE CHAR 2
ITEM ZIPCODE CHAR 5
ITEM CREDLIM REAL 8
ITEM LASTSIZE REAL 8
_We wish to store the customer"s name, address, credit limit, and size
of the last purchase.
.
-—
ABASIC user can issue the f"ollowing cal! to DMS:
-- EC) =CALL (Al, "DEFINE, DETAIL", N$, S$, C$, T$, Z$, C, S)
which will deline adata block named DETAIL having variables N$, S$,
m~
'C$, T$, Z$, Cand S. Whenever the data block DETAIL is ref"erred after
this definition, its variables will either receive (supply) values
:from (to) the data base. For example, to get data from the current
_customer reeord we would use:
'©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 175
,
$
i
,
MDBS Data Management System Documentation
ED =CALL (AO, "GETR, CUSTOMER, DETAIL") ""
and this has the effect of retrieving the contents or the eurrent
customer record and saving the contents of each customer field in the
associated host language variable. Likewise, acall to Create a
record and store data:
ED =CALL (A0,"CRS, CUSTOMER, DETAIL") ·"
will store the contents or eaeh variable in the corresponding record
Q~d
field.
~
In many cases it is eonvenient to let the MDBS.DMS system select a
def"ault data block name by omitting the data block name parameter in ~
the call statement:
ED =CALL (A0,"CRS, CUSTOMER") _
In this ease, adata block name or CUSTOMER will be used. If the
command specified is arecord-oriented command (CRS, GETX, PUTX), the
record name is used as the def'ault data block name. If the command is —
an item—oriented command (GFX, SFx), the item name is used as athe
default data block name.
~
m
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 176 _
MDBS Data Management System Documentation
3. Data Management System Routines
OMS ERRORS
Error Explanation
01 Data Base not open
02 Invalid set—type
03 Invalid record—type
04 Invalid item—type for this record—type
05 Inval id owner—type tor this set—type
06 Inva.l id member—type for this set—type
07 Invalid data base key
08 No current owner of set—type
09 No current member oÍ" set—type
10 No current of record—type
11 Reeord already member of set
12 Record not member of' set
13 Depending on item ttjO .large or negative
14 Data Base already open
15 Data Base not closed previously
1E3 No current of run unit
17 No more space in Data Base
18 Set not sorted
19 Depending-on item not binary with size 2or it is arep2icated
item
20 A reeord type cannot have more than 1variable length item
24 Du.pl icate name specified
26 Sole owner/member may r.ot be deleted
27 Depending item or sort key may riot be delet.ed
28 Invalid set Qh,arac't.r=ri£t.ics.
29 System—owned set cannot have other owners
32 Data B&sg± opened Í"'or read access only
33 Record size too large
34 Invalid number
36 Improper password
40 Maximum value of" depending on item is 32767
41 Binary number tc'o large
89 Variable. Length inconsistency
90 No sueh DMS routine
91 Insuf"f"icient room in memory
_92 Incorrect number of" arguments
93 Duplicate data—block name
94 Block name not found
9¶ Invalid data block name
96 Inval id number of arguments
97 Cannot read From data bénse füles
98 Record occurrence(s) lost
"" 99 Catastrophe
10 OUser may not read this record
101 User may not write this record
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 177
MOBS Data Management System Documentation
102 User may not read this item
103 User may not write this item
104 Disk in wrong drive
105 Disk read or write error
1Oi3 Cannot expand file for new page
107 File not present
108 User may not read this set
109 User may not write this set
110 Access levels inconsistent
111 Syntax error in command line
255 End—of—set or end of' specification
-
--
—
jg COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 178
MDBS Data Management System Documentation
Add Current of run unit to Set ACS
ED =CALL (AO, "ACS, set—type")
Arguments:
set—type( input)
Currency Indicators Involved:
current. of run unit(input)
current owner of" set—type( input)
current member of' set—type(input)
current. member ot" set—type(output.)
Description:
The current record OÍ" the run unit is added to the s e t
occurrence identified by the current owner oí" that: set.
Th eposition of" the new member in the set is determined
by the ordering criteria given in the IJDL Set Description for
tb egiven set-type. If the set has been defined áÁ3 aN: 1or
N: M set the position of" the current owíner wi th respect to
other owners oí" th emember record occurrence is determined
similarly.
The new member becomes the current member of" the given
set—type .
Errors:
O 1 .data base not open
C)2 .invalid set—type
06 .invalid member type fújr this set—type
08 .no current owner of" set—type
11 .record already member of set
16 .no current of run unit
17 .no more space in Data Base
90 .no such DMS routine
99 .catastrophe
1 O 5.disk read or write error
106 .cannot expand ti le for new page
109 .user may not write this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 179
MDBS Data Management System Documentation .--
Add Member t-o Set AMS
ED =CALL (AO, "AMS, record—type, set-type")
Arguments:
record-type(inpu.t)
set—type(input)
Currency Indicators Involved:
current of record—type(input) """
current owner of set--type(input)
current member of set—type(input)
—-
current member OÍ" set—type(output-)
ourrent Qí" run unit(output)
Description:
The current record of the given record—type is added to
the set occurrence identified by the current owner of" that
set. ·
The position of the new member in the set is determined
by the ordering criteria given in the DDL Set Description for
the given set—type. If the set has been dt'tined as aN: Mor a.-..
N: lset the Dosition of the current owner with respect to
other owners of the member record occurrence is determined
similarly.
The new member becomes the current member of" the given
set—type.
Errors:
01. data base not open
02. invalid set—type
03. invalid record-type
06. invalid member type for this set—type
08. no current owner of set—type
10. no current of record—type
11. record already member of qet
17. no more space in Data Base
90. no such DMS routine
99. catastrophe
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 180
—.
MDBS Data Management System Documentation
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for" new page
107. tile not present
109. user may not write this set.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Ine. 181
MDBS Data Management System Documentation
Check Current of" run unit Type CCT
ED =CALL (AO, "CCT, record-type")
Arguments:
record—type(input) "
Currency Indicators Involved:
current of run unit(input.)
Description:
The record—type of" the current record of the run unit is
compared to the given record—type. If the current type is
equal to the given record—type, ED =O. If the current type
is not equal to the gi'/en record—type, EC) =3.
Errors: ..,
01. data base not open
03. invalid record—type
16. no current of" run unit
90. no such DMS routine
99. catastrophe
lOó. user may not read this record
104. disk in wrong drive
105. disk read or write error
107. f'i.le not present
(S) COPYRIGHT 1,979, 1980, Micro Data Base Systems, Inc- 182
MDBS Data Management Sys?.e;Q Doclur¶: -t-ation
z-'-'3SE the ,l','.f: abase CLOSE
ED =CALL. (AO, "CLOSE" )
Arguments:
none
Currency Indicators Involved:
not applicable
Description:
This routine must be the last DML comm-and e..·"ecuteci i77
any progra;¡) that uses t-he data base. Otherwiee, tAc-. data base
file will be inconsistent. All buffers are rev,'ritt.c'" ,7,",d t.h e
data base is properly closed.
Errors:
90 .río such DMS routine
9!3 .catastrophe
1JJ4 .disk in wrong drive
105 .disk- read or write error
iCI'7 .íi!e not present
*
©COPYRIGHT 1979, 1980, Micro Data Base Syr:tems, Inc. 183
MDEIS Data Management System Documentation
Check current Member Type CMT
ED =CALL (AO, "CMT, record-type, set-type")
Arguments:
record—type(input)
set—type(input)
Currency Indicators Involved:
current member of set—type(input)
Description:
The record—type of the current member of" the given set—
type is compared to the given record—type. Ir the current
member—type is equal to the given record—type, EC) =C). if" the
current member—type is not equal to the given record—type, ED
=3.
Errors:
01. data base not open
02. invalid set—type
03. invalid record—type
09. no current member of" set—type
90. no such OMS routine
99. catastrophe
IM. disk in wrong drive
105. disk read or write error
197. file not present
iO8. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 184
MDBS Data Management System Documentation
Check current Owner Type COT
··
ED =CALL (AO, "COT, record-type, set—type")
Arguments:
·— record—type(input)
set—type(input)
Currency Indicators Involved:
current owner' of set—type(input)
Description:
The record—type of the current owner of the given set—
type is compared to the given record—type. IF the current
owner—type is equal to the given record—type, ED =O. If' the
current owner—type is not equal to the given record-type, ED =
3.
Errors:
01. data base not open
OZ. invalid set—type
03. invalid record—type
08. no current owner of" set—type
""" 90. no such DMS routine
99. catastrophe
104. disk in wrong drive
-- 105. disk read or write error
107. tile not present
108. user may not read this set
.~ ^
-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 185
MDBS Data Management System Doeumentation
Create Record CR
ED =CALL (AO, "CR, record-type")
Arguments:
record-type(input)
Currency Indicators Involved:
current of" record—type(output)
current oÍ" run unit(output)
Description:
Space is allocated in the data base tor an instance of"
the given record—type. The amount oÍ" space allocated is equal
to the maximum size the record can be.
No items are initialized; i.e., the contents of all
items in this record are garbage until set..
—..
The new record becomee the current record of" the given
record—type.
If the record has been declared to be amember of an
AUTO set, and ir that set has acurrent Qwñt21" defined, the
record is added to the set via an automU: ic call to the AMS
routine. _
Errors:
01. data base not open
03. invalid record—type
17. no more space in data base
33. record size too large
90. no such DMS routine
99. catastrophe
101. user may not write this record
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for new page
107. file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 186
MDBS Data Management System Documentation
Create Record and Store data CRS
ED =CALL (AO, "CRS, record-type, data-block")
Arguments:
record—type(input)
data—block(input)
Currency Indicators Involved:
current record of" record—type(output)
current of run ur.it(output)
Description:
Anew record or the given record—type is created and
initialized with the given data—block. The data—block is
assumed to be in the same order as the items in the DDL for
the given record—type.
There is no check made that variables in the data—block
are of" the right type or size. These checks are solely the
responsibility or the applications programmer.
II" any item—type in the given record—type is adepending
item, the location of" the depended on item is assumed to
contain the correct value to determine the number of instances
of the depending on item to store.
-- If" the record has been declared to be amember of" an
AUTO set, and if that set has acurrent owner defined, the
record is added to the set via an automatic call to the AMS
routine.
Errors:
01. data base not open
03. invalid record—type
13. depended on item too large or negative
17. no more space in data base
33. record size too large
40. maximum val-tie of" depending on item is 32768
89. variable length inconsistency
90. no such DMS routine
94. block name not found
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 187
MDBS Data Management System Documentation
-'~
95. invalid data block name
96. invalid number of arguments
99. catastrophe
101. user may not write this record
103. user may not write this item
105. disk read or write error
106. cannot expand rix for new page
107. file not present
·—Y
,
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 188
MOBS Data Management System Documentation
DEFINE adata block DEFINE
.
ED =CALL (Al, "DEFINE, data-block", hlv)
Arguments:
data—block name (input)
hlv —host language variables (input)
Currency Indicators Involved:
none
Description:
Adata block with the user speciried name is created and
the indicated host language variables are associated with the
data block.
Errors:
01. data base not open
90. no such DMS routine
91. insuf"ficient room in memory
92. incorrect number of" arguments
93. duplicate data block name
95. invalid data block name
""" 96. invalid number of" arguments
99. catastrophe
·Notes:
1. Al is the address of" the entry to the DMS for the
"" DEFINE and EXTEND DML commandm
2. The hlv list contains at least one variable name
(constants are not allowed) and, if" there is more
'"- than one variable, the variables are separated by
commas.
3. Agiven host language variable can appear in more
than one data block.
4. Any host language variable can appear more than once
in adata block.
5. DEFINE can be called betore or after an OPEN.
—--
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 189
MDBS Data Management System Documentation
Delete Record based on Current of run unit DRC
ED =CALL (AO, "DRC")
Arguments:
Currency Indicators Involved:
current of run unit(input)
all indicators referencing the specitied record (output)
Description:
The record identified by the current of the run unit is ,
logically and physically deleted from the dat-a base.
For all sets cjí^ which the record to be deleted is an
owner, t-he qet occurrence is deleted.
For ali sets of which the record t.o be delet.ed is a
member, the record is removed from the set, i.e., the previous
member is linked to the next member relative to the deleted
member.
For all set—types ot which the deleted record was the
current owner, the current owner and current member currency
indicators are set to null.
For all set—types of which the deleted record was the
current member, the currency indicator of" the member is set to
null. (Note that it is possible to reach the end OÍ" the set
thi.s way without it being indicated via ED).
If the deleted record was the current of i.ts record—
type, the currency indicator of that record—type is met to
null.
Additionally, the currency indicator of the run unit is
set to null.
Errors:
01. data base not open
02. invalid set—type
©COPYRIGHT 19'79, 1980, Micro Data Base Systems, Inc. 190
MDBS Data Management System Documentation
16. no current of run unit
90. no such DMS routine
99. catastrophe
101. user may not write this record
104. disk in wrong drive
105. disk read or write error
107. file riot present
0
m
©COPYRIGHT 1979, 1980, Micro Dat.a Base Systems, Inc. 191
MDBS Data Management System Documentation
Del ete Record based on current Member DRM
ED =CALL (AO, "DRM, set-type")
Arguments :
set--type(input)
Currency Indicators Involved:
current member oí^ set"-type(input)
al l indicators referencing the specified. recmrd (output)
Description:
The record identiried by the current member of the set—
type islogically and physically deleted f'rom the data base.
For all sets of which the record tc bedeleted isan
owner, the set occurrenc= is deleted.
Fo rallsets or which t.he record to be deleted is a
member ,the record is removed f"rom the set., i.e. , the previous
member isIinked to the next member re lative to the deleted
member. -
For all set—types of" which the deleted record was th e
current owner ,the current owner and current metnber currency
indicators are set to null.
For al! set—types of" which the deleted record was th e
current member, the currency indicator of the member is set to
null .(Note that it is possible to reach the end of th e s e t
this way without it bei.ng indicated via ED).
I r the deleted record was the current of" its record—
type ,the currency indicator of that record—t-ype iC. s e tto
nu! I.
Irth edeleted record was the curr'mt of" the run unit ,
the current of" the run unit is set to null.
Errors:
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 192
MDBS Data Management System Documentation
01. data base not open
OZ. invalid set—type
09. no current member of set—type
90. no such OMS routine
99. catastr'ophe
101. user may not write this record
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 193
MDBS Data Management System Documentation
Delete Record based on current Owner DRO
-
ED =CALL (AO, "DRO, set-type")
N""¶
Arguments:
set—type(input) -"-'
mwm
Currency Indicators Involved:
current owner or set—type(input) .rNmµ
all indicators referencing the specified record (output)
.
Description:
The reeord identified by the current owner of the set—
type is logically and physically deleted trom the data base.
For all sets of which the record to be deleted is an
owner, the set occurrence is deleted. _
For all sets of" which the record to be deleted is a
member, the record is removed from the set, i.e., the previous
member is linked to the next member relative to the deleted
member.
For all set—types or which the deleted record was the "
current owner, the current owner and current member currency
indicators are set to null.
For all set—types of which the deleted record was the
current member, the currency indicator or the member is set to
null. (Note that it is possible to reach the end of" the set
this way without it being indicated via ED). "
If the deleted record was the current of its record—
type, the current of" that record—type is set to null.
If the deleted record was the current or the run unit,
the currency indicator or the current of" run uriit is set to
null.
""
Errors:
01. data base not open
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 194
.
MDBS Data Management System Documentation
OZ. invalid set—type
08. no current owner oÍ" set—type
90. no such OMS routine
99. catastrophe
101. user may not write this record
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 195
MDBS Data Management System Documentation ,
Delete Record based on current Record DRR
+
ED =CALL (AO, "DRR, record-type")
Arguments:
record—type(input) .—
Currency Indicators Involved: "
current of" record—type(input)
all indicators reí"erencing the specifáed record (output)
Description:
The record identified by the current or the record—type
+.e
is logIcalIy and physically deleted f"rom the data base.
For all sets of" which the record to be deleted is an
owner, the set occurrence is deleted. —'
For all sets of which the record to be deleted is a
member, the record is removed from the set, i.e., the previous
member is linked to the next member relative to the deleted
member.
For all set—types of which the deleted record was the "
current owner, the current owner and current member currency
indicators are set to null. .
For all set—types of" which the deleted record was the
current member, the currency indicator of the member is set to
null. (Note that it is possible to reach the end of the set
this way without it being indicated via EO). "
If the deleted record was the current of" its record—
type, the currency indicator of" that record—type is set to
null.
If the deleted record was the current of the run unit, ,-_
the currency indicator of the current of" run unit is set to
null.
Errors:
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 196
—-
MDBS Data Management System Documentation
01. data base not open
03. invalid record—type
10. no current of" record—type
90. no such OMS routine
99. catastrophe
101. user may not write this record
104. disk in wrong drive
105. disk read or write error
107. file not pr'^sent
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 197
MDBS Data Management System Documentation
EXTEND adata block EXTEND
ED =CALL (Al, "EXTEND, data-block", hlv)
,
Arguments:
data block name (input) --
hlv —host language variables (input)
Currency Indicators Involved: "
none .
Description:
This routine adds more host language variables to an
already defined data—block. This is useful if the size of" a
host language line of text is too limited. m~
Errors: 90. no such OMS routine —
91. insuÍYicient room in memory
92. incorrect number of arguments
94. data block name not found
95. invalid data block name
96. invalid number of" arguments
99. catastrophe
Notes: .
1. An EXTEND call for agiven block must follow either
another EXTEND call for that block or the DEFINE
cal! for that block. Other EXTEND or DEFINE calls
cannot be intermixed. "
2. The call:
ED =CALL (Al, "DEFINE, RX", A, 3, C, D, E, F) —
is equivalent to:
ED =CALL (Al, "DEFINE, RX", A,B,C,D)
ED =CALL (Al, "EXTEND, RX", E, F)
3. The hlv list must contain at least one variable name
(constants are not allowed) and, if' there is more
than one variable, the variables are separated by ""
commas.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 198
MDBS Data Management System Documentation
4. Agiven host language variable can appear in more
than one data block.
5. Ahost language variable can appear more than once in
adata block.
6. EXTEND can be called before or after an OPEN.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 199
MDBS Data Management System DQcumentation
Find First Member FFM
~
ED =CALL (AO, "FFM, set-type")
Arguments:
set—type(input) —
·'mRlh
Currency Indicators Involved:
current owner of) set—type(input)
current member or set-type(output)
current of run unit(output)
Description:
The first member of7 the given set—type is made the
current member of" that set—type.
If the set contains no members, ED is set to 255.
Errors:
01. data base not open
02. invalid set—type
08. no current owner of" set—type "
90. no such DMS routine
99. catastrophe
104. disk in wrong drive —
105. disk read or write error
107. file not present
108. user may not read this set
255. end—of—set
.
,
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 200
MDBS Data Management System Documentation
Find First Owner FFO
ED =CALL (AO, "FFO, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current member of set—type(input)
current owner of" set—type(output)
current of run unit(output)
Description:
The f"irst owner of the given set—type is made the
current owner of that set—type.
Errors:
01. data base not open
02. invalid set—type
09. no current member of set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. Í"ile not- present
108. user may not read this set
,
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 201
MDBS Data Management System Documentation
FIND Member FINDM
ED =CALL (AO, "FINDM, item-type, set-type, data-block")
Arguments:
item—type
set-type(input)
data-block(input)
Currency Indicators Involved:
current owner of" set—type(input)
current member of' set—type(output)
current of" run unit(output)
Description:
The current set is searehed for the logically í7irst
member in which the item—type specified has avalue equal to
the value given in the data—block. If" such amember is found,
it is made the current member of the given set—type. If" such
amember is not f"ound, ED is set to 255. —
Errors: —
01. data base not open
02. invalid set-type
08. no current owner of" set—type
90. no such DMS routine
94.. block name not found
96. invalid number of arguments
99. catastrophe
lOó. user may not read this record
102. user may not read this item
104. disk in wrong drive
105. disk read or write error
107. rile not present
108. user may not read this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 202
MDBS Data Management System Documentation
FIND Owner FINDO
ED =CALL (AO, "FINDO, item-type, set-type, data-block")
Arguments:
item-type
set—type(input)
data—block(input)
Currency Indicators Involved:
current member of" set—type(input)
current owner of set—type(output)
current of" run unit(output)
Description:
The current set is searched tor the logically first
owner in which the item—type specified has avalue equal to
the value given in the data—block. If such an owner is fcmnd,
it is made the current owner of the given set—type. If such a
owner is not f"ound, ED is set to 255.
Errors:
Cl. data base not open
OZ. invalid set—type
09. no current member of set—type
90. no such DMS routine
94. block name not found
96. invalid number' of arguments
99. catastrophe
lOó. user may not read this record
102. user may not read this item
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 203
MDBS Data Management System Documentation
Find Last Member FLM
ED =CALL (AO, "FLM, set-type")
Arguments:
set—type(input)
Currency Indicators Involved:
current owner of" set—type(input)
current member of set—type(output)
current of" run unit(output)
Deseriptiorc
The last member of the given set—type is made the
current member of" that set—type.
If the set contains no members, ED is set to 255.
Errors:
01. data base not open
02. invalid set.—type
08. no current owner of set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
í05. disk read or write error
107. file not present
108. user may not read this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 204
MDBS Data Management System Documentation
Find Last Owner FLO
ED =CALL (AO, "FLO, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current member or set—type(input)
current owner of set—type(output)
current or run unit(output)
Description:
The last owner of" the given set—type is made the current.
owner of that set-type.
Errors:
01. data base not open
02. invalid set-type
09. no current member of" set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 205
MOBS Data Management System Documentation
Find Member based on Sort Key FMSK
EC) =CALL (AO, "FMSK, set-type, data-block")
Arguments:
set—type(input)
data—block(input)
..
Currency Indicators Involved:
current owner of" set—type(input)
cur'rent member of set—type(output)
current of" run unit(output)
Description:
The current set is searched fújr the logically Urst
member with asort key value equal to the value given in the
data—block. If such amember is found, it is made the current
member of the given set—type arid the current record of the run
unit. If such amember is not found, EC) is set to 255 and the
current member of the set—type is set to the record logically
prior to t-he requested record. Note that the current cif run
unit is not altered when error 255 is returned.
Errors:
01. data base not open
tj2. invalid set—type
08. no current owner of set—type
90. no such DMS routine
94. block name not found
96. invalid number of" arguments
99. catastrophe
lOó. user may not read this record
102. user may not read this item
104. disk in wrong drive
lOS. disk read or write error
107. file not present
108. user may not read this set
:zsm end-of-set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 206
MDBS Data Management System Documentation
Find Next Member FNM
ED =CALL (AO, "FNM, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current owner of set—type(input)
current member of set—type(input)
current member of set—type(output)
current of" run unit(output)
Description:
The logieally next member cñ the given set—type is made
the current member of" the given set—type.
If' there is no next member (the current member is the
last, or the set is empty) ED is set to 255 and the currency
indicator f"or the current member of the set is not affected.
If" there is no current member oÍ" the given set—type,
then this is the same as FFM.
Errors:
01. data base not oper
OZ. invalid set—type
08. no current owner OÍ" set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 207
MDBS Data Management System Documentation
Find Next Owner FNO
ED =CALL (AC), "FNO, set-type")
Arguments:
set—type(input)
Currency Indicators Involved:
current owner of" set—type(input)
current member of" set—type(input)
current owner ot" set—type(out.put)
current oÍ" run unit(output)
Description:
The logically next owner of" the givem set—type is made
the current owner of" the given set—type.
Ir there is no next owner (the current owner is the
last) EC) is set to 255 and the currency indicator f"or the
current owner of" the set is not affected.
Errors:
01. data base not open
02. invalid set—type
08. no current owner of' set—type
09. río current member of" 3et—t.ype
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
í07. íile not present
108. user may not read this set
255. end—of-set
©COPYRIGHT 1979, 1980, Mic: -o Data Base Systems, Inc. 208
MDBS Data Management System Documentation
Find Owner based on Sort Key FOSK
ED =CALL (AO, "FOSK, set-type, data-block")
Arguments:
set-type(input)
data-b1ock(input)
Currency Indicators Involved:
current member of set—type(input)
c'jrrent owner of set—type(output)
current of" run unit(output)
Description:
The current set is searched ror the logically f"irst
owner with asort key value equal to the value given in t: he
data—block. If" such an owner is found, it is made the current
owner oÍ" the given set—type and the current record of the run
unit. If such aowner is not found, ED is set to 255 and the
current member of" the set-type is set to the record logicajiy
prior to the requested record. Note that the current run unit
is not altered when error 255 is returned.
Errors:
1)1. data base not open
02. invalid set—type
09. no current member of" set—type
90. no such DMS routine
94. block name not found
96. invalid number of" arguments
99. catastrophe
100. user may not read this record
102. user may not read this item
ilj4. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
,255. end—of—set
E) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 203
MDBS Data Management System Documentation
Find Previous Member FPM
ED =CALL (AO, "FPM, set-type")
Arguments:
set—type(input)
Currency Indicators Involved:
current owner of set—type(input)
curr'ent ínernber of' set—tyµe(input)
current rríetr.ber oí" set—type(output)
current cif run unit(output.)
Description:
The logically previous member or the given set—type is
made the current member of" the given set—type.
TÍ" there is no previous member (the current member" is
t.he first, or the set is empty) ED is get to 255 and the
currency indicator for the current member of the set is nct
affected.
If" there is no current member oí" the giver. set—type,
then this is the same as FLA.
Errors:
Oí. data base not open
OZ. invalid set-type
08. no current owner OÍ" set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
1D8. user may not read this set
255. end—of—set.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 210
MDBS Data Management System Documentation
Find Previous Owner FPO
ED =CALL (AO, "FPO, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current owner of" set—type(input)
current member of set—type(input)
current owner or set--type(output)
current of run unit(output)
Description:
The logi<: aliy previous owner or the given set—type is
made the current owner of" the given set—type.
If' there is no previous owner (the current owner is the
first) EO is set to 255 and the currency indicator for the
current owner oÍ" the set is not affected.
Errors:
01. data base not open
C2. invalid set.—type
08. no current owner or set—type
09. no current member of" set—type
90. no such DMS routine
99. catastrophe
104. disk ir. wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
255. end—of—set.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 211
MDBS Data Management System Documentation
GET data from Current of run unit GETC
ED =CALL (AO, "GETC, data-block")
Arguments:
data—block(outputj
Currency Indicators involved:
current of" run unit(input)
Description:
The value of" all items associated with the current
record of the run unit are returned in the data—block. The
values are returned in the same order" as the items in the DDL
for the given record—type.
There is no cheek made that variables in the data--block
are of" the right type or size.
Errors:
01. data base not open
16. no current of run unit
90. no such DMS routine
94. block name not found
95. invalid data block name
913. invalid number OÍ" arguments
99. catastrophe
100. user may not read this record
102. user may not read this itein
104. disk in wrong drive
105. disk read or write error
107. file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 212
MDBS Data Management System Documentation
GET data Í"rom current Member GETM
ED =CALL (AO, "GETM, set—type, data—block")
Arguments:
set—type(input)
data—block(output)
Currency Indicators Involved:
current owner of set—type(input)
current member OÍ" set—type(input)
Description:
The value of all items associated with the current
member of the set—type are returned in the data—block. The
values are returned in the smme order as the items in the DDL
tor the given record—type.
There is no check made that the variables in the data—
block are of" the correct type or "Fize. These cheeks are
solely the responsibility of' the applications programmer.
Errors:
01. data base not open
02. invalid set—type
08. no current owner ot set—type
09. no eurrent member of set—type
90. no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of" arguments
99. catastrophe
lOó. user may not read this record
1C)2. user may not read this item
104. disk in wrong drive
105. disk read or write error
107. file not present
i08. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 213
MDBS !Jata Manag2-ment System Documentati on
GET data from current Owner GETO
ED =CALL (AO. "GETO, set—type, data—bloek")
Arguments:
set—t,ype( i.nput)
data—bl ock(output )
Currency Indicator's Involved:
current owner of' set—type( input)
Description:
The value of" al! items associated with the current owner
o[th eset—type are returned in the data—block. The values
are returned in the same order as the items ir. the DDL íújr" the
given record_type.
There is no check made that the variables in the data—
block are of" the correct t. yp e o rsize. These checks ar"e
solely the responsibi lity or the applications programmer.
ErrDrs:
Oi.da'ia base not open
OZ .invalid set-type
08 .no current owner of" set.—type
90 .no such DMS routine
94 .block rame not found
95 .invalid data block name
96 .inval id number of arguments
99 .catastrophe
lOó .user may not read this record
102 .user may not read this item
104 .disk in wrong drive
105 .disk read or write error
107 .file not present
108 .user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 214
MDBS Data Management System Documentation
GET data Í"rom current Record GETR
ED =CALL (AO, "GETR, record-type, data-block")
Arguments:
record—type(input)
dat.a—block(output)
Currency Indicators Involved:
current of" record—type(input)
Description:
The value of all items associated with the current of
the specified record type are returned in the data—block. The
values are returned in the 3ame order as the items in the DDL.
tor the given record—type.
There is no check made that the variables in the data—
block are of" the correct type or size. These checks are
solely the responsibility of the applications programmer.
Errors:
01. data base not open
03. invalid record—type
10. no current of" record—type
90. no such OMS routine
94. block name not found
9". invalid data block name
96. irnialid number of" arguments
99. cat.astrophe
100. user may not read this record
102. user may not read this item
104. disk in wrong drive
105. disk read or write error
107. file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 215
MOBS Data Management System Documentation
Get Field from Current of run unit GFC
ED =CALL (AO, "GFC, item-type, data-block")
Arguments:
item—type(input.)
data—block(output.)
Currency Indieator"s Involved:
current of" run unit(input)
Description:
Th evalue or the given i tern—type inthe record
identif'ied bythe current record of" the run unit is returneid
in the data--block.
There ic no check made that the variable inth eoata—
block is of" the correct type or size. These checks are "ole!y
the responsibi. íity of the appl ieat: ions programmer'.
If the item—type is adepending item, t.h edepended or,
iterr. is used to determine the number qÍ inst.atices Qí' the- it, eta
to return.
Errors:
C) 1 .data base not open
02 .invalid set—type
04 .inval id item—type lor this record.—type
13.depended on item too large or ne%ative
1i3 .no current of" run unit
90 .río such DMS routine
94 .block name not found
96 .invai id number of" arguments
99 .catastrophe
1DO .user may not read this record
102 .user may not read this itew.
104 .disk in wrong drive
105 .disk read or" write error
107 .file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 216
MDBS Data Management System Documentation
Get Field f"rom current Member GFM
ED =CALL (AO ,"GFM, item-·-type, set—type, data—block")
Arguments:
item-type(input)
set-type(input)
data-block(output)
Currency Indicators Involved:
current owner of set—type(input)
current member of" set.—tyµe( input)
Description:
Th eva lue of" t.he given item—type inthe record
identified by the current member of the specified set—type is
returned in the data—block.
There is no cheek made that the variable inthe data—
block is of the correct type or size. These checks are solely
the responsibi lity of the applications programmer.
If' the item-type is adepending item, th edepended on
item is used to determine the number of iristances of" the item
to return.
Errors:
'3 1.data base not open
02 .invalid set-"type N
CJ4 .inval id item—type f"or this record---type
O8.no current owner of" set—type
09 .no current member of set—tvpe
13 .depended on item too large or negative
90 .no such DMS routine
94 .block name not found
95 .invalid data block name
96 .invalid. number OÍ" arguments
99 .catastrophe
lOó .user may not read this record
1OZ .user may not read this item
1 CL4 .disk in wrong drive
1C5 .disk read cr write error
i07 .rile not present
108 .user may not read this set
©COPYRIGHT 1979, 1980, Mi-cro Data Base Systems, Inc. 217
MDBS Data Management System Documentation
Get Field from ourrent Owner GFO
ED =CALL (AO, "GFO, item-type, set—type, data-block")
Arguments:
item—type(input)
set—type(input)
data-block(output)
Currency Indicators Involved:
current. owner of set—type(input)
Description:
The value of" the given item—type in the record
identified by the current owner of" the ".peeif'ied set—type is
returned in the data-block.
There is no check made that the variable in the data—
block is of" the correct type or size. These checks are solely
the responsibility of" the applications prograrürner.
If the item—type is adepending item, the depended on
item is used to determine the number oÍ" instances of' the item
to return.
Errors:
01. data base not open
OZ. invalid set—type
04. invalid item-type for this record—type
08. no current owner oÍ" set—type
13. depended on item too large or negative
90. no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of" arguments
99. catastrophe
100. user may not read this record
102. user may not read this item
104. dist in wrong drive
105. disk read or write error
107. Í'ilc; not preserít.
108. use:" may not r"ead this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 218
MDBS Data Management System Documentation
Get Field from current Record GFR
FO =CALL (AO, "GFR, item-type, record-type, data—block")
Arguments :
item-type(input)
record—type(input)
data—b1ock(output)
Currency Indicators Involved:
current of record—type(input)
Description:
Th eva Iue orthe given item—type inthe record
identified by the current record of the specified record—type
is returned in the data—block.
There is no check made that the variable i nthe data—
block is of the correct type or size. These cheeks are "'ole!y
the responsibi lity cjf "the applications programmer.
If" the item—type is adepending item, the detiended on
item is used to determine the number of" instances of" the item
to return.
Errors:
O 1 .data base not open
íj 3.invalid record—type
¿Jl' .invalid item—type f'or this record—type
10 .no current of' record—type
13-depended ori item too large or negat: ive
9C) .no such DMS routine
94 .block name not f"ound
95 .invalid data block name
96 .inval id number of arguments
?i9 .catastrophe
1 O O .user may n(: )t. read this record
1 D 2.user may not read this item
i'J4 .disk in wrong círive
1 O 5.disk read or write error
i07 .ri le not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 219
MDBS Data Management System Documentation
Get Member Count GMC
ED =CALL (AO, "GMC, set-type, data-block")
Arguments:
set-type(input)
data-block(ontput)
Currency indicators Involved:
current owner of" set—type(input)
Description:
This routine returns the number of member record
occurrences owned 'by the current owner of" the set—type. The
data—block must contain two integer variables. For
illustration purposes, call them I and J. The total number oí'
occurrences is computed by the user with the f"ormuía:
Total Number =32768 *I+J
Normally, Iwill be zero.
Errors:
01. data base not open
02. invalid set—type
08. no current owner of set—type
30. no such D!4G routine
94. block name. not found
95. invalid number oí" arguments
99. catastrophe
104. disk in wrong drive
105. disk read gr write error
107. file not present
108. user may not read this set
E) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 220
l
L
MDBS Data Management System Documentation
r~—-
i
)
Get Owner Count GOC
+
ED =CALL (AO, "GOC, set-type, data-block")
Arguments:
_set—type(input)
data—block(output)
'Currency Indicators Involved:
_current member of set—type(input)
Description: .
This routine returns the number of" owner record
occurrences owned by the current member oí" the set—type. The
data—block must contain two integer variables. For
illustration purposes, call them Iand J. The total number of"
occurrences is computed by the user with the formula:
lTotal Number =32768 *I+J
l
Normally, Iwill be zero.
i
tErrors:
01. data base not open
02. invalid set-type
09. no current member or set—type
90. no such DMS routine
94. block name not found
9Eí. invalid number OÍ" arguments
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
,
r"
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 221
/_
"
MDBS Data Management System Documentation
Get reeord—Type of Current or run unit GTC
ED =CALL (AO, "GTC, data-block") —
Arguments: ,
data-bloek(output)
Currency Indicators Involved:
current of run unit(input)
Description:
The reeord—type name oí" the record identified by the
current record of" the run unit is returned in the first data—
block variable. —
The record—type name is in character format, and is
padded with trailing blanks.
Errors:
Cl1. data base not open
16. no current of" run unit
90. no such DMS routine
94. block name not found
95. invalid data bloc.k name
96. invalid númber of arguments
99. catastrophe "
104. disk in wrong drive
105. disk read or write error
107. file not present —
108. user may not read this set
~~
W~
J
N
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Ine. 222
MDBS Data Management System Documentation
Get reeord—Type of current Member GTM
ED =CALL (AO, "GTM, set-type, data-block")
Arguments:
set—type(input)
data—block(output)
Currency Indicators Involved:
current owner OÍ" set--type(input)
current member of set—type(input)
Description:
The record—type name of the record identified by the
current member of the set—type is returned in the f"irst data.-'
block variable.
The record—type name is in character format, at:d is
padded with trailing blanks.
Errors:
01. data base not open
OZ. invalid set-type
08. no current. owner c]r set—type
09. no current member of" set—type
90. no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of' arguments
99. catastrophe
100. user ma-y not read this record
104. disk in wrong drive
105. disk read or write error
107. file not present.
108. user may not read this set
© COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 2Z3
MOBS Data Management System Documentation
Get reeQrd—Type of" current Owner GTO
ED =CALL (AO, "GTO, set-type, data—block")
Arguments:
set-type(input)
data—block(output)
Currency Indicators Involved:
current owner of" set.—type(input)
Description:
The record-type name of the record identified by the
current owner of" the set-type is returned in the first data—
block variable.
The record—type name is in character format, and is
padded with trailing blanks.
Errors:
01. data base not open
OZ. invalid set-type
08. no current owner of" set—type
90. no such OMS routine
94. block name not f"ound
95. invalid data block name
96. invalid number of" arguments
99. catastrophe
íC)4. disk in wrong drive
105. disk read or write error
107. tile not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 224
MDEIS Data Management System Documentation
OPEN data base OPEN
ED =CALL (AO, "OPEN, data-bloek")
Arguments:
data—block (input)
Currency indicators involved:
all
Description:
Thie subroutine must be called before any other oí t.í'je
subroutines in the DMS are called (except DEFINE and EXTEXU).
Table initialization is taken care of" by this
subroutine.
All sets which have been defined in the DDL as having
SYSTEM as their owner have their current cwmer set to SYSTEÉJ_
The current of ruri unit is set to SYSTEM. All other" currency
indicators are set to null.
The data block must contain the f'ollowing:
a. Data base file name
This must be acharacter string containing a
luliy qualified file name as specified in the
!JDL.
b. User"s name
This must be an upp'er case character string
containing the user's name as declared in t-he
PASSWORDS section of the DDL.
c. Password
This must be an upper case character string
containing the user"s password as declared in
the PASSWORDS section oÍ" the DDL.
d. Read/write status
This must be an upper case character string
containing "MOD" if" the user" wishec to write and
read from the data base. Any other string will
put the data base in ar"ead—on!y mode.
Errors:
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 225
MOBS Data Management System Documentation
14. data base already open
i5. eiata base not closed previously
36. improper password
90. no such DMS routine
91.. insuX"icient room in memory
92. incorrect number of" arguments
94. blocjc name not found
95. invalid data block name
96. invalid number oí" arguments
97. cannot read f'rom data base riles
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 226
MDBS Data Management System Documentation
PUT data into Current of" run unit PUTC
ED =CALL (AO, "PUTC, data-block")
Arguments:
data—block(output)
Currency Indicators Involved:
current oÍ" run unit(input)
Description:
The data—block specified is stored in the record
specified by the current record of" the run unit. The data--
block is assumed to be in the same order and alignment as the
items in the DDL for the given record—type.
There is no check made that data-block is of the right
type, alignment or size.
If any item—type in the given record-type is adepending
item, the location or the depended on item is assumed to
contain the correct value to determine the number of' instances
of" the depending on item to store.
Error"c
01. data base not open
16. no current of" run unit
8!3. variable length inconsistency
90. no such OMS routine
94. block name not found
95. invalid data block name
99. catastrophe
101. user may not write this record
103. user may not write this item
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for new page
107. file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 227
MDBS Data Management System Documentation
P'JT data irtto current Member PUTM
ED =CALL (AO, "PUTM, set-type, data-block")
Arguments:
set-type(input)
data-block(outpÚt)
Currency Indicators Involved:
current owner of set—type(input)
current member of" set—type(input)
Description:
The data-block specif"ied is stored in the record
indicated by the current member of" the specified set—type.
The data—block is assumed to be in the same order and
alignment as the items in the DDL for the given record—type.
"~
There is no check made that data—block is of" the right
type, alignment or size.
If any item—type in the given record—type is adepending
item, the location of the depended on item is assumed to
contain the cm"rect value to determine the number of" instances
or the depending on item to store.
Errors:
01. data base not open
02. invalid set—type
08. no current owner of set—type
09. no current member or set—type
89. variable length inconsistency
90. no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of arguments
99. catastrophe
101. user may not write thi" record
103. user may not write this item
104. disk in wrong drive
105. disk read or write error
106. cannot expand file f"gr new page
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 228
MDBS Data Management System Documentation
107. file not present
108. user may not read this set
N
-
—.
P-
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 229
G
MDBS Data Management System Documentation
PUT data into current Owner PUTO
ED =CALL (AO, "PUTO, set-type, data-block") "
Arguments: —
set-type(input)
data—block(output) "
Currency Indicators Involved: _
current owner of" set—type(input)
Description:
T'he data-block specified is stored in the record "
indicated by the current record of the specif'ied set—type.
The data—block is assumed to 'be in the same order and
alignment as the items in the DDL Í"or the given record—type. —
There is no check made that data—block is or the right
type, alignment or size. m~~
It any item-type in the given reeord—type is adepending
item, the location of t.he depended on item is assumed to
contain the correct value to determine the number of" instances
of" the depending on item to store.
Errors:
01. data base not open
02. invalid set-type "
08. no current owner of set—type
90. no such DMS routine
99. catastrophe —
89. variable length inconsistency
90. no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of" arguments
90. no such DMS routine
99. catastrophe "
101. user may not write this record
103. user may not write this item
104. disk in wrong drive —
105. disk read or write error -
q
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 230 "
MDBS Data Management System Documentation
106. cannot expand file tor new page
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. Z31
MDEIS Data Management System Documentation
PUT data into current Record PUTR
ED =CALL (AO, "PUTR, record--type, data-block")
Arguments:
record-type(input)
data-block(output)
Currency Indicators Involved:
current oí record—t.ype(input)
Description:
Th edata—b iock specified isstor'ed i:nthe record
indicated by the current- oí the specified reecn'd—type- The
data-block is assumed t.o be in the saíne order and alignment zi:-,
the items in the DDL for the given record—type.
There is río check made that data—Moek is of" the right
type ,alignment or size.
If any item—type in the given record-type is adepending
item, the location of the depended on item isassumed tc
contain the correcz- value t: o determi.ne tlie number OÍ j.?2stances
of" the depending orí item to store.
Errors:
O 1 .data. base not open
03 .invalid record—type-
1 C) .no current of record—type
89 .variable length inconsistency
90 .no such DMS routine
94 .block name not- found
95 .invalid data block name
96 .invalid number oí arguments
99 .catastrophe
1O 1 .user may not write this record
103 .user may not write this item
104 .disk in wrong drive
105 .disk read en" write error
106 .cannot expand f"i!e for new µagE
iU'7 .f'iie not pr"'esent
©COPYRIGHT 1979, 1980, Micro Data Ba3e Systems, Inc. 232
MDBS Data Management System Documentation
Remove current Member from Set RMS
ED =CALL (AO, "RMS, set---type")
Arguments:
set-type(input)
Currency Indicators Involved:
current owner of set--t.ype(input)
currer\t. member of" set—type(input)
current member oí" set—type(output)
Description:
The current member of" the given set—type is logically
removed from the set, i.e., the previous member is linked to
the next member, and the current member is no longer
associated with the current owner OÍ" the set—type.
The currency indicator of the member of the given set--
type becomes null. (Note that it is possible to reach the enc!
or the set this way without. it being indicated via ED).
Note that the record is only removed from the given set.;
it is not deleted f'rom. the data bas"e.
Errors:
Oí. data base not open
Q2. invalid set—type
08. no current owner of" set—type
09. no current member of" set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
109. user may not write this set
© COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 233
MDBS Data Management System Documentation
Remove all Set Members RSM
EC) =CALL (AO, "RSM, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current owner of set—type(input)
current member of set-type(output)
Description:
The current set is set to have no members, i.e., all
members of' the set are logically removed from the set.
The currency indicator of" the member of) the given set—
type becomes null.
Note that the records removed f'rom the set are not
deleted from the data base, nor is the owner of" the given set—
type deleted from the data base.
Errors:
01. data base not open
02. invalid e.et—type
08. no current owner of set—type
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. fñle not present
108. user may not read this set
109. user may not write this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 234
MDBS Data Management System Documentation
Set Current of run unit based on Member SCM
ED =CALL. (AO, "SCM, set-type")
Arguments: -
set-type(input)
Currency Indicators Involved:
current owner of set-type (input)
current member of set—type (input)
current of" run unit(outµut)
Description:
The record identified by the current member of the
specified set—type is set to be the current record of the run
unit.
Errors:
01. data base not open
OZ. invalid set—type
08. no current owner OÍ" set—type
09. no current member of" set—type
90. no such DMS routine
99. catastrophe
108. user may not read this set
© COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 235
MDBS Data Management System Documentation
Set Current of7 run unit based on Owner SCO
ED =CALL (AO, "SCO, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current owner of set—type(input)
current of" run unit(output)
Description:
The record identi£ied by the current owr.er of the
specified set—type is set zo be the current record of the run
unit.
Errors:
01. data base not open
02. invalid set-type
08. no current owner oí7 set—type
90. no such DMS routine
99. catastrophe
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 236
MDBS Data Management System Documentation
Set Current of" run unit based on Record SCR
ED =CALL (AO, "SCR, record-type")
Arguments:
record—type(input)
Currency Indicators Involved:
current record of record type(input)
current of" run unit(output)
Description:
The record identified by the current of the specif"ied
record—type is set to be the current record of the run unit.
Errors:
01. data base not open
03. invalid record—type
10. no current of" record—type
90. no such DMS routine
99. catastrophe
100. user may not read this record
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 237
MDBS Data Management System Documentation
Set Field in Current of" run unit SFC
ED =CALL (AO, "SFC, item-type, data-block")
Arguments:
item-type(input)
data-block(input)
Currency Indicators Involved:
current of run unit(input)
Description:
The value of the variable in the data—block is stored 1r
the given item—type of the record identified by the current
record of the run unit.
There is no check made that the variable is of" the right
type or size.
If the item-type is adepending item, the depended on
item value in the record is used to determine the number of"
instances of" the given item—type to store.
Errors:
01. data base not open
04. invalid item—type for this record—type
16. no current of run unit
13. depended on item too large or negative
40. maximum value of depending on item is 32768
90. no such DMS routine
94. block name not found
96. invalid number of arguments
99. catastrophe
101. user may not writ.-e this record
103. user may not write this item
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for new page
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 238
MOBS Data Management System Documentation
Set Field in current Member SFM
ED =CALL (AO, "SFM, item-type, set-type, data-block")
Arguments:
item-type(input)
set—type(input)
data—block(input)
Currency Indicators Involved:
current owner of set—type(input)
current member of" set—type(input)
Description:
The value oÍ" the variable in the data—block is stored in
the given item—type of the record identiried by the current
member of the specified set—type.
There is no cheek made that the variable is of the right
type or size.
ir the item—type is adepending item, the depended on
item value in the record is used to determine the number oí
instances of the given item—type to store.
Errors:
01. data. base not- open
íj2. invalid set-type
04. invalid item—type tor this record—type
08. no current owner of set—type
09. no current member of" set—type
13. depended on item too large or negative
40. maximum value of" depending on item is 32768
90. no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of" arguments
101. user may not write this record
103. user may not write this item
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for new page
107. file not present
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 239
MDBS Data Management System Documentation
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 240
MOBS Data Management System Documentation
Set Field in current Owner GFO
EC) =CALL (AO, "SFO, item-type, set—type, data-block")
Arguments:
item—type(input)
set—type(input)
data-block(input)
Currency Indicators Involved:
current owner of set—type(input)
Description:
The value of" the variable in the data—block is stored in
the given item—type of the record identified by the current
record oÍ" the specified record—type.
There is no check made that the variable is of the right
type or size.
If the item—type is adepending item, the depended on
item value in the record is used to determine the number oí
instances of the given item—type to store.
Error"-:
C)1. data base not open
02. invalid set-—type
04. invalid item—type tor this record—type
08. no current owner of set.—type
13. depended on item too large or negative
40. maximum value of depending on item is 32'768
90. no such DMS routine
94. block name not found
g"t. invalid data block name
96. invalid number oí" arguments
101. user may not write this record
103. user may not write this item
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for new page
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 241
MOBS Data Management System Documentation
Set Field in current Record SFR
ED =CALL (AO, "SFR, item-type, record-type, data—block")
Arguments:
item-type(input)
record—type(input)
data—b!ock(input)
Currency Indicators Involved:
current record of record—type(input)
Description:
The value of" the variable in the data—block is stored in
the given item—type of" the record identified by the current
record of the run unit.
There is no check made that the variable is of" the right
type or size.
Ir the item—type is adepending item, the depended orí
item value in the record is used to determine the number of
instances of the given item—type t.o sÁ:ore.
Errors:
01. data base not open
04. invalid item—type for this record—type
10. no current of record—type
13. depended on item too large or negative
40. maximum value of depending on item is 32768
90, no such DMS routine
94. block name not found
95. invalid data block name
96. invalid number of" arguments
101. user may not write this record
103. user may not write this item
104. disk in wrong drive
105. disk read or write error
106. cannot expand file for new page
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 242
MDBS Data Management System Documentation
.
Set Member based on Current of" run unit SMC
EC) =CALL (AO, "SMC, set-type")
Arguments:
set-type(input)
Currency Indicators Involved:
current oÍ" run unit(input)
current owner oÍ7 set—type(output)
current member of set—tyµe(output)
Description:
The record identified by the current record of" the run
unit becomes the current member of the given set—type. The
logically first owner associated with the new current membmr
becomes the new current owner of the given set—type.
Errors:
01. data base not open
02. invalid set—type
06. invalid member type for this set—type
08. no current owner of" set—type
16. no current of" run unit
12. record not member of" set
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
j(j"k. disk read or" write error
107. file not present
108. user may not read this set
109. user may not write this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 243
MDBS Data Management System Documentation
Set current Member based on current Member SMM
ED =CALL (AO, "SMM, set-type—l, set—type—2")
Arguments:
set—type—1(input)
set—type—2(input)
Currency Indicators Involved:
current owner of set—type—2(input)
current member of" set—type—2(input)
current owner of" set—type—1(output)
current member' of" set—type—1(ou.tput)
current of" run uriit(output)
Description:
The record ider,tií"ied by the current member of" the ·-
second set—type specified becomes the current member of" the
first set—type. The logically first owner associated. with the
new current member becomes the new current owner of the giver,
set—type.
Errors:
01. data base not open
OZ. invalid set—type
06. invalid member type f"or this set--type
08. no current owner oÍ" set—type
09. no current member of set—type
12. record not member of set
90. no such DMS routine
99. catastrophe
104. disk in wrong drive ""
105. dick read or write error
107. file not present
108. user may not read this set
109. user may not write this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 244
MDBSJ)ata Management System Documentation
Set current Member based on current Owner SMO
ED =CALL (AO, "SMO, set-type—l, set—type—2")
Arguments:
set—type_1(input)
set—type-2(input)
Currency Indicators involved:
current owner of" set—type_2(input)
current member OÍ" set—type—2(input)
current owner or set—type—1(output)
current- member of set—type_1(output)
current of run unit(output)
Description:
The record identified by the current owner of the second
set—type specified becomes the current member of the first
set—type. The !ogica!!y first owner associated with the new
current member becomes the new current owner of" the given set—
type.
Errors:
Oí. data base not open
OZ. invalid set—type
06. invalid member type for Éhis set—type
08. no current owner of set—type
12. record not member of set
90. no such DMS routine
99. catastrophe
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
109. user may not write this set
255. end—of-set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 245
MDBS Data Management System Documentation
Set current Member based on current Record SMR
..
EC) =CALL (AO, "SMR, record-type, set—type")
Arguments:
record—type(input)
set—type(input)
Currency Indicators Involved:
current record o!" record—type(input)
current owner of' set—type(output)
current member OÍ^ set—type(output)
current of" run unit(output)
Description:
The record identified by the current of" the speeiried
record—type becomes the current member of the given set—type.
The logically first owner associated with the new current
member becomes the new current owner of" the given set—type.
Errors:
01. data base not open
02. invalid set—type
03. invalid record—type
06. invalid member type for this set—type
08. no current owner of set—type
10. no current of record—type
412. record not member of set
90. no such DMS í"Q'ütine
99. catastrophe
100. user may not read this record
104. disk in wrong drive
105. disk read or write error
107. f"ile not present
108. user may not read this set
109. user may not write this set
255. end—or-set
(c) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 246
MOBS Data Management System Documentation
Set Owner ba"'ed on Current of run unit SOC
ED =CALL (AO, "SOC, set-type")
Arguments:
set—type(input)
Currency Indicators Involved:
current oí run unit(input)
current owner of" set—type(output)
current member or set—type(outµut)
Deseription:
The record identified by the current record of the run
unit is made the current owner of t-he given set—type. The
first ráernber of" the set b?cornes the current member of that set
(note that this is equivalent to an imµlied call to FFM).
If" the set is empty, the currency indicator of the
member oÍ" the given set—type beeomes null, and EO is set to
255. This routine executes an implicit FFM command; that is,
the specified record is made the owner of" t-he set and the
first member associated with the new owner is made the current
member of" the set—type-
Errors:
01. data base not open
02. invalid set.-type
C)5. invalid owner type for this set—type
í6. no current of" run unit
90. no such DMS routine
99. catastrophe
Z04. disk in wrong drive
105- disk read or write error
107. file not present
108. user may not read this set
íOQú user may not write this set
255. end-of-set
©COPYRIGHT 1979, j980, Micro Data Base Systems, Inc. 247
MDBS Data Management System Documentation
Set current Owner based on current Member SOM
ED =CALL (AO, "SOM, set—type—l, set—type—Z" )
Arguments:
set—type—1(inputñ
set—type—2(inputj
Currency Indicators Involved:
current owner of" set—type—1(output)
current member of" set—type—1(output)
current oÍ" run unit(outpu.t)
current owner or set—type—2( input)
current member of set—type—2(input)
Description:
The record identified by the current member of" the
second set—type ismade the current owner of the first set-
type .The first member of the set becomes the current member
of" that set (note that this is equivalent to an implied cal!
to FFM) .
If" the set is empty, the currency irídicator ofthe
member of the given set—type becomes nut l,and ED is set equal
to 255 .This routine executes an implicit FFM command; that
is,the specified record is made the owner of the set and the
first member associated with the new owner is made the current
member :jf the set—type.
Errors:
C 1 .data base not open
OZ .invalid set—type
05 .invalid owner type for thi': set—type
08 .no current owner of set—type
09 .no current member of set—type
90 .no such DMS routine
99 .catastrophe
104 .disk in wrong drive
105 .disk read or write error
!\] '"' .f' il<" nk" tÉ"fu": ":<'i\t
t',)¿í .u. :,y e? j" imíy not ]" e a dt. íj isset.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 248
MDBS Data Management System Documentation
~"7
109. user may not write this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, inc. 249
MDBS Data Management System Documentation
Set current Owner based on current Owner SOO
ED =CALL (AO, "SOC), set-type-l, set—type—2")
Arguments:
set—type—1(input)
set—type—2(input)
Currency Indicators Involved:
current owner of set—type—1(output)
current member of" set—type—1(output)
current of run unit(out.put)
current owner oÍ" set—type—2(input)
current member of" set—type—2(input)
Description:
The record identified by the current owner of" the second
set—type is made the current owner of" the first set—type. The
first member of the set. becomes the current member of" that set
(note that this is equivalent to an implied call to FFM). The
first member of" the set becomes the current member of that set
(note that this is equivalent to an implied call to FFM).
If" the set is empty, the currency indicator of" the
member of the given set—type becomes null, and ED is set equal
to 255. This routine executes an implicit FFM command; that
is, the spde thecified record is made owner of7 the set and the
first member associated with th= new owner is made the current
member of the set—type.
Errors:
01. data base not open
OZ. invalid set-type
05. invalid owner type for this set—type
08. no current owner of" set—type
09. no current member of set—type
90. no such OMS routine
99. catastrophe
104. disk in wrong drive
1()5. disk read or write error
107. file not preser)t
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 250
MOBS. Data Management System Documentation
109. user may not wri.te this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 251
MDBS Data Management System Documentation
Set current Owner based on current Record SOR
ED =CALL (AO, "SOR, record-type, set—type")
Arguments: record—type(input)
set—type(input)
Currency Indicator", Involved:
current record of record—type(inµut)
current owner or set—type(output)
current member OÍ" set—type(output)
current of" r'..zn unit(output)
Description:
The record identified by the current oí" the specii7ied
record—type is made the current owner of" the given set—type.
If the set is empty, the currency indicator oí" the
member of" the given set—type becomes null, and ED is set equal
to 255. This routine executes an irl1É')licit FFM command; that
is, the specified record is made the owner of" the set and the
first member associated with the new owner is made the current
member of the set—type.
Errors: '01. data base r.ot open
02. invalid set—type
03. invalid record—type
05. invalid owner type for this set—type
10. no current of record—type
90. no such DMS routine
99. catastrophe
100. user may not read this record
104. disk in wrong drive
105. disk read or write error
107. file not present
108. user may not read this set
109. user may not write this set
255. end—of—set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 252
MDBS Data Management System Documentation
Set Record based on Current of" run unit SRC
ED =CALL (AO, "SRC")
Arguments:
Currency Indicators In\Tolved:
current of run unit(input)
current of record—type(output)
Description:
The record identified by the current record of the run
unit is set to be the current record of its record type.
Errors:
01. data base not open
16. no current oÍ" run unit
90. no sueh DÍ\/ÍS routine
99. catastrophe
íCjO. user may not read this record
104. disk in wrong drive
105. disk read cir write error
107. file not present
,
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 253
MOBS Data Management System Documentation
Set current Record based or Member SRM
ED =CALL (AO, "SRM, set-type")
Arguments:
set—tyµe(input)
Currency Indicators Involved:
current owner' of set—type (input)
current member of" set-type (input)
current of reeord—type(outµut)
eurrent oÍ run unit(output)
Description:
The record identified by the current member of the
specified set—type is set to be the current record of its
record type.
Errors:
01. data base not open
02. invalid set:—type
08. no current owner of set—type
09. no current member of" set—type
90. no such DMS routine
99. catastrophe
100. user may not read this record
104. disk in wrong drive
105. disk read or wr"ite error
107. file not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 254
MDBS Data Management System Documentation
Set current Record based on Owner SRO
ED =CALL (AO, "SRO, set.-type")
Arguments:
set—type(input)
Currency Indicators Involved:
current owner of set.—type(input)
current of" recorc!—type(output)
current of" run unit(output)
Deseription:
The record identiried by the current owner of the
specified set—type is set to 'be the eurrent record of" its
record type.
Errors:
01. data base not open
02. invalid set—type
08. no current owner of" set—type
90. no such DMS routine
99. catastrophe
100. user may not read this record
104. disk in wrong drive
105. disk read or write error
107. Í"ile not present
108. user may not read this set
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 25!3
MDBS Data Management System Documentation
return data base run STATistics STAT
ED =CALL (AO, "STAT, data-block")
Arguments:
data-block (input)
Currency Indicators Involved:
not applieakñe
Description:
Various operating statistics from the current execution
or the MDBS.DMS system are returned in the variables of' the
data—block. The data—block must contain five integer
variables which take on the following values:
Variable Value
1. #of page buffers in memory
2. #of" page references
3. #of page faults
4. # of" disk reads
5. #of" disk writes
Errors:
01. data base not open
89. variable length inconsistency
90. no such OMS routi.ne
94. block name not f"ound
95. invalid data block name
96. invalid number of arguments
99. catastrophe
Notes:
1. The number of" page ref"erences is the number of"
different times adata base page was requested by the internal
routines oÍ7 the MDBS.DMS system. The number of page faults is
the number of times apage other than the most recently
accessed page was requested.
2. All values returned are modulo 32768.
©COPYRIGHT 1979, 1980, Micr¿ Data Base Systems, Inc. 256
MDBS Data Management System Documentation
TOGGLE run optimization switch TOGGLE
EO =CALL (AO, "TOGGLE")
Arguments:
none
Currency Indicators Involved:
not applicable
Description:
Acall to the TOGGLE routine toggles the value c) fan
internal switch in the MDBS. DMS package. When the switch is
on (def"ault), the MDNS .DMS package per1rorm¢> f'jj lIerror
checking. When the switch is off, eh3eks for certain errors
which occur infrequently and have minimal impact on data bas e
integrity, yet which require substantial amount-s of" processing
time to perf"orm, are bypassed. It isrecommended that th e
switch be kept on except in well—debugged programs which work
with large data bases. The switch is set to c·n whenever the
OPEN routine is executed.
Errors:
90 .no such DMS routine
99 .catast.rophe
© COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 257
MDBS Data Management System Documentation
Iv. CONCLUDING REMARKS
This manual describes the f"eatures of" MDBS in acomprehensive
fashion.. It may be useCul to 3ket: ch out sorne of the extensions that.
are presently avaiiabfe. First., as the user will quickly become
aware, data base requirements change over time. Aíogical structure
that. appears to be ideal during some period of time may reed
alteration. For example, in order to improve access eff"icieney new
set relationships may be desirable. In some instances, new but
relevant data sets appear desirable and both new record types and
associated set relationships ar'e needed. In all these cases it would
be desirable not to have to restart the data base but have available
dynamic restructuring capability- This cayability exists with the
system known as MDBS.DRS.
As the system currently exists, it is oriented 'towards supporting'
the applications programmer writing in BASIC, PASCAL, FORTRAN, COBOL,
PL/I and other languages. These programs may be doing avariety of
things including generati-ng mailing lists, doing general aceounting,
solving linear programming problems, performing regre3sion analyses,
and forecasting to name af'ew. Some of the application programs could
be specifically written to do data retrieval. For this class of"
programs it. is possible to develop software which would automatically
perform. these tasks. Aquery language capability would thus obviate
the user from writing application programs but would speci""y an
English-like language for defining the desired reports. The Micro
Data Base System MDBS.QRS is ahigh level query system /report writer
'having such capabilities.
(c) COPYRIGHT 19'79, 1980, Micro Data Base Systems, Inc. 258
MDBS Data Management System Documentation
Additional Software Products from Micro Data Base Systems, Inc
include:
QRS (Quer'y/Report Writer System)
QRS allows anon—programmer to extract data from any MDBS data base
(a version of QRS for use with HDBS data bases is also available).
(JES accepts nonprocedural, English—like queries on an ad hoc basis and
automatically produces desired reports. Complex conditions on
retrieval can be specified. Arithmetic expressions are also allowed.
Queries cari be batched. Reports can be routed to the console, a
printer or adisk file. DML commands can be executed interactively.
QRS is implemented in machine language.
MUS (Multi User System)
MDBS.MUS is the multiuser version of MDBS. k!u1tipje users can
share asingle data base. MUS automatically saves and restores
currency indicators of" each executing run unit as needed. MUS also
handles page leek—outs f"or run units that alter adata base.
VAC (Via Set, Area, Ca!c)
MDBS.VAC has all features cA MDBS, plus reatures that offer the
designer added control over the mapiríg OÍ" record occurrences to
storage. The designer can partition adata base into areas, each
consisting of anumber of' logically contiguous data base pages.
Record types can be assigned to specific areas. This means that all
occurrences of arecord type are placed in aspecified area—
Occurrences are mapped into an area, either" on the basis of acale
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 259
MOBS Data Management System Do\3umentat.ion
key, avia set oµtion, or a"don't care" option. Added DML commands
allow records to be directly accessed on the basis of their calc key
values.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 260
MDBS Data Management System Documentation
q
APPENDIX 1
Memory /Processing Time Trade—off'
In order to assess the trade—off between th eprocessing t. irne
required f"or the MDBS.DMS system to process adata base and the amount
of memory available to the syst-em, asimple experiment w¿?s performed
wi th version 1.Oof" MDBS .DMS. In this experimert, 1000 :",ull records
(i .e. ,records with no data items def"ined) were created and added to a
FIFO set .The DDL for this experiment is shown in Figure 1. The
optimization toggle (see DMS routine TOGGLE) was off". The dat:a base
file resided on a single Shugart—Mini disk drive in single density
f"ormat .
The f"ol 7owing observationeb were made:
#or pages time required
in memory (mi n,sec )
124 ,18
2 1í3, 46
312, 18
48,58
51,Z6
6O,40
7C) ,36
8O,34
16 O,29
Obviously acritical point exists where the execution time
radically decreases as the number of pages available to the system
increases. The extra speed realized by going f"rom t3 pages to 7pages
ismuch less than that realized by going from 5pages to 6pages. or
course the characteristics of" the data base being used and the types
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 261
MOBS Data Management Systertí Documentation
t) í operations bein,e performed will cause some variance in where this
z'utof'í" occurs, but: we recommend that, in general, at least 8pagm: be
e"},': -i:-e(:í ii" possi-ble,
Tb eyrimary cause of" the differences in execution sp'eed is due to
the number oí dis'ñ accesses performed bv th esysi: .em. Naturall y, a
fasí-er' di3'k system would resu! ti in amarkcc! decrease in execution
""L ?"ít
e.
The relationship between the number of" ciis!'r accesses and the memory
avaí!able t. oth eMDBS. DitiS package is in the number oí" page buffers
Uiat the system can a! locate. The number oÍ" these bufTere., then, is
t: henumber ofpages which can be kept in memory in anticipation oí
(':".i:.'Ují"e ref"ereríc¶s. The more page buffers resider't. inmemory ,th e
great.er ií3 the 2!Áance í:hat agiven page will bu rúerncu"y resident wherz
it: i.s required, thuíí safin8 adisk access. The ac tua ICPU p:"ocessing
t. imeistrivial comp"'íred t: c) t!"\ eamount c) f7 '¿- ime spent: on I/0
operat.i c't\s.
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 262
MDBS Data Management System Documentation
0010 FILES DEMO 1512
0020 DRIVE 1lOó
0030 PASSWORDS
0040 PAF4 253-56-9C)53
0050 GARY 255 255 665--4€1-9082
CJO6O RECORD B
'JO70 SET S3 MAN 1:N
0080 FIFO
0090 OWNER SYSTEM
0100 MEMBER B
OliO END
DDL for Experiment
Figure 1
E) COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 263
'4DES Data Management System Documentation
APPISIDIX 2
MDB3. r»'s Command íje;age
"'i: '"" ®pr'""-ñdix lists the comn"!'": r.ds in the MDBS.DMS system and brieí"ly
¢l'""""ribeS common uses i' o::"' e:,í e Lj command .Anumber has been asszgne""'.. to
¿"'v"' arelative jnc!ic3.ri2n of) t}"} t= f'reqí.!'?ncy 'ijf' ase OÍ" each oi'" t"u'se
comrna.n d. s.A'iumber su chaü 4.-n" 5does not. indicate that uz:eCjí" J.
routine should 'Dé av")1."iecl, hut merel yindicates tht'· r"outinF" tegr]dk,: .!1 o
be used rarely. The codes indicate:
:t.This command is used in almost all applications.
2."This command is used extenci.vely.
3.This comT,]an(i is used frequently.
4.This command is used moderat.el y.
5.This command is used rarely.
·
@COPYRIGHT 1979, 198C, Micro Data Base Systems, Inc. 2€4
MDBS Data Management System Documentation
Command Usage
Name Leve] Use
ACS 1U3e?cÍ whenever recorM. are added to set occurrences
AMS 3 Alternative to ACS
CCT 5Typically used in complex networking programs which
involve avariety oÍ" record types
CLOSE 1A!waye used
CPJT 4Used with sets with multiple member types
COT 4! Used with sets with multiple owner types
CR 2Used to create null (link) records
Used to defer data storage
(Typically CRS is used)
CRS 1Used to create arecord and store dat.a
DEF INE 1Ai\z.·¿zys. used
13RC 3Used tío delete record occurrence
DRM 4Typically, DRC is used
DRO 4Typically, DRC is used
DRR 4 Typically DRC is used
EXTEND 4Useful ir aDEFINE statement kl i!Inot í' it- on one
source iine
FFM 1Basic operator for sequentially traversing aset
FFO 3 Useful with many—to—many sets
FINDM 2General rout.ine for locating arecord wi th a
specified data—value
FÍNDO 3 Many-to—many anaíQg O!" FINDM
FLIT 3 Useful ir set is traversed "backwards"
FLO 4 Many—to-many anakjg of FLM
FMSK 2 Locate arecord in asorted set
(9 COPYRIGHT 1979, 1980, Micro Data Base System.s, Inc. 26E
MDBS Data' Management System Doeumentation
..
Command Usage
Name Level Us e
FNM 1Basic operator" for sequentially traversin,q set
n'-.: o3Many-to-many analog of FNM
7C)SK 3Many—to—many analog of" FMSK
FPM 3 Useful if" set is travereed "backwards"
u'o 4 Many—to—many analog of FPM
GETC 1Used to retrieve all data items í'rom arecord
GETM 1Used to retrieve all data items from arecord _
GETO 2 Useful when "working up "it) g! hierarchical d-ata
structure
GETR 2Typically, GETM is used
GFC 1Used to retrieve asingle data item from arecord
GFM 1Used to retrieve asingle data item from areeord
c: í"'a 2Useful when 'biorking up" in ahi([±rar'chical structure
GFR 2Typically, GFM is used
GMC 4TJsetul if only the number of" members ina s et i Cp
required
GOC 4Many—to—many analog of" GMC
GTC 5Typically used in comp lex nc±wcmking program< which
involve avariety of record types
GTM 4 Used with sets with multiple member types
GTO 4Used with sets with multiple owner types
OPEN 1Always used
PUTC 4 Typically, PUTM is used
+
PUTM 2Used to store all data items for arecord
PUTO 3Typically, PUTM is used
F'UTR 3Typically, PUTM is used
©COPYRIGHT 1979, 1980, Micro Data Base Systems, Inc. 266
MDBS Data l'danagement System Documentation
Command Usage
Name Level Us e
RMS 3Used when altering set membership
RSM 4Used when altering set membership
SCM 4 A! low" user alteration or currency indicmtor
d
seo 4Allows user alteration of currency indicator
SCR 4Al lows user alteration of" currency indicator
SFC 2Used to .sU"me asingle data item :i-n arecord
SFM 2Used to store asingle data item in arecord
SFO 3 Typically, SFM is used
SFR 3 "¡'ypically, SFM is used
SMC 4Typically, SMM or SMO is used
SMb! 2Usef"ul when m^ocessing non—hierarchical st.ruct.ures
-
SMO 2 Use f"'ul when "working up "in a ?7i€±rarchi-cal data
st.ructure'
SMR 3 Typically, SMM or SMO is used
SOC 4Typically, SOR is used
SC'M 2Useful when "working down "in ahierarchical dat3
structure
SOC) 3Useful in "forked" data structures
SOR 2 fjsefui in data load programs t.c set the current owner
f'or AMS
SRC 4 Use fu l when necessary topreserve acurrency
indicator
SRM 5Typically SRC is used
SRO 5 Typically SRC is used
A
STAT 5Used to measure memory/disk access trade—offs
TOGGLE 4ljstzÍ'ül in wei l—debugged programs which process large
quantities OÍ" data
©COPYRIGHT 1979, 1980, Micro Data Base Syst.eras, Inc. -267