• No results found

Gebruikers handleiding bij VMM

N/A
N/A
Protected

Academic year: 2021

Share "Gebruikers handleiding bij VMM"

Copied!
66
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Gebruikers handleiding bij VMM

Citation for published version (APA):

Latour, I. (1988). Gebruikers handleiding bij VMM. (DCT rapporten; Vol. 1988.002). Technische Universiteit Eindhoven.

Document status and date: Gepubliceerd: 01/01/1988

Document Version:

Uitgevers PDF, ook bekend als Version of Record

Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website.

• The final author version and the galley proof are versions of the publication after peer review.

• The final published version features the final layout of the paper including the volume, issue and page numbers.

Link to publication

General rights

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

• You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement:

www.tue.nl/taverne Take down policy

If you believe that this document breaches copyright please contact us at: openaccess@tue.nl

providing details and we will investigate your claim.

(2)

Gebruikers handleiding bij V M M

Inge Latour

(3)

STAGEVERSLAG B

Stagiare: ïnge Latour

Hogeschool Eindhoven

H.T.S, afdeling informatika

(4)

STAGEVERSLAG B

Bedrijf: Technische Universiteit Eindhoven fakulteit werktuigbouwkunde

Den Dolech 2

Eindhoven

Stagiare: Inge Latour

Gabriel metsulaan 30

Eindhoven

Bedrijfsmentor: Schoolmentor:

Dr.ir. Frans van de Vosse Drs. A. Lak Universitair docent Docent 1.0.

Afdeling werktuigbouwkunùe Afdeling Informatika vakgroep fundamentele werktuigkunde

Hogeschool Eindhoven

(5)

VOORWOORD

In mijn vorige verslag (stageverlag A) heb ik de organisatie en funktie van de fakulteit werktuigbouwkunde en de vakgroep

fundamentele werktuigkunde binnen de Technische Universiteit en de automatisering binnen de T.U. en de vakgroep fundamentele

werktuigbouwkunde behandeld. Ik heb ook de opdracht die ik

opgedragen heb gekregen, bestudering van de database (manager) VHM en zijn toepassingsmogelijkheden en het schrijven van een

gebruikershandleiding bij VMM, besproken. Mu zal ik de werkzaamheden die ik verricht heb behandelen en de hard- en software waar ik gebruik van heb gemaakt zal ik uitgebreider bespreken.

(6)

INHOUD PAG VOORWOORD INHOUD 1 INLEIDIMG 2 HARD- EN SOFTWARE 2.1 Computers 2.2 Printers 2.3 Software 3.1 Het begin 3.2 VNN 3.2.1 Gebruikershandleiding 3 . 2 - 2 Voorbeeldprogramma 3.2.3 Realisatie 3 VERRICHTE W E R K Z A A ~ H E ~ E ~ 3.3 De afloop 9 4 CONCLUSIE 10

BIJLAGE 1: Gebruikershandleiding bij VEE 11 3 4 5 6 6 7 7 8 8 8 8 8 8 -4-

(7)

1. INLEIDING

Dit is het B-verslag

ik doorbreng bij de vakgroep fundamentele werktuigkunde (wfw), onderdeel van de fakulteit werktuigbouwkunde (w), binnen de Technische Universiteit Eindhoven. Het is geschreven in opdracht van de H.T.S. afdeling Informatika.

gemaakt naar aanleiding van mijn stage, die

Het eerste deel van het verslag behandelt de hard- en software waarvan ik binnen de vakgroep fundamentele werktuigkunde gebruik heb gernaakt. Het tweede deel behandelt de werkzaamheden die ik verricht heb gedurende mijn stageperiode.

(8)

2 . HARD- EN SOFTWARE

2.1 Computers

De vakgroep wfw beschikt over een DOHAIN (Distributed Operating Hulti Access Interactive Network) systeem. Dit systeem bestaat uit "APOLLO DN3000 PERSONAL WERKSTATIONS"; 32-bit grafische

werkstations (in kleur en monochroom) met een intern geheugen van 4 PIb, gebaseerd op de HOTOROLA HC68020 microprocessor (zie figuur 2,l.a). Elk werkstation is een afzonderlijke computer. Van de 7

werkstations aanwezig OP de vakgroep wfw heeft 1 op de 3 een winchester disk van 170 Eb. 'Verder bestaat het systeem uit een "APOLLO DSPSO file server"; een high-performance processor die gebruikers toestaat om een groot bereik van randapparaten aan het DOHAIN systeem te verbinden, gebaseerd op de HOTOROLA PIC6802 microprocessor en met een winchester disk van 500 Hb. De

werkstations, nodes genoemd, en de file server zijn door middel van een netwerk met elkaar verbonden, waardoor grote groepen

gebruikers toegang kunnen krijgen tot gemeenschappelijke bestanden en randapparatuur. Eenvoudige terminals, Adm-5 genaamd, en

Personal Computers zijn verbonden in het netwerk als een Apollo terminal. Je kunt bijna alle Apollo functies gebruiken op de Ad%- 5's en de PC's behalve graphische functies.

APOLLO DM3000 PERSONAL WERKSTATION figuur 2.l.a

Windowing is mogelijk op de werkstations, Adm-5's en de PC's. Vindsws zijn gebieden op het beeldscherm waarin je tekst kunt lezen o f editen of programma's kunt executeren. Elke window is een aparte computing omgeving. Je kunt vele windows tegelijk op het scherm hebben. Het is mogelijk om de windows op 't scherm te bewegen, de vorm en grootte van een window te veranderen en je kunt als de windows elkaar overlappen de windows pushen en poppen

(bij de werkstations (nodes) gebeurt dit met behulp van een m i s ,

(9)

een klein met de hand vastgehouden apparaat dat je beweegt over een plat oppervlak teneinde de cursor op het scherm te

positioneren).

Er is op de vakgroep ook een PRIHE computer aanwezig, waar ik niet mee gewerkt heb, die binnenkort vervangen zal worden door een VAX computer.

2.2 Printers

De printers op de vakgroep waar ik gebruik van maakte zijn een laser printer en een matrix printer.

2.3 Software

De Apollo computer maakt gebruik van het operating systeent AEGIS, waar ik mee werkte. Het is ook mogelijk om onder ket operating systeem UNIX, een operating systeem voor multi-user systemen, te werken. De software waar ik verder mee werkte is COIN

(Cûntmand INterpreter), een gebruikersvriendelijke bibliotheek voor interactieve programma's met gebruik van menu's. Er is ook een Fortran-, Pascal- en C-compiler op de Apollo aanwezig.

(10)

3. VERRICHTE WERKZAAHHEDEN

3 . 1 Het begin

Bij het begin van mijn stage heb ik eerst kennis gemaakt met het DOHAIN systeem en het AEGIS operating systeem. Ook heb ik mij Fortran, een wetenschappelijk technische programm-taal die veel gebruikt wordt in een technische orogeving, eigen gemaakt uit een boek.

3 . 2 VpM

BEK is een database (manager) en bestaat uit een aantal

subroutines. Ik heb me gedurende geheel mijn stageperiode met VHH beziggehouden.

3 . 2 . 1 Gebruikershandleiding

Gedurende het grootste gedeelte van mijn stageperiode heb ik gewerkt aan een gebruikershandleiding bij VHH (zie bijlage

1:

Gebruikershandleiding bij VRMI.

Ik ben begonnen met het bestuderen en het beschrijven van de subroutines die bijna allemaal al beschreven waren. Ban de niet- beschreven routines heb ik de funktie en de beschrijving vaar de in- en uitvoerparameters erbij gezet, Beschrijvingen die niet klopten heb ik verbeterd en bij elkaar behorende routines heb ik bij elkaar gezet (zie bijlage 1: Gebruikershandleiding bij VNH: hoofdstuk 3 ) . Daarna heb ik de voordelen, structuur en indeling van VHH beschreven (zie bijlage 1: Gebruikershandleiding bij VHE: hoofdstuk 1 en 2 ) -

3 . 2 - 2 Voorbeeldprogramma

Nadat de gebruikershandleiding bij VMR bijna klaar was heb i k een demoprogramma gemaakt die de subroutines van VHH aanroept en waarmee je een aantal kubussen kunt creeeren (zie ook bijlage 1:

Gebruikershandleiding bij VHH: hoofdstuk 1). Dit heb ik gedaan met behulp van COIR en in de prograameertaal Fortran.

3 . 2 . 3 Realisatie

Eet de hulp van mijn stagebegeleider, Frans v.d. Vosse, heb ik de gebruikershandleiding bij BHR geschreven, Hij gaf adviezen omtrent de indeling en layout van de handleiding. Ten aanzien van het voorbeeldprogramma heeft hij ook adviezen gegeven. Verder werkte hij hoofdzakelijk controlerend en corrigerend.

(11)

3 . 3 De afloop

Tegen het einde van de stageperiode heeft Hans bieijsen, de ex- medewerker van de T.U. die VMH ontwikkeld heeft, de gebruikers- handleiding bij VHH nagekeken. Er zaten gelukkig geen storende fouten in naar ik heb de handleiding gelaten zoals het was omdat er geen tijd was om verbetgingen aan te brengen. De gebruikers- handleiding heb ik dus helaas niet meer helemaal af kunnen krijgen maar het voorbeeldprogramma heb ik wel binnen de tijd klaar

gekregen.

(12)

4 . CONCLUSIE

Tijdens deze stageperiode heb ik best wel veel geleerd. Ik heb kennis gemaakt met de praktijk en de werkorganisatie binnen de T.U., Ik heb het DOHAIM systeem leren kennen en het operating systeem AEGIS. Verder heb ik een voor mij nieuwe programmeertaal Fortran en de opbouw van een database hanager) leren kennen. Al met al voor Bij een geslaagde stageperiode.

(13)

BIJLAGE 1: Gebruikershandleiding bij VH€4

(14)
(15)

F'AE CONTENTS I. 3 1.1 F'rahïem d e f i n i t i o n d. 1.2 VMM A 1.3 S i m p l e case .".I

2

UEC~CR

1:

P-r

1

QN 5 2. 1 Recurd-names and r e c a r d s t r ! - i c t w e 5 2.2 Di r e c t o r y - r e c u r d s 4 2.3 UaTa-recardc 9 2.4 Heferencesi :i. 3 2 5 E d i t. ",_vmnt 15 2.6 E r r o r s 1 4 3 SUBRUU"i"II~ES UF V M M 17

3. 1 Tnitialxratinn rou'tine :i. '7

3.2 C r e a t e and delete rouTxnes 1d

3.3 f i t t r - i b u t e r o ~ i t i n e s .>:" 1..

3 rn 4 Fzeaci 1-ut.tt I nes 31

3.5 b i r i t e rcxcxxnes

3 - b E : . : i s t e r i c e rau%iirie 3 '7

3.7 Hecal l and sekve r - o t i t i nes 3 8

3.8 Fteferertcec: r o u t i n e ..:, C?

9 Hename rnuti ne 4 :l.

3 ~ J.

0

IYod i f y rutkt i nes LE

2

Zero r n u t i ne 4.4

Sequence r o w k i ne 45

'Trans1 a t e E cqi c a l name r u u t i ne 4 t3

R o u t i n e s + a r specialzsts 4 7

3.14.1

I,-ow l e v e l r o u t i n e s bi '7 :3.

14,1"

1

b l o c k s y s t e m arid r e g i o n s - t a b l e 4.7 4 3 51 a">

1

I NTRODUL'Ï I: ON I- "T .-> -> ... '. c i, 3. 14.3 Cumpresr, roc-t-kirte .JL.

(16)

1. INTRODUCTION

1.1

Problem definition

Suppose we want to create a number of cubes. First we create 8 points, then 12 lines each referencing 2 points, then 6 surfaces each referencing 4 lines and finally a number of cubes each referencing 6 surfaces. In vpi# we create therefore 4 directories

named POINT, LINE, SURFAC AND CUBE containing respectivily points, lines, surfaces and cubes. Because the size of the problem is not completely known we want dynamic declaration to be possible. Also we don't want to delete a point, line or surface that is referenced respectively by lines, surfaces or cubes. Therefore we want that the points, lines and surfaces contain backpointers to respectively the lines, surfaces and cubes that reference then, so they can't be deleted.

The size of our problem is not completely known which can cause problems.

There are in general two solutions:

-

arrays are dimensioned: there is a restriction on the number of cubes, surfaces etc.

-

several arrays are put in one big array that is declared

previously. In the array variables of various types, like real, integer and complex, are mixed. Differences in wordlength make this approach little transferable to other systems. Also demands this approach that at the beginning of the program the size of the arrays (these arrays contain for example the coordinates o f the points) must be known.

These problems can be removed by Wlí (Virtual Hemory Hanagerf. Although the programming language Fortran is frequentely used in a technical environment, this language has not a mechanism with which storage-space can be dynamically declared at it's disposal. This is possible in W. Important in W is the possibility of dynamic declaration and the data-structure (directory-structure and the possibility of backpointers etcetera).

Advantages of W H :

-

complete dynamic declaration is possible ora any spot in the program for all kind o f types of variables

-

storage-space can be destroyed again through which storage space is available again (think of temporary working memory)

-

there is but one limitation what the maximum problemsize is concerned and thatsis the maximum length of all the arrays

together: with the current coniputersystems (among others APOLLO,

VAX, PRIHE, IBH) this length can be adjusted to the hardware:

-

large problems are lisnited by the available hardware

-

small problems can be calculated through by tresspassing as little as possible on the present systems.

(17)

-

VlíM screens machine-dependencies of the memory again from the

-

it's an efficient program. All the algorithmes are aimed at

program, written by the user. This screening makes the programming more easily transferable

maximum processing-speed and a minimal overhead with which the algorithmes burden the application.

1.3 Simple case

We simplify our problem and lift out a simple case. Suppose we want to create a line that references 2 points. First we create 2

directories labeled POINT and LINE, then 2 points in directory POINT labeled 1 and 2 and then 1 line in directory LINE labeled 1 that references the two points in directory POINT. The points then contain backpointers to the line and can't be deleted. This simple case will be handled in chapter 2 t o show the structure in !WEIe We show here a program in Fortran that creates 2 points and 1 line

that references the 2 points: PROGRAH CUBES

---

_-_---

C C

C THIS PROGRAH CREATES 2 POINTS (DATA-REc~RDS LABELED 1 AND 2

C WITH LENGTH 3 (X-t Y- AND Z-COORDINATE) AND TYPE REAL ( ~ 2 ) )

C IN DIRECTORY POINT A I D 1 LINE (DATA-RECORD LABELED 1 WITH C LENGTH 2 (THE 2 POINTS) AND TYPE LOGICAL MAHE (WITH

C B ~ C K ~ O I N ~ E R ~ (=I11 (See paragraph 2 . 3 Data-records)) IN C DIRECTORY LINE THAT REPERE~CES THE 2 POINTS.

C

C THE ~ 0 BLOCK WITH HABE /HEHORY/ IS D E F ~ ~ E D ~ ~ 0 ~ IN THE PILE C '~COBMON.IN~' C %INCLUDE '/SRC/VMM/ZCOHHON.I~S~ %INCLUDE '/SRC/VMH/HOLIB/HOLIB.INs' %INCLUDE '/SRC/VMW/FOLIB/FOLI~.INS' %INCLUDE '/SRC/V~H/IOLIB/IoLIB.~N~~ C

C VHE USES THE LIBRARIES MOLIB, PQLIB, IOLIB AMD SOLIB, C THEREFORE WE BUST STARTUP THE LIBRARIES HOLIB, FOLIB AND

c

c

ram.

REAL R(1) EQUIV~LENCE (R (1 1 , M (1

1

1 INTEGER KBUFP(2),ILBP,ENABP,~LAl~LNAWl~~POS,ILA2~ @ L N A M 2 , I L ~ L ~ L N ~ B L P I L A 3 , L N ~ ~ 3 ~ I L ~ N C C STARTUP THE L ~ B R A R r E ~

c

CALL HOSTART CALL FOSTART CALL IOSTART CALL ZINIT(5,1,300000) C IMITIALIZE VBH

(18)

CALL SOSTLA ( 'POINT' 5 ILAP) CALL ZCRTE(-lrILAPrOr5rLNAEP)

C CREATE THE DATA-RECORD LABELED 1 WITH TYPE REAL (=2) AND C LENGTH 3 IN DIRECTORY POINT

CALL SOSTLA ( ' 1 ' r 1 ILA1)

CALL ZCRTE (LNAMP ILA1 2 , 3, LNAMl)

C FILL RECORD WITH LOGICAL WAEE LNAHl IN DIRECTORY POINT 10 IPOS=LNPOS (LNAM1)

CALL ZZERO(LMAH1) DO 20 I=1,3

R (IPOS+I-I)=I 20 CONTINUE

C CREATE THE DATA-RECORD LABELED 2 WITH TYPE REAL (=2) AND C LENGTH 3 IN DIRECTORY POINT

CALL SOSTLA ( ' 2 ' 1 ILA2)

CALL ZCRTE (LNAMP ILA2 2,3 r LNAH2)

C FILL RECORD WITH LOGICAL NAME LRAM2 IN DIRECTORY POINT 30 IPOS=LNPOS (LNAM2)

CALL ZZERO (LRAM2

1

DO 40 1=1,3

R (IPOS+I-l)=I 40 CONTINUE

C CREATE DIRECTORY LINE

CALL SOSTLA ( ' LINE ' r 4 r ILAL)

CALL ZCRTP: (-1 r ILAL r O r 5 r LNAML9

C CREATE THE DATA-RECORD LABELED 1 WITH TYPE LOGICAL NAME C (WITH BACKPOINTER) (=11) AND LENGTH 2 IN DIRECTORY LINE

CALL SOSTLA ( ' 1 ' 1 ILA3)

CALL ZCRTE(LNAHL,ILA3,11,2rLNAM~)

C FILL RECORD WITH LOGICAL NAME LNAM3 IN DIRECTORY LINE KBUFF (1) =LNA%l

KBUFF ( 2

1

=ERAES

CALL ZWF (LNAIrI3 1 KBUFF, ILEM) C

C END ALL LIBRARIES C CALL IOEND CALL FOEND CALL EOEND CALL pgm-$EXIT END

(19)

2 . DESCRIPTION

The database in which VMPn stores it's data is a large one-

dimensional array Ei which is in the common block with name /memory/. The maximum size of the database is initialized with subroutine ZINIT.

initialization o f VMH in our program:

- _ - -

CALL ZINIT (5,1,300000)

- - - -

In VlfH there are two kind of records: data-records and directory- records :

-data-records contain data like integers and reals

-directory-records contain entries (data-records or/and directory- records (these directory-records can contain again data-records or/and directory-records etc.)).

A data-record with a specified length and type is comparable to a file.

2.1 Record-names and recordstructure

In VlfH the whole of records are classed in a hierarchical structure, This structure shows large resemblances with the filestructure of an operating systea. The different levels in the recordstructure are separated by a dot ('.')r the record-name of the root-directory (the

top level) is ' O ' . The pathname (complete name of the record up to the root- directory) of a subdirectory of the root-directory is for example '0.DIRONE' and the pathname o f a data-record in directory

'O.DIROBJE' is for example 'O.DIRONE.DA~~* etc.. You can convert a label (string) to a label (integer:interpreted integer value of a

string) with subroutine SOSTLA. For example: SOSTLA('DIRONE',G,ila) converts the label (string) 'DIRONE' with 6 characters to label

(integer) ila.

Hierarchical structure of records:

'O' (root-directory)

/ I \ \

'0,DIRONE' 'OO.DIRTWO' *O.DIRTHREE' 'O.DATA' ~0~DIRONE.DATA' '0,DIRTWO.DATA' 'O.DIRT~RE~.DIRTHREE~

' 0 - D ~ R T ~ R E E . D ~ R T ~ ~ E ~

/ / \

a

In our problem the recordstructure looks like this:

' O ' (root-directory)

DATA '

/ \

O. POINT ' '0 .LINE 3

/ I I

(20)

2 . 2 Directory-records

When a directory is created with subroutine ZCRTE a directory-block (which contains information of the directory like type, length etc.) with length ldir is created and a hash-table with length mbl.

Creating of directory labeled 'POINT' in the root-directory in our program:

- - - -

CALL SOSTLA ( 'POINT I , 5 I ILAP)

CALL ZCRTE (-1 i ILAP r O p 5 LNABP)

- - - -

A hash-table contains logical names (see under HASH-TABLE) of the entries (data-records (files) and/or subdirectories (directory- records) in the directory, You can read from a directory-record with the following subroutines:

ZEXST : searches in the directory a record with a certain ZRF , ZRFR : reads all resp. a part of the items from the ZFRST,ZMEXT : returns first resp. the next item from the

label, logical name of record is returned record record. STRUCTURE OF DIRECTORY-BLOCK: lndir-->~~(lndir+il)=adir 1 i I i B (lndir+im) =Inmast IB(lndir+ia)=ila I Ivf (lndir+i t) =O I iB(lndir+if)=iref IB(lndir+lhtab) =ihtab I i B (lndir+lnbl) =nbl f B (lndirilmbl) =mbl I B (lndïr+lseq) =iseq I I I I / \ I I I I I ldir 1 I I \ /

lndir is the logical name of the directory (=pointer to directory- block (start-adress in B of the directory-block)), uniquely

identifying the directory.

The indexes il,im etcera are defined in the file 'params.ins': parameter (il=O,im=1,ia=2,it=3,if=$,iu=5) parameter

(lhtab=5 I lnbl=6 I lmbl=7 lseq=8) (the index iu is only used in data-

records).

The first position (ldir) in the directory-block contains the The second position (Inmast) contains the logical name of it's

The third position (ila) contains the label (integerf of the length of the directory-block.

master directory (directory-record). A master directory of a record is the directory in which it is.

directory, A label (string) is converted to a label (with subroutine SOSTLA), that is an integer (interpreted integer value of a string), uniquely identifying the record within his

(21)

master directory-record. On 32-bit integer computers the number of characters in a string to be encoded cannot exceed 6. Longer strings will be truncated to 6. The legal character-set to be encoded contains A-2 (uppercase) blank and underscore ( J .

The fourth position (itype) contains the type of a directory ( = O ) . The fifth position (iref) contains pointer to reference-table (see

paragraph 2.4 References) (=O if there isn't a reference-table). The sixth position (ihtab) contains the pointer to the hash-table. The seventh position (nbl) contains the number of entries

(subdirectories or data-records) in the directory (directory- record).

The eigth position (mbl) contains the length of the hash-table which is originally of length nexpo (increment for expansion

directories: see paragraph 3.1 Initialization routine and see under HASH-TABLE).

sequence of a directory).

The last position (iseq) contains the sequence of a directory (see

root-directory:

The directory-block o f the root-directory has pointer lndir=-l. The second position of the directory-block will then contain Inmast=-1, the pointer to the root-directory itself. Subroutine ZINIT creates the root-directory-block with it's hash-table.

In our problem we create 2 directories labeled POINT and LINE, Ve show here the contents o f M containing the directory-block of directory POINT:

H(119) = i0 (=ldire length of the directory-block) M(120) = 103 {=lnmast: the logical name of it's master- H(121) = 2001151472 (=ila: label of the directory-record was

H(122) = O (=itype: type of directory)

M(123) = O (=iref: there are no records in the system referencing this record)

H(124) = 129 (=ihtab: pointer to hash-table)

%(I251 = 2 {=nbl: number of entries: the directory POINT contains 2 entries)

H(126) = 6 (=mbl: length of hash-table)

H(127) = 1 (=iseq: sequence of the directory)

E(128) = O (this is an empty place because the length of a directory that is here the root- directory)

converted to an integer with subroutine SOSTLA: SOSTLA('PO1NT' , 5,ila)

block must always be even)

HASH-TABLE

The hash-table contains three kind of entries:

1

-

positive integers, which are in fact logical names

2

-

zero integers, which indicate empty slots 3

-

negative integers, indicating deleted records.

(=pointers to blocks {startadresses in i'i of the blocks)) OE

(22)

Sequence o f a directory:

There are three kinds of hash-tables currently in use, all of which can be handled with the normal hashing techniques, although some faster methods exist f o r some o f them. Tables will be rehashed (that is the hash-table is expanded with length nexpo (increment for

expansion directories) (see paragraph

3.1

Initialization routine)) if they are more than half full, except table type

1,

which can be almost full. With the hash-function iposh=mod(ila,mbl)+ihtab the position iposh, where the label ila is to be hashed in, is found, When this position is occupied (M(iposh)>O) the hash-table is sequentially searched for an empty place,

The sequence of a directory is the order in which the logical names of the entries (data-records and/or subdirectories (directory- records)) are stored in the hash-table of the directory.

Directories can be of 3 different sequence types O, 1 or 2 =hash- table-type:

O

-

(PS (lndir+lseq) =O) normal hashed table

1

-

(lf(lndir+lseq)=l) sequential table (index in the table

(iposh-iktab) is equal to the label). This a compact table type

2

-

(#(lndir+lseq)=Z) sorted (the logical name of the entry with the lowest value of it's label will be in the top of the hash-table) and compressed table which can be read out sequentially with subroutine ZRFR, in order to get the entries. Directories stay sequenced until they are modified,

When a directory is created it is of sequence type

1.

A directory is sequenced (sequence type 2) if it is sorted and compressed. You can sequence a directory with subroutine ZSEQ. When a new label is

hashed in the hash-table with subroutine ZCRTE, a label is hashed out of the hash-table with subroutine ZDELE or ZDELQ or a directory is Imodified with subroutine ZPSDFY the directory isn't sequenced any more.

example structure of HASH-TABLE: ihtab-->lH(ihtab) =lname4 / \ I E (ihtab+l) =lname2 I I lH(ihtab+2) =O I I iH(ihtab+3)=-lname3 1 I IH(iposh1 =Inamel I I 1 I I 1 I rabl I i I 1 1 I I I 1 I I \ - / \ ~ /

i

I I i \ /

-

3-

b

(23)

In our problem the hash-table of directory LINE contains 1 line: logical name of the data-record labeled 1 and the hash-table of directory POINT contains 2 points: logical names of the data-records labeled 1 and 2. We show here the contents of W containing the hash- table of directory POINT:

M(129) = O (empty slot9

B(130) = 235 (=logical name of data-record in directory POINT B(131) = 145 (=logical name of data-record in directory POINT B(132) = O (empty slot) pf(133) = O (empty slot) W(134) = O (empty slot) labeled 1) labeled 2) 2.3 Data-records

Following data-types are recognized: 1: integer"4 2: real 3: double real 4: logical 5: complex 6: double complex 7 : integer*2 8: byte 9: quad precision 10: descriptor

11: logical name (with back-pointer) 12: logical name (with usage count)

13: logical name

14: multiple field record

15: self-descripted multiple field record

When a data-record is created with subroutine ZCRTE it is hashed in the hash-table of it's master directory-record (see paragraph 2.2 Directory-records). The first six positions of the block are filled

(status-section) and logical name lname (=pointer t o block (startadress in W of the block)) is returned.

Creating of data-record labeled 1 in directory LINE (with logical name lnaml) with type logical name (with back-pointer) (=11) and length 2 in our program:

- - - -

CALL SOSTLA ( E 1 ' I 1, ILA3)

CALL ZCRTE(L~ApfL,ILA3,11,2~LNA~~3)

- - - -

Creating of data-record labeled

I

in directory POINT (with logical name lnamp) with type real (=2) and length 3 in our program:

- - - -

CALL SOSTLA ( ' 1 ' ,1, ILA1)

CALL ZCRTE(LNAWPrILAlr2,3,LNA~I)

(24)

A data-record is what is seen by the user (the data) and a block is the physically stored data-record {status-section and data). A

status-section o f a block contains information about the data-record like length, type etcetera.

There are two kind of data-records:

-single field records (=sfr)(type 1-->13) contain one field. A field = number of items of the same data-type (=length as seen by the user (ulength)), so one field can't contain both integer- and real elements. You can read and write from and to these records with the subroutines ZRF, ZRFR, ZWF, ZWFR. There is a second possibility to write t o these records, namely direct adressing with the help of function LNPOS. First you fetch ipos, the pointer to the data in the block with logical name lname with function LNPOS:

ipos=LNPOS(lname). Then you can write data directly to /memory/: for example M (ipos

1

=2.

Filling of data-record labeled 1 and with logical name lnam3 in directory LIME in our program:

- - - -

KBUFF ( 1) =LNAHl KBUFF (21 =LNAH2

CALL ZWF (LNAH3,l KBUFF, ILEN)

- - - -

Filling o f data-record labeled 1 and with logical name lnaml an directory POINT in our program:

- - - -

10 IPOS=LNPOS (LMAHl) CALL ZZERO ( L ~ ~ H l .I DO 20 1=1,3 R (IPOS+I-I)=I 20 COETINUE

- - - -

-multiple field records (=mfr) (type=l4 or 15) contain several fields which may be of different length and different type. One field of the mfr is comparable to the one field of the sfr. You can read and write from and to these records with subroutines ZRF, ZRFR, ZWF, ZWFR

.

A descripter-record (type=lO) contains the types and lengths (number of items) of the fields of the multiple field record. The number o f

items of the descriptor-record is equal to the number of fields of the multiple field record. If record-type=l5 the €irst field in the record is the descriptor and you don't have to create a separate descriptor-record. If record-type=14 you must create a deserlptor- record first and then the multiple field record (type=l4) with input

(see under STRUCTURE OF DATA-RECORD-BLOCK) ulength=logical name of the descriptor. The multiple field record (type=l4) then references the descriptor-record.

example: mfr with type=l5 containing 1 field of type 10 with length 3, 1 field of type 1 with length 6 and

1

field of type 2

with length 4,

Displayed with edit-vmm (see paragraph 2.5 Edit-vmm) it looks like this:

Logical name of the record Pathname of the record

(25)

Pointer/path is: 203% ==> O.VIJFTI Field #1 of type : 10 1: 10 2: 1 3: 2 1: O 6: O Field # 2 of type : 1 Field # 3 of type : 2 1:

.o

3 6 4 O

.o

O

*o

O

.o

O

example: mfr with type=l4 containing 1 field of type 1 with length 6 and 1 field of type 2 with length 4 .

Displayed with edit-vmrn (see paragraph 2 . 5 Edit-vmm) it looks like this:

Logical naae of the record Pathname of the record

I I

Pointer/path is: 251% ==> O.VEERT1 Field #1 of type : 2 1: 6: Field #2 of type : 2 1: O O

.o

O O

.o

O

.o

O descriptor-record to match:

Displayed with edit-vmm (see paragraph 2 . 5 Edit-vmm) it looks like this:

Logical name of the record Pathnaime of the record

1 1

Pointer/path is: 187% ==> O.TIEH Field #1 of type : 10

1:

2: 1 2 STRUCTURE OF DATA-RECORD-BLOCK: lname-->fM(lnametil)=length I i M (lname+im) =Inmas t I M (hametia) =label I 1 I4 (lname+it) =itype 1 i I4 (lname+if

1

=iref I

1

E4 (lnametiu) =ulength I (---I ipos--> IM(ipos)= I i M (ipos+l) = I I I I I I I \ / 1 \ I / 6 4 I I

(26)

lname is the logical name of the data-record (=pointer to block (startadress in of the block)), uniquely identifying the data- record.

The indexes i1,im etcera are defined in the file 'pararns.1n.s': parameter (il=O,im=l,ia=2,it=3,if=4,iu=5)

The first position (length) in the data-record-block contains the The second position (Inmast) contains the logical name of it's The third position (label) contains the label of the data-record. A

real length of the data-record (length of block). master directory-record.

label (string) is converted to a label (with subroutine SOSTLA), that is an integer (interpreted integer value o f a string), uniquely identifying the data-record within it's master directory-record, On 32-bit integer computers the number of characters in a string to be encoded cannot exceed 6. Longer strings will be truncated to 6. The legal character-set to be encoded contains A-2 (uppercase) blank and underscore

(-1

.

The fourth position (itype) contains the type o f the data-

record (1-->15).

The fifth position (iref) contains the pointer to the reference- table (see paragraph 2.4 References) (=O if there isn't a reference-table).

The last position (ulength) contains the length of the data-record as seen by the user (number of items if type=l-->13, logical name of descriptor if type=14, number of fields if type=15). ipos is the pointer to the data in 'the data-record-block.

In our problem we create 3 data-records: 2 data-records of type real

( = 2 ) and with length 3 in directory POINT and

1

data-record of type logical. name (with backpointer) (=11) and with length 2 in directory LINE. These data-records are single field records. We show here the contents of -4 containing the data-record-block labeled 1 in

directory POINT and the data-record-block labeled 1 in directory LIME :

Data-record-block labeled 1 in directory POIMT: status-section:

H(135) = 10 (=length: length of the block) W(136) = 119 (=lnmast: logical name of it's

master-directory (here directory labeled POINT) )

-41137) = 1 (=ila: label of the record was

converted to an integer with subroutine SOSTLA: SOSTLA ( ' 1

,

1

, ila)

lí(138) = 2 (=itype: here type real)

E(139) = 179 (=iref: pointer to the reference-table (see paragraph 2 . 4 References))

H(l40) = 3 (=ulength: length as seen by the user is 3 (the 3 coordinates of the point))

lí(l41) = 1065353216 (=integer notation for the real 1.0 (x-coordinate))

-4(142) = 1073741824 (=integer notation for the real 2.0 the data:

(27)

(y-coordinate))

H(143) = 1077936128 (=integer notation for the real 3.0 (z-coordinate))

N(l44) = O (this is an empty place because the length of a block must always be even)

Displayed with edit-vmm (see paragraph 2.5 Edit-vmm) it looks like this :

Logical name of the record Pathname of the record

I I

Pointer/path is: 135% ==> O.POINT.l

Field # 1 of type : 2

1: 1. 2. 3 .

w

u

H

Data-record-block labeled 1 in directory LINE: status-section:

171) = 8 (=length: length of the block)

272) = 155 (=Inmast: logical name of it's Easter-

173) = 1 (=ila: label of the record was converted to an directory (here directory labeled LIME))

integer with subroutine SOSTLA: SOSTLA('1',l,ilal

(=itype: here type logical name (with backpointer))

(=iref: there are no records in the system referencing this record)

(=ulength: length as seen by the user is 2 (the

2 points) H(174) = 11

H(1751 =

o

N(176) = 2 the data:

H(177) = 135 (=logical name of the record labeled 1 in directory POIMT)

(=logical narne of the record labeled 2 in directory POINT)

Displayed with edit-vmm (see paragraph 2.5 Edit-vrnnm) it looks like this:

Logical naae of the record PathnaEe of the record

I I

Pointerlpath is: 171% ==> O.LIME.1

Field # 1 of type : 12 1: O.POINT.l

2.4 References

O. POINT. 2

You can create two kind of references: -logical name (with backpointer]: type 11 -logical name (with usage count): type 12 Usage:

(28)

First you create a multiple field record with a field (for example field 1) of type 11 or 12 (or a single field record with type 11 or 12) with logical name lnaml. Then you create another record with logical name lnam2. You write logical name lnam2 to the field of type 11 or 12 of the multiple field record. If type=ll a reference- table belonging to the record with logical name lnam2, which

contains usage count and back-pointers, is made. The record with logical name lnam2 then contains a back-pointer to the multiple field record with logical name lnaml.

Creating back-pointers: a reference table is made if it

Creating usage counts: 1 is added by the second position in the doesn't already exist and logical name lnaml is put in the reference-table,

reference-table: (M(iref+l) =M (iref+l) 91) (if the reference-table doesn't exist a counter is kept), so you can count the number of

references (without back- pointers).

You can not delete a record (here record with logical name lnam2) that is referenced by another record (here record with logical name lnaml). First delete the record with logical name lnaml and then the record with logical name 1nam2.

example :

lnaml-->lH(lnamltil)=lengthl I lnam2-->lH(lnam2+il)=length2 i

~M(lnaml+im~=lnmastl I fM(lnam2+im) =Inmast2 !

f M (lnaml+ia) =ilal I I M (lnarn2tia) =ila2 I

IM(lnamltit)=itypel IH(lnam2tit)=itype2 I

I M (Inaml+if 1 =iref 1 t IM(lnamS+if )=iref I

!H(lnaml+iu)=ulengthli IH(lnam2tiu)=ulength2~

i---l I---l

bposl-->fM(iposl)=lnam2 f Ipos2--> IM(ipos2)= I

i M (iposl+ll= I I M { Inamail

1

= I MFR-BLOCK DATA-RECORD-BLOCK

...

...

i I I I 1 I I I 1 I I I I I I I

i

\ I / \ I I

I

\ I / \ I / I I I I 1

lnaml is the logical name of the multiple field record (mfr). iposl is the pointer to the data in the mfr-block.

Field 1 contains the logical name of the record (lnam.2). Inam2 is the logical name o f the record.

ipos2 is the pointer to the data in the data-record-block. The fifth position in the record with logical name lnam2

(29)

REFERENCE-TABLE

...

iref --> IM (iref 1 =nref I I \ J H (iref+l) =u.c. IH(iref+Z)=lnaml I I I I I I 1 nref

:

\ I \ I O I O I I I I I I I I I I I I I I I 1 I I O I \ I

iref is the pointer to the reference-table.

The first position of the reference-table contains the length of the The second position contains usage count (excluding baek-pointers) e

The next positions contain reference-pointers (back-pointers). The last positions contain zeroes.

In our problem the data-record labeled 1 in directory LINE

references the data-records labeled f and 2 in directory POINT. The data-records labeled 1 and 2 (the points) contain backpointers t o the line so that they can't be deleted. We show here the contents of H containing the reference-table of the data-record labeled 1 in directory POINT:

reference-table.

E(179) = 4 (=length of reference-table) H(180) = O (=usage count: here not present)

H(181) = 171 (=logical name of the data-record labeled 1 in directory LINE: backpointer)

H(l82) = O (empty place)

2.5 Edit vmm

It is sometimes easy, in order to not having to write a program at once, to look at what a database, created by Vrrrs, looks like. You can do that by running the program edit-vmn. The helptext becomes visible after typing ':' and g i v e s the following message:

The VHH-editor is a tool for V?€M applications. it can be used in two different ways:

1

-

as a stand-alone program, t o edit dumped files,

OF to get aquainted with the VHE-package

2

-

linked in an application, to do run-tirce edit ing.

With edit-vam you can create data-records and subdirectories (directory-records) with the command 'CR' and you can delete them with the command 'DEL' after which storage-space is available again. When the editor asks for enter label\path

O ?

you must give a

(30)

The command 'DIR' shows the contents of the current directory (selected with the 'SC' command) on screen. The subdirectories and data-records are seperately listed. Also, the current directory is displayed as a full path (pathname).

The command 'FD' shows the contents of the current directory with the labels, types, lengths and logical names (pointers) of the records on screen. Also, the current directory is displayed as a full path (pathname) and the logical name of the current directory is displayed.

You can show the contents of a data-record on screen with the command 'RF' and you can write items in a field of a data-record with the command 'WF'.

You can find references (back-pointers and usage count) to a record and show them on screen with the command 'BP',

With the command 'E' you enter a submenu and you can dump or recall a file. You can dump a file with the command 'DF' to save the data in the common block with name /memory/: /memory/ from start of data in /memory/ to end of data in /memory/ is dumped. You can recall a file with the command 'LF' which you have dumped with edit-vmm or with your own program with subroutine ZSAVE. The contents of the file is put in the current (empty) directory,

With the command 'LN' you can show the contents of the common block with name /memory/ (any position(s1 in /memory/ you like) on screen. You can set the trace-level with comrnand 'Te (see paragraph 2 . 1 4 . 2

Trace routine).

With the command 'TP' you can show the pathname of a record on screen if you enter the logical name of a record (pointer).

Idhen an operation is executed with a command and the operation is succeeded

***

succes

***

is shown on screen. Otherwise there's gone something wrong.

There are a few other comrnarads which will be made clear to you when you use edit-vmm.

2,6 Errors

On account of errors with the pro~~amming various errors can occur. W H then provides for error messages. The status-section of the records in the VMM database can be overwritten by wrong writing away of data. This is one of the most annoying things that can go wrong. The database in which one is working must than be considered lost. The error is established when the user tries t o save the database. During this saving the database will be compressed with subroutine ZCOEPR. This routine uses all status sections and detects that there is nonsense in some of them. The execution of the program then

terminates and you can run the program zdonstk to gain extra information on the point where it went wrong in VHH.

(31)

3 . SUBROUTINES OF WM

3.1 Initialization routine

initialize memory manager: create root directory-block with it's hash-table and initialize the block system

arguments:

description

zinit subroutine

nexpo I var int*$ increaent €or expansion directories

istr0 I var irat*4 start o€ data in /memory/

maxim I var int*4 maxim~m length o€ data in /memory/ (see paragraph 2 . 2 Directory-records: under HASH-TABEE)

(32)

create a record with logical name lname in the directory (directory-record) with logical name lndir

arguments:

naxie I/O type description

zcrte subroutine

lndir I var int*$ logical name of the directory in which the record should be created

(the label (string)

OE

the

directory is converted to a label (integer) with subroutine SOSTLA: p.e. SOSTLAI'POINT',5,ilad) and the logical name of the directory is fetched with subroutine ZEXST: p.e. ir! the root-directory:

ZEXST(-l,ilad,lndir)). IE <= O : it will be created in the root

directory

ila I var int*$ record label (a label (string) is converted to a label (integer: interpreted integer value of a string) with subroutine SOSTLA: p.e. SOSTbA('l',l,ilaI)

itype I var int*4 record type Following data-types are recognized: O: directory 1: integer*$ 2: real 3: double real 4: logical 5: complex 6: double complex 7 : integer*2 8: byte 9: quad precision 10: descriptor

11: logical name (with back-pdnter) 12: logical name (with usage count) 13: logical name

14: multiple field record

15: self-descripted multiple field record

ilen I var int*4 number o f items in single field records (type = 1 --> 13) directories (type=O):

(33)

initial maximum of entries (data-records or/and

subdirectories (directory- records)). Take O for system default (=nexpo=5)

(type=ll) : logical name of (type=l5): number of fkelds multiple field records

descriptor

Inane O var int*4 logical name of the record created

(if <= O: this record already

exists

1

additional comments:

records of type 15 are defined in two steps:

1

-

create, specifying the number of fields (including field

2

-

write field

1

(with subroutine ZWF), after which the

1,

which is of type 10, containing the descriptor). The number of fields should be greater then 1.

record is fully defined

(34)

to delete a data-record, or a directory if it is empty, with logical name lname, after which storage-space is available again

arguments:

name I/O type description

zdele subroutine

lname I/O var int*4 input : logical name o f the record output: logical name of the record:

unchanged : record not If <= O : record deleted

deleted

additional comments:

reasons why records are not deleted:

1

-

record is a directory, and it is not empty. Use subroutine ZDELO to overcome this problem

2

-

there are records (type=lI:logical name (with backpointer) or type=l2: logical nane (with usage count)) in the system, that reference this record. LOO]: them up with subroutine ZREF

3

-

record is the root directory, that can not be deleted

(35)

delete directory (directory-record) or data-record with logical name lname, with treewalking, after which storage- space is available again

arguments:

name I/O type description

zdelû subroutine

lname I var int*4 logical name o f the record to be deleted. This may be a directory, that's not ernpty

additional comments:

reasons why directories are not deleted:

1

-

there are records (type=ll:logical name (with backpointer) or type=12: logical name (with usage count)) in directories outside the directory with logical narae lname, that reference data-records or/and subdirectories (directory-records) in the directory with logical name lnarne. Look them up with subroutine ZREF 2

-

directory is the root-directory, that can not be

deleted

(36)

return all common record attributes from record with logical name lname

arguments:

name I J 0 type description

zattr subroutine

lname I var int*4 logical name o f the record

ila 0 var int*4 record label (integer:

itype O var int*4 record type

interpreted integer value o f a string)

Following data-types are recognized: O: directory 1: integer*4 2: real 3 : double real 4: logical 5: complex 6: double complex 7: integer*2 8: byte 9: quad precision 10: descriptor

11: logical name (with back-gointer) 12: logical name (with usage count) 13: logical naae

14: multiple field record

15: self-descripted multiple field record

ilen O var int*4 number of items in single field number of entries (data-records

records (type=l-13) and/or subdirectories

(directory-records)) in directory-record (type=O)

(type=14) : logical name of (type=15): number of fields multiple field records

descriptor lnmast 0 var int*4 logical name of master

directory-record addit ionai comments :

(37)

some care is taken not using the parameters t5at are output,

so calls like ZATTR(lname,lname,lname,~name,lname~ should be possible, without a crash.

(38)

lnla

--

convert logical name lname to label (integer: interpreted integer value of a string) lnla

arguments:

name I/Q type lnla

lname

description

O exfunc int*4 label of record

I var int*4 logical name of record

(39)

lnlen2

--

from logical name lname, field ifld, of record t o length lnlen2 arguments: name 1/0 type lnlen2 O lname I if Id I description

exfunc int*b length of field ifld in record var int*4 logical name of record

var int*4 field #/

(type=l-->15)

(40)

lnlen

--

from logical name Pname of record to length lnlen arguments: name 1/0 type lnlen lname description

O exfunc int*4 number of items in single field number of entries (data-records

records (type=l-->13) or/and subdirectories

(directory-records)) in directory-record (type=O)

(type=14): logical name of (type=159: number of fields multiple field records

descriptor int*$ logical name of record

I var

(41)

lntype

--

from logical name lname to type lntype arguments:

name I/O type description

lntype O exfunc int*4 type of record

lname I var int*$ logical name of record Following data-types are recognized:

O: directory 1: integer*4 2: real 3 : double real 4: logical 5: complex 6: double complex 7 : integer*2 8: byte 9: quad precision 10: descriptor

11: logical name (with back-pointer) 12: logical name (with usage count) 13: logical name

14: multiple field record

15: self-deacripted multiple field record

(42)

lnmast

--

from logical name lname to logical name of master directory-record Inaast

arguments:

name 1/0 type description

lnmast O exfunc int*.% logical name of master directory- record

lnaae I var int*$ logical name of record

(43)

lnpos2

--

from logical name Inane, field ifld, of record to position Inpos2 in /memory/

arguments:

name I/O type

inpos2 0 exfunc int*l

lname I var int*4

if Id I var int*4

description

physical position of field ifld in this block

logical name of record

(=pointer to block (startadress in H of the block) 1 (type=l--> 15)

field #

(44)

lnpos

--

from logical name lname of record to position lnpos in /memory/

arguments:

name 1/0 type description

lnpos 0 exfunc int*Q physical position of data in lname I var int*4 logical name of record

this block

(=pointer to block (startadress in H of the block)) (type=l-->

15)

(45)

3.4 Read routines

find first entry (data-record or subdirectory (directory- record)) in a directory (directory-record) with logical name lname

arguments:

name description

zf

rst subroutine

lnanie 1/0 var int*$ input : logical name of directory

(if <= O the root directory

is searched)

output: logical name t o first entry

(if <= O there's no entry

in directory) additional comments:

ZFRST normally returns a random entry in the directory. If the directory was sequenced before (and not been written afterwards), the label with the lowest value will be

returned, although the use of subroutine ZRFR is preferred in this situation (and that's much faster).

(46)

find next entry in a directory (directory-record) arguments:

name I/O type description

znext subroutine

lname I/O var int*4 input : logical nane of entry in a output: logical name of next entry

directory

(if (= O : there's no entry in directory)

additional comments:

ZEJEXT normally returns a random entry in the directory. If the directory was sequenced before (and not been written afterwards), the label with the next lowest value will be returned, although the use of subroutine ZRFR is preferred in this situation (and that's somewhat faster).

(47)

read items in ifld from record with logical name lname into array kextr

arguments:

name 1/0 type description

zrf subroutine

lname I var int*l logical name of record (if <= O

ifld I var int*$ field # in record

kextr O array array with extracted data

nextr O var int*4 (--output!!--) numbers of items in items are read from the root- directory)

field ifld additional comments:

single field records (as the name states), and directories consist of only one field. The number of items returned equals the length of these records. The user ia responsible for the provision of the buffer kextr, that must be of the right type and length (or longer).

(48)

read items i1 to 12 in field ifld front record with logical name lname into array kextr

arguments:

name I/O type description

zrPr subroutine

lname i var int*$ logical name of record ifld I var int*4 field # in record

kextr O array contains extracted data from

i1 I var int*l first item to read in field i2 I var int*4 last item to read in field

record

additional comments:

The user is responsible for the provision of the buffer kextr, that must be of the right type and length (or longer).

(49)

3 . 5 Write routines

write items to record with logical name lname in field ifld from array krsc

arguments:

name 1/0 type

zwf subroutine

lname I var int*4

if Id I var int*4

ksrc 1 array

nsrc O var int*4

additional comments:

description

logical name of record field # in record

array with data to write from number o f items in field

single field records (as the name states) consist of only one field. The number of items returned equals the length of these records. Directory records can not be written to by this routine, you should use ZCRTE and ZDELE instead. The user is responsible for the provision of the buffer ksrc, that must be of the right type and length (or longer). Records of type 1% are defined in two steps:

1

-

create, specifying the number of fields (including field

2

-

write field

1

(with subroutine ZWF), after which the

1,

which is of type 10, containing the descriptor). The number of fields should be greater then 1

record is fully defined.

(50)

write items to record with logical name lnarne in field ifld from positions i1 to i2 in array Brsc

arguments:

name I/O type description

zwfr subroutine

lnarne I var int*$ logical name of record ifld I var int*$ field # in record

ksrc I array array with data to write from

i1 I var int*$ starting position in kscr t o copy i2 I var int*4 end position in kscr to copy additional comments:

Directory records can not be written to by this routine, you should use ZCRTE and ZDELE instead.

The user is responsible for the provision of the buffer ksrc that must be of the right type and length (or longer).

(51)

3.6 Existence routine

check existence of record with label ila in directory with logical name lnmast, logical name lname is returned

arguments:

name ï/O type zexst lnmas t ila lname description subroutine

I var int*4 logical name of aaster directory-

E var int*$ label of the record

O var int*$ logical name of the record ( < = O

record (if <= O then a search is done in the root directory)

if record doesn't exist)

(52)

recall data from a file with logical unit lun to directory with logical name imast

arguments:

name 1/0 type

zrecl subroutine

imast I/O var int*4

maxusd 3un iret O var int*4 I var int*$ 0 var int*4 description

logical name of the (empty) directory in the original structure, which will be

overwritten by the masterdirectory in the file. In case imast equals the master of the original

structure, the complete structure will be replaced by the one in the

file

number of integers read frorat file logical unit of file, it must be open for read

returncode, (O=ok)

(53)

save current state in file: dump data in /memory/ on file with logical unit lun

arguments:

name I/O type zsave maxucd lun iret subroutine 0 var int*4 I var int*$ O var int*4 description

number of integers written in file

logical unit of file return code (O=ok) additional comments:

/meaory/ from start of data in /memory/ to end of data in /memory/ is dumped. In case the regiona-table is just at the beginning o f /memory/ this part is excluded from the dump. After the dump /memory/ is still filled with the data, so the data in /memory/ is copied t o the file with logical unit lun and not moved.

(54)

name 110 type

gical n

description

me lname

zref subroutine

Iname ï var int*4 logical name of record (if <= O

iref I var int*$ reference no. to find references to the root- directory are searched)

= -1: no. of references

= O: no. of back-pointers

found, or number (according iref

1

(without back-pointers)

>= 1: find ref # of iref I n a ~ e 2 0 var int*4 logical name of reference

(55)

3.9 Rename routine

renames a record with logical name lname arguments: name I/O zrnarn lname Indir ila I I I subroutine var int*$ var int*4 var int*4 description

logical name of record logical name of directory new label of record

(56)

modify a record with logical name lname to length len arguments:

name I/O type

zmdf y subroutine

lname I/O var int*$

len I var int*4

description

logical name of record (if <=

O, the root is modified) requested length (smaller, longer). As much of the data as is possible will be retained additional comments:

modification of different record types:

O

-

the max number of entries (data-records or/and

subdirectories (directory-records)) in the directory will be adjusted to the new length. If the length specified is lower than the actual no. of entries, the directory will be adjusted to a minimal length (this action should normally be required)

1-13-

records will be adjusted to appropriate length, and

the logical name of the record (=pointer to record- block (startadress in i4 of the block)) will change. If the records are referenced by other records, the

modify request will be seen as a gross programming error, and the system will crash

-

these records are adjusted in order to contain a new descriptor-field, written to it with subroutine ZWP. This record type must not be modified by calling this routine, use subroutine ZCHG instead.

14

-

these records can not be modified

15

(57)

modify field ifld in record of type 15 (self-descripted multiple field record) to length len

arguments: Dame 1/0 zehg ïname 110 ifld I len I type description subroutine

var int*4 logical name of record of type var int*4 field # to be modified

var int*4 requested Length (smaller, longer)

15

(58)

3.11

Zero routine

zeroes a record with logical name lname (logicalc set to .false.) (type=l-->9, 13)

arguments:

name I/O type description zzero subroutine

lname I var int*il logical name of the record additional comments:

due t o different representations o f data-types, some of the zero routines, that are called by ZZERO, can be system dependent.

(59)

3.12 Sequence routine ZSEQ (Inamel

sequence a directory (direct Iname

arguments:

name I/O type

zseq subroutine

---

---

ry-record) with logical name

description

I var int*4 logical name o f directory to be sequenced (if <= O , the root directory will be sequenced) additional comments:

sequenced directories are sorted (the logical name of the entry (data-record or subdirectory) with the lowest value of it’s label will be in the top of the hash-table of the

directory) and compressed, so they can be read out with

ZRFR, in order t o get the entries. Directories stay

sequenced until they are modified with subroutine ZEDFY, a new label is hashed in the hash-table with subroutine ZCRTE or a label is hashed out of the hash-table with subroutines ZDELE or ZDELO.

(60)

3.13 Translate logical name routine

translate logical name of record to pathname (in ascii numbers) (a pathname is p.e.: 'O.POINT.1')

arguments:

name I/O type description zpath subroutine

lname I var int*4 logical narne of record line 1/0 array int*4 filled with ascii numbers ïen I/O var int*$ current length of line

(61)

3.14 Routines for specialists

3.14.1 Low level routines

3.14.1.1

Block system and regions-table

BLOCK SYSTEH

The block system, the way the data is physically stored in the common block with name /memory/, is screened from the user. The block system is initialized with subroutine

ZBLIMI. The common block with name /memory/ is divided in a number of regions. These regions consist of blocks. With subroutine ZINIT the block systen is initialized with 50 regions (nreg10=50) first integer position in /memory/ to start with is start of data in /memory/ Iistart=istrO), room in /memory/ is maximunl length of data in /memory/

(nspace=maxim), offset to data-aligned is size of status- section o€ the data-record-block (io€fst=6), and length of longest datatype (nce112=2).

If you create a record with subroutine ZCRTE, subroutine ZBLFMD is called that searches a region (sequential) for free space that is sufficient for the requested block

(length of the block is adjusted if necessary). Then this region is sequentially searched for the first block that matches the requirements. This block is split in 2 parts:

the first part wil3 contain the requested block, the second one (if it's there) will be new free space. This free space must be linked in, and the regions-table must be updated. If you delete a record with subroutine ZDELE or ZBELO the record is physically deleted with subroutine ZBLDEL through which storage-space is available again.

REGIONS-TABLE

The regions-table contains per region the size o f the

biggest block and the pointer to the next free block in the region. The first position in the regions-table contains the size of the regions-table and the last position in the

regions-table is empty (=O). If a region is not being used the size of the biggest block =O and the pointer to the next free block in the region =-1 (initialized with subroutine ZBLINI). If a region is exhausted the size of the biggest block is set to O and the pointer t o the next free block in the region is set to -1. With subroutine ZINIT the block system is initialized with 50 regions and the regions-table consists consequentially o f 102 positions.

(62)

3.14.1.2 Routines

initialize the block system arguments:

name I/O type description

zblini subroutine

istart i var int*4 first integer position in /memory/ nspace I var int*$ room in /memory/

ioffst I var int*4 offset to data-aligned (status- nregl0 1 var int*$ number o f regions to divide in ncell2 i var int*4 length of longest data-type (data-

to start with

section data-record-block) /memory/

aligned)

Referenties

GERELATEERDE DOCUMENTEN

Again, in the case of adjusting the speed of the filling machine to the speed of the box packaging machine, this means that a lack of tins causes downtime of the box packaging machine

IBP, inflammatory back pain; NSAIDs, Non-Steroidal Anti-Inflammatory Drugs; IBD, inflammatory bowel disease; HLA-B27, Human Leucocyte Antigen B27; ESR, erythrocyte sedimentation

Marie-Charlotte Ibanez, Judith Berendsen Ex 5.1.8 generator Ornstein-Uhlenbeck May 20 Matteo Quattropani, Giulia Pederzani Lemma 5.2.10 plus analogy with 4.4.5. Jian-He, Xavier

understand the universe a little bit better, aiding in the creation of the Standard model and in understanding the world of space-time. A seemingly useless particle because of

Look for last node in previous level in order to know how connect the current node. 103 \DT@countiv=\DT@countii

Clinical experts will use technologies such as LabWizard to build more effective clinical decision support tools, for example to support electronic test ordering and implementation

8 TABLE 8: LINEAR REGRESSION RESULTS FOR THE VARIABLES OF THE FORMAL INSTITUTIONS PERSPECTIVE USING FDI/GDP AS DEPENDENT VARIABLE.

Specifically, the study examined whether perceived Twitter brand account features (information quality, entertainment, vividness and interactivity) predicted the