THE DATA BASE MANAGEMENT SYSTEM USER MANUAL AND EXAMPLE by Michel J. Bastarache Ernest Alleieffeshey III ISDOS Working Paper No. 89 Preliminary Draft April 1975 ISDOS Research Project Department of Industrial and Operations The University of Michigan Ann Arbor, Michigan 48104 (313/763-3469) Engineering THE- UNi 1VS iT iO; oi'G ENGINEERING LIBRARY This is a working paper and should not be quoted or reproduced in whole or in part without the written consent of the authors. Comments are solicited and should be addressed to the authors.

,..Je f'.V -,4

Preface The purpose of this paper is to serve as an aid in using the DBMS subroutines specified by Ernest Allen Hershey in ISDOS Working Paper No. 88, "A Data Base Management System for PSA Based on DBTG 71." It is assumed that the reader is familiar with the contents of this paper and that it is available for reference. A thorough understanding of FORTRAN is also assumed. This Working Paper specifies the use of Version D2.0 of the Data Base Management System (FORTRAN Implementation). Note that data bases generated by Version D1.0 (Assembler Implementation) are not compatible with Version D2.0.

Table of Contents Preface.................... Introduction................ 1. Overview of the System.......... 1.1 Background.............. 1.2 Implementation............ 1.3 Hardware and Software Considerations. 1.4 Logical and Physical Data Structures. 1.5 System Functions........... i 1 4 4 4 5 5 5 * * * * 2. Specifying a Data Structure............. 2.1 Grouping Data into Records.......... 2.2 Relating Records............... 2.3 Contents of the Presidential File (PRESFILE).. 2.4 A Data Structure for the Presidential Data Base 8 8 9 11 16 3. Specifying the DDL for a Data Structure.. 3.1 Naming Conventions.......... 3.2 Records and Items......... 3.3 Item Size.............. 3.4 Handling Relationships Among Records. 3.5 Handling Groups........... 3.6 Handling Repeating Items....... 3.7 Handling Repeating Groups....... 3.8 Specifying Data Base Size...... 0 0 0 0 * 0 20 20 20 25 25 27 28 28 29 29 * 0 & 0 * a 0 0 0 0 0 0 3.9 Developing the DDL for the Presidential Example 4. Creating and Initializing the Data Base....... 4.1 Creation of DDL, DBTF and DBF Files..... 37 37

Table of Contents (cont'd) 4.2 Generation of the DBTF... 4.3 Initialization of the DBF... 5. Coding Conventions for Data Base Access 5.1 Common Areas and Block Data. 5.2 Buffer Variables........ 5.3 Access of the DBF and DBTF... 5.4 General Program Formats.. * * * *a Programs ~ * * * ~ * * * * ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 0 e 0 a 0 0 & 0 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0 0 0 37 37 38 38 41 41 42 6. Populating t 6.1 Reading 6.2 Storing 6.3 FMSK. 6.4 CR.. 6.5 SFR 6.6 AMS 6.7 SRM. 6.8 SOM 6.9 SMOVE,he Data Base............. Data from the Input File......... Data................... Populate the President Data Base...... k Poulae te Pesient ataBas... 0 & 0 a & 3 a 0 0 0 0 0 * 0 0 0 0 0 * 0 0 0 0 0 0 a 0 0 0 0 0 a 0 43 43 44 44 44 45 45 45 46 46 47 6.10 Code to 7. Generating Reports from the Data Base 7.1 Retrieving Data........ 7.2 FFM........... 7.3 FNM............. 0 0 0 a & 0 0 & * 0 ~ ~~ ~ ~ ~ ~ ~ ~ ~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0 0 0 0 0 & 0 * 0 0 0 0 0 9 0 0 0 0 0 f 70 70 70 70

Table of Contents (cont'd) 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13 SOM............ SMM............ GFM............. GFO............. Report Routines....... HEDING............ BUFBLD........... NINBUF.......... PBUF............ Code to Generate Reports from * e * e * e * * * * * * * * * * * h the 0 0 0 0 0 & 0 0 0 0 0 f 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0 0 9 0 0 e 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Pres identi al Data 0 &0 9 00 0 0& 0 00 0 00 Bas e 0 0 9 0 a 0 0 0 0 0 0 0 0 0 71 71 71 72 72 72 72 73 73 73 85 Appendix A Presidential File (PRESFILE) Listing..... Appendix B Presidential Report Examples......... 96

INTRODUCTION Before any attempt is made to explain the implementation of this Data Base Management System (DBMS), definitions for the terms to be used must be presented. The following terms will be used throughout the paper. type (vs. occurrence) i ter group record set DDL DML type (vs. occurrence) When describing various objects in this paper it is necessary to differentiate between a "type" of object (i.e., its class) and an instance of one object within a "type" (i.e., an "occurrence"). For example, Social Security number may be a "type" of item, but an "occurrence" of a Social Security number might be 366-60-5321. This is a very important concept and comprehension of the difference is essential. item The "item" is the elementary data unit from which all other types of structures are ultimately composed. An occurrence of an "item" is the representation of a value which may be a number, a string of characters, a truth value, etc. Examples of types of items are age, hair, color, occupation, etc. Occurrences of these types of items might be: 35, BROWN and TEACHER, respectively. (An item is often called a field, data item or element in other DBMS's.) group A "group" is a named collection of "items" and/or other "groups." An occurrence of a group is an instance of a value for each item contained within it. Examples of types of possible groups are name (which might consist of first name, initial and surname), and date (consisting of month, day, year). Occurrences of these types of groups might be: JOHN Q. ADAMS and January 1, 1972, respectively. (A group is often called a segment or data aggregate.) record A "record" is a named collection of "items" and/or "groups." There may be an arbitrary number of occurrences in the data bases of each record type. The record is used to represent the major entities of an application. For example, if the system being constructed were a payroll system, it is very likely that there would be an occurrence of an EMPLOYEE-RECORD for each employee on the payroll.

-2 - set A "set" is a named collection of "records" which specifies an ordering or relation among the record types within it. The specification of "owner records" and "member records" within the set designates the direction of the relationship. For example, if records were assigned to correspond to each person and each state in the U.S., a relationship between the two record types might be defined to associate all those people born in the same state. Since a person can only be born in one state and states can have several people born in them, the direction of the relationship is specified by designating state records as owner records and people records as member records (i.e., for any occurrence of a state record, there can be many occurrences of member records in the relationship.) DDL The "DDL" (Data Definition Language) is a language used to define data structures within a data base, usually based on terminology similar to that specified previously. DML The "DML" (Data Manipulation Language) is a language used to manipulate the data in the data base defined by the DDL. (For this particular system they are the subroutines described in Working Paper No. 88.) The example that will be referenced throughout this paper is called the "Presidential Data Base." The input to our problem is the Presidential File (PRESFILE) which contains data about each President, from George Washington to Lyndon Johnson. Our goal is to implement a system which will store all this data into a data base in a form easy for retrieval. Finally, reports will be generated from the contents of the data base. The following types of data are contained in the PRESFILE and must be incorporated into the data base: President data Administration data Congress data Election data State data If one type of record could be defined to correspond to each of these data types, the data structure might look like Figure 1: Figure 1

-3 - Any given President (occurrence of a President record) might be related to several Elections (occurrences of Election records) by the fact that the President won those elections. (By the previously defined terminology, the President records can be defined to be "owner records" for a "set" where the "member records" are Election records. This "set" could be called ELECTION-WON.) By the same token, a State record could be related to one or more President records by the fact that they were born there, and one or more State records could be related to Administration records by the fact that those states were admitted to the Union during that Administration, etc. These relationships can be specifed more clearly by a DDL format; SET Elections-Won OWNER President MEMBER Election SET Presidents-Born OWNER State MEMBER President SET Administrations-Held OWNER President MEMBER Administration SET States-Admitted OWNER Administration MEMBER State Notice that all the relationships (sets) have been defined so that for any given occurrence of an owner record, there exists one or more occurrences of a member record (which can be notated as a 1:M relation). Utilizing this convention makes the task of specifying the DDL that much easier. Each record type defined (President, Election, etc.) will consist of smaller collections or units of data. The Presidential record may contain information about date of birth, age, etc. Date would be defined as a "group" as it could be broken down into the "items": month, day and year. Depending on the facilities allowed in the DDL. specification of groups may or may not be allowed. The DDL presented in this system does not allow for groups, so all data within the Presidential record must be defined in terms of "items."

-4 - 1. OVERVIEW OF THE SYSTEM 1.1 Background This system was designed based on the specifications given by the CODASYL Data Base Task Group in their "CODASYL-COBOL Data Base Facility Proposal". It was developed and implemented by Ernest A. Hershey at the University of Michigan in the summer of 1973. Since then the system has been used in several independent applications: Problem Statement Analyzer - The DBMS is used to maintain the data bases needed for the PSL/PSA System. (See ISDOS Working Paper No. 86 for more information about this application.) * Computerized Bibliography - The DBMS is currently being used to maintain a data base consisting of an up-to-date bibliography for the ISDOS Project. * Tape Library System - The DBMS is being used to maintain a tape library for another project at the University. This particular system has been set up on Michigan's 370/168 as well as on a Honeywell machine. Presidential Data Base Example - To illustrate some of the capabilities of the DBMS this example has been implemented based on the data presented by A. Vorhaus and A. Weinert of the CODASYL Systems Committee. * 1.2 Implementation This system is a host langauge Data Base Management System (DBMS). A system with host language capability is one which is built upon the facilities of a procedural language such as FORTRAN. The DBMS functions** are invoked from within the host language program written in COBOL or FORTRAN. The method of interface between system and program (be it either FORTRAN or COBOL) is via the CALL statements in the program. For this reason, the user must be somewhat experienced in programming. The user of the system is considered to be a programner in the sense that a set of FORTRAN (or COBOL) statements must be written to be executed sequentially. The user exercises the same degree of procedural control over processes as if programming in the host language except that the facilities of the DBMS handles data transfers to and from the data base. This also means that all the capabilities of the host language are at the user's disposal. The high level DBMS functions such as UPDATE, DELETE, etc., must also be written by the user for a particular implementation of the system. * This application is currently operative on the IBM 370/168 at the University of Michigan. ** In this sense "functions" means retrieval, storage, etc.

-5 - 1.3 Hardware and Software Considerations The DBMS described in this paper can be set up on any machine which has an ANSI FORTRAN or ANSI COBOL compiler. This makes the DBMS machine independent and operating-system independent. Mode of operation (on-line or batch) is of course dependent on the facilities of the installation. 1.4 Logical and Physical Data Structures All types of logical data structures, from simple lists to complex network structures may be defined when using the DBMS. The Presidential data base example presents an implementation of a network structure. Any logical data structure defined by the user is translated into a doubly linked list structure for each "set" defined in the data base. Records are stored according to a "best fit" algorithm and are identifiable by a unique "data base key". The number of records and sets that can be handled by the DBMS is, for all practical purposes, limited only by the amount of storage available. 1.5 System Functions The method of defining the data base is shown in Figure l1. la. Interaction of the DBMS with the user in initializing the data base: Data Base Data Base / Table File | bl Initialization User )DDL Generation Table Program Program File Data Base DBMS The user must specify the DDL for a particular usage of the system. This DDL is then to be used as input to a program which formulates a set of tables. These tables are used as input to another program which prepares the data base for accepting data. The tables are also used when referencing the data base for modification and retrieval purposes.

-6 - The method of populating the data any way is pictured in Figure lb. lb. Interaction of the DBMS with contents of the data base: base or modifying it in the user in modifying the I I I DBMS The user writes a program utilizing routines in the DBMS library. These routines also provide the means of interfacing the user's program with the Data Base Table File (DBTF), generated in the creation phase, and the data base. Error messages are generated by the DBMS routines should errors occur in modifying the data base. The method of retrieving data from the data base in the form of reports is shown in Figure lc. lc. Interactionof the DBMS with the user from the data base: in generating reports I I DBMS

-7 -The user must write a program which calls routines in the DBMS library. These routines provide the means of referencing the DBTF for access to the data base and retrieving the data. The errors encountered while retrieving data will be documented on the user's outputs.

-8 - 2. SPECIFYING A DATA STRUCTURE Before the user writes the DDL for a particular system some preliminary considerations must be taken into account. These are: how is the data to be conceptually grouped(what will be defined to be records) and how will these groupings relate to each other. The users conception of how this data is related (as opposed to how it is actually defined in the DDL or how it is physically stored) is called the "data structure". 2.1 Grouping Data into Records The first decision to be made is how to group the data. This can be determined after studying the requirements for the system. In most cases grouping of data is trivial as all the data pertaining to one type of object (such as a person) would be grouped together. For example, if your system was concerned with maintaining information about people, it would be very likely that data used in identifying each person would be grouped together (i.e., name, social security number, etc.) When it is not obvious whether to add data to one defined record or define a new one to contain it, the following guidelines may be helpful. i. Attempt to reduce the degree of redundancy in the data structure (i.e., whenever possible store data in only one record rather than two). ii. Define records (and the data within them) according to the requirements for retrieving this data. For example, if an inventory system were being developed and one of the output requirements was to generate a report consisting of all suppliers of items in the inventory, it would be a good idea to have a record type associated with suppliers (as opposed to storing the supplier information as part of the records for each item in the inventory. After determining what data is to be contained in which records, a decision must be made as to how this data is grouped within the record, if at all. For example, it may be convenient to think of all data pertaining to a person's family as MARRIAGE-DATA which could be defined then as a "group" of items (i.e., marriage date, spouse's name, number of children, etc.). If several occurrences of a particular group were possible for a single record occurrence (as in the case of MARRIAGE-DATA where a person could be married more than once) this type of data would be called a "repeating group". Likewise, a "repeating item" is a simple case of the repeating group where the group consists of only one item (e.g., OCCUPATION).

-9 - The end result of the data grouping process is a number of defined record types and specification of the data within them in terms of items, groups, repeating items and repeating groups for each record type. For a simple inventory system the result could be shown by the following format. i tem record "repeating group" I supplier record supplier. supplier address date of identifier name last order I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "item" v 0-....- a a I- 1 ol v( V customer, record customer customer address money credit identifier name owes status ~- ~.I I, Note that most data could be defined as "items". "Date of last order" was defined as a "group" since it consists of month, day and year and "location" is a "repeating group" because any given inventory item might be stored at more than one location and a given location might be identified by warehouse number, row number, rack number, etc. 2.2 Relating Records The next step in specifying the data structure is to define the relationships among the records defined. Between any two records that are to be related the type of relationship should be determined as 1:1, 1:M or M:M.

-10 - 1:1 means that for every occurrence of a particular record type there is one and only one occurrence of another record type related to it. For example, all currently married men and women in the United States could be paired by the relationship of "marriage". Since any of these people are allowed only one spouse, the relationship would be designated as a 1:1 relationship. l:M means that for every occurrence of a particular record type there can be zero, one or many occurrences of another record type related to it. In the inventory example, this type of relationship exists between the supplier and item records. A particular supplier could supply one or more of the items in the inventory. M:M means that for an occurrence of a particular record type there can be many occurrences of a second record type related to it and likewise any occurrence of the second record type could be related to several occurrences of the first record type. This type of relationship is apparent when relating the item records to the customer records. Several items can be bought by one customer and several customers could buy the same type of item. The relationships for the inventory example can be shown in the following format. SUPPLIER RECORDS supplies (1:M) ITEM RECORDS bought by (M:M) CUSTOMER RECORDS The titles in lower case present a name for the relationship and the arrow specifies the direction, The 'type" of relation is contained in parentheses. This diagram then says that a particular supplier "supplies" one or.more items in the inventory which are "bought by" many customers.

-11 - A relation which specifies an order among the record occurrences of one or more record types is called an ordering relationship. Specifying this type of relationship aids in retrieving particular record occurrences and in formatting any output reports (the data is already ordered). Ordering relationships for the inventory data structure can be shown in the following way. supplier order SUPPLIER RECORDS item order M R VD ITEM RECORDS customer order o CUSTOMER RECORDS In most cases a particular'itenr in the record will be used to designate order (the identifier'itenr' usually, but order could just as well be established on weight or cost for inventory items records). 2.3 Contents of the Presidential File (PRESFILE) Before attempting to specify a data structure for the Presidential Data Base an inspection of PRESFILE must be made to see what data is available. The complete listing of all the data in PRESFILE is given in Appendix A. In surmary, PRESFILE presents five different types of data groupings which are identified by the names: PRES ELECTION ADMIN CONGRESS STATES Following each identifier is a collection of data in a specific format, representing one occurrence of a data type. PRES, for example, designates that all following data (up to the next identifier) presents information about a particular president.

-12 - ELECTION designates that the following data pertains to a particular election; ADMIN, to a particular administration; CONGRESS to a particular congress; and STATES to a particular state. The format below with PRES WASHINGT WASHINGTON GEORGE FEBRUARY of the data * following a PRES identifier is given respect to an actual example: data identifier Presi dent-identi fi er of the last name) last-name first-name middle-initial (usually an abbreviation President's name birthdate month 22 day 2 1732 VIRGINIA VIRGINIA 6 FT. 2 IN. FEDERALIST ENGLISH EPISCOPAL year state-born-in state-identifier (identifier name for the state born in) height party college ancestry religion SURVEYOR FARMER SOLDIER DECEMBER 3 #-of-occupations occupations (number of occupations is determined by value of #-of-occupati ons) month 14 day death-date 1799 PNEUMONIA AUGUSTINE MARY year cause-of-death father-name mother-name 1 #-of-marriages * All the data in PRESFILE, including identifiers, were restricted to ten character representation thus resulting in abbreviations of some names.

13 - MARTHA JANUARY 6 1759 0 2 E1789 E1792 wife month| day ~ marriage-date > marriage-data yearj number-of-chi 1 dren..1 (number of occurrences of marriagedata is determined by value of #-of-marriages (number of elections is determined by value of #-of-elections-won) #-of-elections-won election-identifiers A1 A2 2 #-of-admi nis trati ons-headed ) administration-identifiers (number of administrations is determined by value of #-ofadmini strationsheaded. ) 4 #-of-cabinets C1 C2 C3 C4 cabinet-identifiers (number of cabinets is determined by value of #-of-cabinets.) Note that any fields which are not defined (such as middle initial and college in this example) are represented by ten blanks. The format below: ELECTION E1789 1789 WASHINGTON FEDERALIST 69 1 ADAMS FEDERALIST 34 of the data following an ELECTION identifier is given data identifier election-identifier election-year winner winning-party winning-votes #-of-opponents opponent opponent-party opponent-votes opponent-data (number of occurrences of opponentdata is determined by value of #-ofopponents.)

-14 - The format of below: the data following an ADMIN identifier is given ADMIN Al APRIL 178 WASHINGl JOHN ADAMS 30 39 data-identifier administration-identifier month day i nauguration-date year president-identifier 1 #-of-vice-presidents first-name surname vi ce-presi dentname (number of occurrences of vi ce-presi dent name is determined by value of #-of-vicepresidents.) 2 #-of-states admitted VERMONT state-name VERMONT state-identifier KENTUCKY state-name KENTUCKY state-identifier state-data state-data (Number of occurrences of statedata is determined by value of #-of-statesadmitted.) The format of the data following a CONGRESS identifier is given below: CONGRESS data-i denti fier C1 Congress-identifier 2 #-of-Senate-parties

-15 - FEDERALIST 17 ANTI-FED 9 2 FEDERALIST 38 ANTI-FED 26 Senate-party number-of-Senators J Senate-party number-of-Senators #-of-House-parties House-party number-of-members House-party number-of-members Senate-data (number of occurrences of Senatedata is determined by value of #-ofSenate-parties) Senate-data House-data House-data (Number of occurrences of Housedata is determined by the value of #of-House parties.) The format of the data following a STATES identifier is given below. STATES ALABAMA ALABAMA 1814 MONTGOMERY 51609 29 3556000 21 10 4 BIRMINGHAM 340887 MOBILE 202779 data-identifier state-i denti fier state-name year-admitted capital area area rank (as compared to all 49 other states) population population-rank (as compared to all 49 other states) number-of-House-votes #-of-major-cities city-name city-popul ation city-data city-name ton city-data (The number of city-population J occurrences of city-data is determined by the value of #-ofmajor-cities.) MONTGOMERY 134393 HUNTSVILLE 123519 city-name city-popul ation city-name city-population city-data city-data

-l 6 - Notice that state-identifier state-name are usually the same. The major difference between the two is that blanks and special characters are allowed in a state-name but not for state-identifier. For example, "NEW YORK" is the name of the state, but "NEWYORK" is the identifier for the state. (This was a restriction imposed by the PRESFILE format rather than the DBMS.) The complete listing of PRESFILE can be found in Appendix A. 2.4 A Data Structure for the Presidential Data Base Now that all the data available to the problem is known, an attempt can be made to structure it. First off, a record type can be defined to correspond with each of the five possible data group types (PRES, ELECTION, ADMIN, CONGRESS and STATES). Some of the data in these groups are redundant (occur in more than one group) and so an attempt to eliminate redundancy will be made by specifying relationships between records. For example, within the group of data describing a President, the state he was born in and the identifier for that state are given. This data could be eliminated altogether if a relation was set up between the President record and State record specifying that the particular President was born in that State. After eliminating redundant data the following relationships are given between record types. identifier population

-17 - Note that all record types are ordered by identifier for retrieval purposes. STATE is also ordered by population size. The remaining task to be performed is to identify the data within each record type and identify each piece of data as an "item," "group," "repeating item" or "repeating group." Though the contents of the record types are very similar to the contents of the data groups specified in the PRESFILE it will be presented here for the sake of clarity. President Record -- Data represented President-identifier First-name (item) Middle-initial (item) President-name Surname (item) month (item) day (item) Birthdate year (item) Height Party College Ancestry Religion month (item) day (item) Death date year (item) Father Mother #-of-occupations occupation Wife (item) month (item) day (item) Marriage date* Marriage-data year (item) number-of-chi 1 dren (i tem) Data type i tem group group i tem item i tem i tem item group i tem i tem i tem repeating item repeating group * Marriage-date is a group within a repeating group.

-18 - Election Record -- Data represented Election-identifier Election-year Winner Winning-party Winning-votes Opponent (item) Opponent-party (item) Opponent-votes (item) Data type i tem i tem item item item Opponent-data repeating group Administration Record -- Data represented Data type i tem Admi ni strati on-i denti fier month (item) day (item) inauguration-date year (item) first-name (item) surname (item) vice-president-name group repeating group Congress Record -- Data represented Congress-identifier party (item) members (item) party (item) members (item) Data type item Senate-data House-data repeating group repeating group State Record - Data represented State-identifier State-name Year-admi tted Capital Area Data type i tem item item item item

-19 - State Record (Continued) Data represented Area-rank Population Population-rank Electoral-votes City-name (item) ) City-population (ite) City-data Data type i tem i tem i tem i tem repeating group

-20 - 3. SPECIFYING THE DDL FOR A DATA STRUCTURE Now that a data structure has been specified, this structure must be defined in DDL statements for processing by the DBMS. The conventions of translating the data structure into its equivalent DDL are given in the rest of this section. The only objects that can be defined by the DDL are RECORDS, ITEMS, REPEATING ITEMS, and SETS. All data described in the data structure must consequently be defined in these terms. Refer to Figure 1, "CARD FORMATS," and Figure 2, "CARD ORDERING RESTRICTIONS," for proper syntax of the DDL. 3.1 All data names defined by the user are restricted to a six character representation. For example, in the Presidential Data Base Example "President-identifier" and "college" were two names representing items types in the data structure. Because of the six character restriction these names must be truncated or abbreviated. "President-identifier" could be called IDENT and "college" COLEGE. Names of record types, however, must be unique for the entire system. This means that two item types could have the same name "IDENT" as long as they were contained in two different record types. Two record types of the name "PRES" would be illegal. 3.2 Records and Items Since records and items are objects allowed in the DDL terminology, the records and items defined in the data structure may be translated directly into DDL statements. For example, the data for the Election record could be defined as such: RECORD ELECT ITEM IDENT CHAR 10 ITEM YEAR INTEG 31 ITEM WINNER CHAR 10 ITEM PARTY CHAR 10 ITEM VOTES INTEG 15 The repeating group in the Election record must be handled in a special way and will be described later. Notice that each item is defined to be either "CHAR" or "INTEG." This specifies what type of data is contained within the item; a character string or an integer number, respectively. There are six possible types of allowable data: INTEG (integer number) REAL (real number) BINARY (binary number) DBKEY (data base key value) LOGIC (logical value) CHAR (character string)

-21 - CARD FORMATS RECORD card:...._ col 1 - 6 col 8 - 13 RECORD record type name ITEM card: col 1 - 4 col 8- 13 col 15 - 20 col 22 - 24 ITEM item name item type legal types: item size legal size: INTEG, REAL, BINAKY, UbJKtY, LUbIL, UMHK INTEG REAL BINARY DBKEY LOGIC CHAR maxs ize 31 63 256 256 units bits bits bytes always always bytes 4 bytes 4 bytes col 26 - 31 col 33 - 35 depended on item (optional) max replication factor SET card: col col col 1 8 15 - 3 SET - 13 set type name - 20 order legal orders: FIFO, LIFO, NEXT, - 31 sort key (if order'= SORTED) PRIOR, IMMAT, SORTED col 26 OWNER card: col 1 - 5 OWNER col 8 - 13 owner record type name MEMBER card: col 1 - 6 MEMBER col 8 - 13 member record type NPAGES card: col 1 - 6 col 22 - 24 NPAGES data base size (in pages) Figure 1

-22 -CARD ORDERING RESTRICTIONS I. Record Descriptions 1. Items can only be defined in relation to the record they belong to (i.e. an item cannot be independent). 2. The items which make up a record type must be described by ITEM Cards and immediately follow the appropriate RECORD Card. 3. The order in which ITEM cards occur after the RECORD Card determines the order in which the data is physically stored in the record. 4. A repeating item is defined when the "max replication factor" field is assigned a value. 5. If a replication factor is given for an item, it is assumed to repeat. 6. A repeating item may only be the last item in a record. 7. The "depending on item" field for a repeating item designates an item (defined elsewhere in the record description) whose value specifies the number of occurrences of the repeating item (for a particular record occurrence). 8. A depending on item must be of type INTEG. 9. An item must be defined previously in the record before it can be used as a depending item in the record. 10. The depending on item is only checked for if a "max replication factor" is given. II. Set Descriptions 1. There must be at least one owner card and one member card for each set. 2. If SYSTEM is given as an owner record type name, no other owner cards may be given for that set. 3. The owner card(s) for a set must come immediately after the SET card for the set. 4. The member card(s) for a set must come immediately after the OWNER card(s). 5. A record type must have been defined previously (by a RECORD card) before it can be used as an owner or member type. Figure 2

II. Set Descriptions (Continued) 6. If a sort key is given for a set, it must be an item previously defined (in a record description) and be of the same type, size and displacement in all member record types. 7. A sort key item may only be of type CHAR or INTtEG Figure 2 (Continued)

IBM/360-370 STORAGE CARACTERSTICS Item type Size defined in DDL ~. m Allotted Storage Space Range of values represented INTEG REAL REAL BINARY DBKEY LOGIC CHAR 1-31 bits 1-31 bits 32-63 bits 1 < n < 256 bytes (always 4 bytes) (always 4 bytes) 1 < n < 256 bytes full word full word double word N words * full word full word N words * -2147483648 thru +2147483647 + (16-65 thru 1663) ** + (16-65 thru 1663) ** -2(32'N)-l-l thru +2(32*N)-1-_ (not relevant) True or False 0 thru 4'N characters * Where N = f(n+3) Ef rounds the For example, expression to the lowest integer] if n10 Nf(10+3 full words. if n=l0: N'f(-4-)= 3 full words. I ** This range is approximately.5397605 * 10-78 through.7237005 x 1076 for both single (full word) and double precision (double word). Double precision, however, allows for seven additional digits of accuracy over the single precision equivalent. Of course the representation of the zero value 0.0 can be represented as a real number in addition to these value ranges. Table 1

-25 - The maximum size of the data value in each item is specified as either "10", ten bytes (characters) or "i5" and "31" bits (integer). Table 1 specifies the ranges of allowable size for each of the six above data types. 3.3 Item Size The DDL allows the user to specify a size for each item defined. Regardless of the size given, however, the data must be stored as a full word or some integer multiple of full words. Any unused space in the full word will be packed with an appropriate filler (e.g., blanks if the value is a character string and zeros if the value is an integer.) If a size of 6 bits were given for an item defined to be of type INTEG, each occurrance of this item would be reserved a full word of storage. The size here is only of relevance to the user as it designates some restriction to the range of values which should be accepted by the user's program. The DBMS makes no distinction if the size is 15 or 31 bits (in the case of integers) since an entire fullword is saved to store any integer value. Treatment of item size for character strings (type CHAR) or bit strings (BINARY) is a bit different than that of type INTEG. Table 1 presents a method of calculating the number of full words of storage assigned to each occurrence of an item (as defined by its type and size). It also presents the range of values allowed for a particular item (as defined by its type and size). Note that the range of values is directly dependent on the allotted storage space. 3.4 Handling Relationships Among Records It is a simple matter to define record relationships in the data structure as SETs in the DDL. For relationships defined as 1:1 or 1:M in the data structure (take the relationship between President records and Administration records for example): ( President )

The President record will be denoted as PRES in DDL terminology, Election record as ELECT and the Elections-won relationship as PRESEN. The following algorithm can be used: i. Choose a name for the relationship (it must be unique). (In this example the name used is PRESEN.) ii. The record type at the tail of the relationship is designated as the OWNER record. iii. The record type (or types) at the head of the relationship is designated as a MEMBER record. iv. All the occurrences of member record types to a particular occurrence of an owner record can be ordered in some way if desired (See below.) The DDL needed to represent the Elections-won relationships is given as: SET PRESEN SORTED IDENT OWNER PRES MEMBER ELECT The "SORTED IDENT" phrase means that all member recora occurrences for a particular owner record occurrence will be sorted on the item, IDENT, within the member record. This ordering is for search and retrieval purposes. For a relationship defined as M:M the task of specifying this in the DDL is a little more complex. (The relationship between Congress and President records will be used as the example.) The President record is denoted as PRES in the DDL, the Congress record as CONGRS and the two relationships that will be defined are PRESCS and CONGPS. Also, another record type must be defined which will be called NUB. The data structure will be changed to the following by the use of the NUB record:

-27 - The DDL for this is 1:M relationships: SET OWNER MEMBER SET OWNER MEMBER specified in the same way as for two PRESCS PRES NUB CONGRS CONGRS NUB FIFO IMMAT To specify an ordering relationship in the DDL, one item in the record type to be ordered must be chosen as the sort key. Take the example: identifier President from the data structure. This specifies that the President record (PRES) is to be ordered by its identifier item (cal1 it IDENT). This can be specified by the DDL in the following manner: SET OWNER MEMBER PORDER SYSTEM PRES SORTED IDENT The SYSTEM record is system. a record type defined by the data base 3.5 Handling Groups Since groups are not allowed in the data structure, a group must be defined in terms of "items". For example, "birthdate" in the President record must be defined in terms of month, day, year. Since another date group occurs in the President record (death date) more descriptive names must be chosen such as MONTHB, DAYB, and YEARB.

-28 - 3.6 Handling Repeating Items Repeating items are allowed by the DDL with some special declaration. Take the example of a repeating item as defined in the Presidential Data Structure which is "occupation" in the President record type. A maximum limit of how many times the item repeats must be specified in the DDL (in this case, 3). An item must be defined to maintain a count of the number of times the item repeats for any particular occurrence of the President record. In the DDI format, this information is presented as: ITEM NOOCC INTEG 15 ITEM OCCUP CHAR 10 NOOCC 3 NOOCC is the item which maintains a count of the number of times OCCUP repeats. The "3" on the right specifies that, at most, a President can have three occupations listed. Only one repeating item may be defined for a particular record type. Should there by more than one defined by the data structure, it should be thought of as a repeating group (which will be discussed next). Last thing to be considered is that a repeating item is the last item to be defined (in the DDL format) for a particular record type. 3.7 Handling Repeating Groups Any data defined in the data structure as a repeating group must be defined as a new record type in the DDL. Fof example, the repeating group, "marriage-date," in the President record must be defined as a new record type (call if MARRGE) and a 1:M relationship is formed between it and the PRES record (with PRES as the owner). The information in marriaqe-data can be presented by the following DDL: RECORD MARRGE ITEM WIFE CHAR 10 ITEM MONTHM CHAR 10 ITEM DAYM INTEG 15 ITEM YEARM INTEG 31 ITEM CHILDN INTEG 15 SET PRESME FIFO OWNER PRES MEMBER MARRGE

-29 - 3.8 Specifying Data Base Size One DDL statement that does not directly describe the contents of the data base, but rather the size of it is NPAGES. The value associated with it (must be an integer) specifies the number of pages to be allocated for storing the contents of the data base. It's true value can only be estimated, but additions and deletions from the data base must be taken into account. Exceeding the NPAGES limit will result in a warning message. 3.9 Developing the DDL for the Presidential Example From the original data structure for this example a new one can be constructed to show the added record types (due to repeating groups) and their relationships to the rest of the data structure. Figure 3 presents the new data structure to be described by the DDL. Table 2 presents the names given to the records, sets and items defined in the DDL. Finally, Figure 4 shows the complete DDL as derived from the conventions in sections 3.1 to 3.8. Note that all items which contain character information (e.g., FSTNAM and IDENT) are declared to have a length, 10 characters, equal to that specified in PRESFILE. Though some occurrences of items carrying integer values (e.g., CAPTAL and AREA in the STATE record) have lengths of 15 bits and others of 31 bits, all have a fullword of storage assigned to them (31 bits of storage, 32 including the sign bit).

-30 - I:M ) rpresme prnusetat 1:M M: I:M.ps IGRSl n- sorder I G R S | M A R R RG E I S T A T E --- ~ -- ', --- —---— I \A _____ ___J 1:.. M, stasiz V P R E S ci ties 1:M Figure 3 Reeovird- Relatin nntbi nix,

Names used for Presidential Data Base Records, Items and Sets Item Set Record PRES (president) IDENT FSTNAM INITAL SURNAM MONTHB DAYB YEARB HEIGHT PARTY COLEGE ANSTRY RELIGN MONTHD DAYD YEARD CAUSE FATHER MOTHER NOOC OCCUP (identifier) PRESEN (first name) PRESAN (initial) PRESCS (surname) PRESS (month born) PRESME (day born) (year born) (height) (political party) (college) (ancestry) (religion) (month died) (day died) (year died) (cause of death) (father's name) (mother's name) (number of occupations) (name of occupation) (elections won) (administrations headed) (congresses headed) (state born in) (marri ages) MARRGE (marriage) WIFE MONTHM DAYM YEARM CHILDN (wife's name) (month married) (day married) (year married) (number of children) Table 2 -31

Record Item Set ADMIN (administration IDENT MONTH DAY YEAR (identifier) (month started) (day started) (year started) NUSTAT (new states added) CABINT (vice presidents) VPRES (vice president) FSTNAM (first name) SURNAM (surname) ELECT (election) IDENT (identifier) ELECTO (opponents) YEAR (election year) WINNER (winner) PARTY (winning party) VOTES (number of winning votes) OPPON (opponent) NAME (opponent's name) PARTY (opponent's party) VOTES (opponent's number of votes) CONGRS (congress) IDENT (identifier) SMEMBS (senate members) HMEMBS (house members) CONGPS (headed by) SENATE (senate) PARTY (party name) NUMBER (number of seats) HSEREP (house) PARTY NUMBER (party name) (number of seats) Table 2 (Continued) -32 -

Record I tem Set STATE (state) IDENT ((identifier) NAME (state name) YEARAD (year admitted) CAPTAL (capital) AREA (area) ARANK (rank in area size) POP (polulation) PRANK (pol ulation rank) VOTES (electoral votes) CITIES (cities) CITY (city) NAME POP (city name) (population) Record PRES ADMIN ELECT CONGRS STATE STATE Ordering Relations Set Ordered on porder IDENT (based on president's name) aorder IDENT (based on chronological order) eorder IDENT (based on chronological order) corder IDENT (based on chronological order) sorder IDENT (based on state name) stasiz PRANK (based on polulation size) Table 2 (Continued)

-.34-.1 2 3 4 5 6 7 8 9 10 1 1 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29.30 31 32 33.34 35.36 3.7.38 39 40 41 42 43 44 45 46 47 RECORD PRES ITEM IDENT CHAR ITEM FSTNAM CHAR ITEM INITAL CHAR ITEM SURNAM CHAR ITEM MONTHB CHAR ITEM DAYB INTEG ITEM YEARB INTEG.ITEM HEIGHT CHAR ITEM PARTY.CHAR ITEM COLEGE CHAR ITEM ANSTRY CHAR ITEM RELION CHAR ITEM MONTHD CHAR ITEM DAYD INTEG ITEM YEARD INTEG ITEM CAUSE CHAR ITEM FATHER CHAR ITEM M(THER CHAR ITEM N)(OCC INTEG ITEM (CCUP CHAR RECORD MARRGE ITEM WIFE CHAR ITEM MONTHM CHAR ITEM DAYM INTEG ITEM YEARM INTEG ITEM CHILDN INTEG RECORD ADMIN ITEM IDENT CHAR ITEM MONTH CHAR ITEM DAY INTEG ITEM YEAR INTEG RECORD VPRES ITEM FSTNAM CHAR ITEM SURNAM CHAR RECORD STATE ITEM IDENT CHAR ITEM NAME CHAR ITEM YEARAD INTEG ITEM CAPTAL CHAR ITEM AREA INTEG ITEM ARANK.INTEG ITEM POP INTEG ITEM.PRANK INTEG ITEM VOTES INTEG RECORD CITY ITEM NAME CHAR ITEM P(P INTEG 10 10.10 10 10 15 31 10 10 10 10 10 10 15 31.10 10 10 15.10 NOOCC 10 10 15 31 15 10 10 15 31 10 10 10 10 31 10 31 15.31 15 15 10.31.3 Figure 4 The Presidential Data Base DDL

-35 - 49 50 51 52 53 54 55 56 5.7 58 59 60 6.1 62 63 — 64 65 66 67 68 69 70 71 72.73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8.9 90 91 92 9.3 94 95 96 97 RECORD.ELECT ITEM.I DENT CHAR ITEM YEAR INTEG ITEM WINNER CHAR ITEM PARTY CHAR ITEM VOTES INTEG.RECORD ()PPON ITEM NAME CHAR ITEM PARTY CHAR ITEM VOTES INTEG RECORD CONGRNS ITEM I DENT,CHAR RECORD SENATE ITEM PARTY CHAR ITEM NUMBER INTEG -ftREO)RD HSEftEP ITEM PARTY CHAR ITEM NUMBER INTEG RECORD NUB SET PRESME F.IFO OWNER PRES MEMBER MARRGE SET PRESCS FIFO ()WNER PRES MEMBER NUB SET CONGPS IMMAT.OWNER C(NGRS MEMBER NUB SET PRESEN SORTED.OWNER PRES MEMBER ELECT SET PRESAN SORTED OWNER PRES MEMBER ADMIN SET NUSTAT SORTED OWNER ADMIN MEMBER STATE SET CITIES SSORTED OWNER STATE MEMBER CITY SET CAB I NT FIFO.OWNER ADMIN MEMBER VPRES SET SMEMBS SORTED (OWNER C(NGRS MEMBER SENATE SET HMEMBS SORTED OWNER CONGRS MEMBER HSEREP 10 31 10 15 10 10 15 10.10 15 10.15 IDENT I DENT YEARAD POP.NUMBER NUMBER Figure 4 (Continued)

-36 - 98 SET STASIZ SORTED PRANK 99 OWNER SYSTEM 100 MEMBER STATE 10 SET PORDER SORTED I DENT 102.OWNER SYSTEM 103 MEMBER PRES 104 SET SORDER SORTED IDENT 105 (OWNER SYSTEM 106 MEMBER STATE 107 SET CORDER SORTED IDENT 108 OWNER SYSTEM.109 MEMBER CONORS 110 SET EORDER SORTED IDENT 111 O)WNER SYSTEM 1.12 MEMBER ELECT 113 SET AORDER SORTED IDENT 114 OWNER SYSTEM 115 MEMBER ADMIN 116 SET ELECTO SORTED VOTES 117 )OWNER ELECT 118 MEMBER OPPON 119 SET PRESS IMMAT.120 OWNER STATE 121 MEMBER PRES 122 NPAGES 20 Figure 4 (Continued)

-37 - 4. CREATING AND INITIALIZING THE DATA BASE After the DDL has been specified and stored in some way (either in a line file in the computer or on cards) it can be used to generate the Data Base Table File (DBTF). Once this is done the Data Base File (DBF) can be initialized (a preliminary action needed before any data can be stored in it). 4.1 Creation of DDL, DBTF and DBF files As stated above, if the DDL for the data base is not punched on cards, it can be kept in a line file* in the computer. The DBTF and DBF files, however, must be sequential files*. If one DBMS is being developed it is a common convention to call the DDL file "DDL," the DBTF file, "DBTF" and DBF, "DBF." These names will be used in the following examples. 4.2 Generation of the DBTF* First the DBTF file must be created: $CREATE DBTF TYPE=SEQ and then the following program should be run: $RUN SELW:DDLA 5=DDL 8=17TF assuming that "DDL" is the name of the file containing the DDL for the DBMS. Two additional parameters may be used in conjunction with this program: 6=fdname and 7=fdname. 6 designates where the printed output from the program should be printed (it defaults to *SINK*). 7 designates file or device where block data generated from the program should be generated (it defaults to *SINK*). 4.3 Initialization of the DBF* After the DBTF has successfully been generated and the DBF has been created by: $CREATE DBF TYPE=SEQ the data base file can be initialized by the following program: 3 $RUN SELW:DBIN:=DBTF 2=DBF Once this has been done the data base is ready to be accessed for storage and retrieval of data........ * The file types, commands and programs used are particular to the Michigan Terminal System (MTS).

-38 - 5. CODING CONVENTIONS FOR DATA BASE ACCESS PROGRAMS Some conventions are common to any programs used to access the data base whether it is to store data, modify data stored,, or retrieve data. (All examples of programs in this paper will be written in FORTRAN). 5.1 Common Areas and Block'Data All the RECORD, ITEM and SET names defined in the DDL (e.g., PRES, IDENT and PORDER in the Presidential Example) have to be represented as character strings (i.e., 'PRES ' 'IDENT 'i-and 'PORDER, respectively) in order to be used by the Data Base Control System (DBCS) subroutines* for access programs. For example, a call to a DBCS routine could be stated as: CALL FMSK( 'PORDER ',BUF,IERR) An alternative to enclosing all DDL names in quotes is to define a constant to hold each character string: INTEGER PORDER(2) DATA PORDER/'PORD','ER 'I (Note that the constant, PORDER must be of dimension '2' to hold six characters.**Now the same CALL statement can be written as CALL FMSK(PORDER,BUF,IERR) which saves a considerable bit of coding since the constant will probably be used several times in a program. A lot of coding effort can be saved by usage of the FORTRAN COMMON statements and BLOCK DATA facility. All of the constants' value assignments and type assignments (e,g., INTEGER) can be given by the BLOCK DATA subprogram and COMMON statements which car be used to relate, these constants in BLOCK DATA to the main program and any subroutines. The information in the BLOCK DATA subprogram and COMMON areas are usually required for any subsequent programs and can be saved for this purpose also. An example format of a BLOCK DATA subprogram is given in Figure 5. The COMMON area, NAMS, contains all the constant names. The second COMMON area, PARS, contains the buffer variables used in common with several programs and subroutines. * Those subroutines described in ISDOS Working Paper No. 88 ** If the DBMS is to be written to conform to ANSI standards, the DATA statement should specify Hollerith formats: DATA PORDER/4HPORD,4HER /

-39 -1- B 12CK t A l A. L L C K 'A '. A 2 Ctl '~:M N/h AMS/PV R 5H, I, F N T `F. ST NAMN,,l K(TA,0~SUkNAM, 3( XL MiJT 7 H B AY eL,Y E AT HH ItGH,' P ARTYtCCL '; -I;s +;; ANSTI T, R EL IGN, M.[NTHI),.)AYI) YEA.,t CAU4ST. *5 ft. F rATHEt,MC r THE, NUOICCOCC.UP,'ARt"E~, WiFI"t, 0 o 6} *titsF, iL N TtH~t.. YM, YF ARM,CtH I KLN r,. DtI 'ON-NTJT t I. n';.'4AYy ^. AVPP - S, tSTAT L iiMF, YEA'RAr,,'; 81 kr (,. PTAL AriEA,A RANKtPP, P4RA^, KTVTES., 0 9t.~ C I TY, t Lt CT! WI NNCR, tO PP',lOl CUN~.P5 SE NA'ITE, i. N B tE R H S F Rt P, P RtS?'E E S ClPR ESN, 1. E Pk.E SAN, NUSTAT,C I T I ES, CABI NT.$SME$BS,HME,4MBS' 2 E S T AIS I Z, PO K)HER,S CRR,CUE;RoFcRD,E AtiRWEKb,RD', ER:, R 3 &: bLECLTIl,PPRSS,NUBCONGP. 4* IFNT-GtF. P PR S (2) 1 ENT ( 2iF S STA(2 ), INI AL(2), SUNAM (2 5 f MUN.THH(2) i.L)AY8(2 ),-Y E-A'H{( 2 "E:lIGt(T-2.).~,PTY(2I),COLLEGE(2) 6. ANSTRY(2),RELIGN( 2),MlJTtOIn 2~(2)tIAYD(iiXYEARp (2),CAUSE(2), 7. & FA1 f HER (2), MUTHER ( 2, Ni'b&tC2 ( 2).l<,CCUP tE'I:MrLACRGE{2h ~WI.. FE( 2 6 c M5N T'rHM (2), A Y: (2 ),YE A RM(2 ),CtH iLDN (2),~AMNiYjl.Z) IMONT H( 2 ), K c t? AY ( 2 J Y t Y ( 2 ),'Yt. Ai ), VPR, S( I, TAT.T{2l)!t.A.. 2:r(? ): Y EAR A^) 2) & CAP AL(? ) i ARE iA( 2 ), AR AN Z J),P,.:)fl, PJ<,lAN I(2)' AViTES( 2 ) 1 & CI TY(Z) 2 LFCT (2) W INNE.( 2),CP.CN (2),,utLNGRa$. Z), SENATE 2 ),,'~ UM) i 2BER ( 2,HSER EP(2 ) P "SM (Z). SCs'(,PR S.2) 3 PRL SAN 2), NUS T AT (2 ),C I T. I ES iZ',CA;'ljT1( 2 )i,.~ME'S { 2, HMEMBS (2 I, ''t ~ C& STAS I Z((2, P ORER(2)R,SR1ik)f l RD(2),C vi)FR2),E'-RnORER (2),AOR.FR( 2), 1't5 F LECTO(! 2 ),.PPEt S S(2),N rBJ(2), CNGSPS2N(2,)C '6 r.fCOMMON/.PAR S/NUM, BIJF, EOF!7 1 NT GELR INlMt JU F (3) t8 L LOGICAL. EOF ' tO)DATA PRPFS / *PRs-S' r Dt)A i A IDENT /' I DEN' t 1 I / 1D.bUATA FSTNAM/ FSTN '' AM / 12 CP DATA INITAL/ INIT, 'ALt / 13 DATA SURNAM/'SURN,' ANI S/ 34 IOATT)ATA MfNlTH/iMNT'H MNT't,'/ 5Dj IAlT'A DAYDB'. / DAY 't' 9/ 3h 6XDATA YEARB /YYEAR*,*/ '7 DATA HElIGHT/' HEIG(' HT '/ 3F3 ~ DATA PARTY /'PART',Y / 3'9 ODATA CULEGr/ COFLF'G G */ i.JDATA ANSTRY/ ANST' ' Y '/ +i1 OATA RFL-IGN/'RFELI' I'GN '/ 2FA IA T A MONTH')/'MTNT ', H') t3 DADATA DAYD /'IDAYD'' '/ DATA YEARD /'YEAR, '[ / P'j ~ DA1A CAUSF./CAUS' E / IDATA FATHER/'FATH', t' / 47 TDAIA MOTHE R/'MTH',' R */.+8A l 'DATA NUOCC /*NOC'C '/!)ATA OCC.tP /'OCCIJ' P '/ 50 D)UATA MAR PPGE./'E4ARR*,'GE '/ 5i 1 OATA WI:f /'WIFF,' i:2 ''4DEATA MON'TH/'MINT, ' HM ':33 DATA DAYM /'DAYM / '>+ Di.)AT A YEARM: /'Y EAR ' M / L)5ATA CHI.LION/'CIHIL' 'i N / it.;I)ATA AOMIN: /'ADMI','s -/ ",17 IDATA M.ONTH /MI'I NT', '/ 5:ATA DAY /*')AY *' / DA fA YIAR /'YEfAR '' f.O i)DAT.. VPRES /'VPRE *S ' Figure 5 Block data example

ti61. r1AT'A S T AT'f / 'S [AT' r '/ L'~i' tDATA NA!E: /'NA ME:, ',DA''A AF:FA /'AREA A', t 1 t.O:: f) A > T '.ATA A.A:."/ A Y A, I I ' /, (~'.'! OAT& P,.' /kJFAitP- E, A/ 6! / ~' tAT A PKjP / PD" t ' /,' t, I)ATA S5 /'A TA ', ' A'/ 0,T V TFS V' VCTS I/ It(! ) I Ai CITY ' / I. TY, i '/ 1!:]AT"A ELECT /':LE('., T '/ 1/ 2UfJ ATA WINNER/'W INN', - '1/ 7/3'.'A'I A U iPPLUN' /, 'Wpp. I. A ' t / DA AT A CCUNGKS/ C"'INGt' ' / 13rS At *shDAJA SENATE/ 'S-NA-, 'TN A/ 'i'6A " f V.. k/ NUMJ. ': m/ A.TA'A H', tBER/',,,i. P ~t' ~ ti — DATA HSFRFP/'HSF.'i,'&Pt / f.)ATA PRFSME/'P RE' ' f '/ i:A TA P i.ESCS' S PRE: S ' CS 'I.[) ' t T A PP ES E N/ ' PR ES, * N / 8 DA T t PR S AN / ' P R E S, ' AN TC p ~ t~f? T 1 2.A 1 A NUSTA,/I-'NUS T,'AT 't OAIA CITI:S/'TIf', 'S '/ ~ i': D/:DA T A C.A I: ' NT/' CABI ' ' NT ' / )^ AT/f S.,' BS/,S5.4r-Ei, '.~ /.sI A!H pi B I - I' ' r-....s 87 DATA STA S.Z/ 'TAS ' t IZ / DAT A PT rA/'PO~n FR '/ DAT A SI E. /':,R/ P ' i ' E/ 0 DAT A C K a /.,,DAT A A O E I' / A,. D AT A A. ' t. / ) ' i '. / ") [AT A C7 1 '1. ', C' T; ' /1 1 S' l'.) A.- T [ A )f. D / ' - 5 /.(}s~P 7_,.., 'F 1':, Figure 5 Block data example

-41 - 5.2 Buffer Variables Buffer variables are variables used totemporary store data values as they pass to, or from, the data base. As specified in the COMMON area, PARS, NUM is a buffer variable used to hold all integer numerical data. BUF is a dimension 3 buffer variable which is used to hold all the ten character strings as read from PRESFILE. Note that in the Presidential Example all data is read in as ten characters and stored in BUF. Then the data is stored in the data base as a character string (ten characters) or converted to an integer and stored as a number. In DBMS, where many different sizes of data (measured in terms of fullwords), or types of data (logical, real, etc.) are to be read, a buffer variable must be defined for each different size and type. For example, if strings of 10 characters and 30 characters were to be manipulated the two buffers to handle these strings could be defined as: INTEGER BUF1 (3),BUF2(8) In any case, Table 1 given in Section 3, can be used as an aid in determining the dimension of the buffer variables to handle large character and bit strings. To define a buffer variable to hold double word size: REAL* 8 RBUF 5.3 Access of the DBF and DBTF Reference can be made to the Data Base File and Data Base Table File in a DBCS subroutine through assignment to logical IO units. For example, if the assignment of 2=DBF and 3=DBTF was made on the MTS $RUN command, the files could be referenced in the following manner: CALL OPEN(2,3,100,IERR)

-42 - 5.4 General Program Formats Regardless of the purpose of the program accessing the data base a general format is inherent. The figure below presents the general format for main programs, COMMON/NAMS/ INTEGER ARRAY any data declarations particular to the main program CALL REPINT CALL NEWREP(.FALSE.) CALL OPEN(2,3,100,tERR) ) program code CALL CLOS(OARRAY,IERR) END REPINT and NEWREP perform initialization required before using the report subsystem subroutines (to be described later). OPEN specifies the DBF and DBTF files to be accessed by the program and CLOS closes these files properly. The figure below presents the general format for subroutines used in accessing the data base. SUBROUTINE routine-name COMMON /NAMS/ ) any data declarations particular to the subroutine code RETURN END

-43 - 6. POPULATING THE DATA BASE One major function of the DBMS is to populate the data base (i.e., store occurrences of each type of SET, RECORD and ITEM defined by DDL). There are several subroutines described in ISDOS Working Paper No. 88 and in the PSA software documentation which are helpful (if not necessary) in accomplishing this. 6.1 Reading Data from the Input File Before any data can be stored in the data base it must first be read from some input file or device. The QROPEN, QREAD and QRCLOS routines can aid in reading the data. QROPEN specifies which file the data is to be read from, and the size of the logical record to be read by QREAD. For example, CALL QROPEN(1,1, 100) specifies that the file used is assigned to Logical I/O unit 1 and the logical record size is ten characters within a block of size 100 (this obviously means that 10 records per block will be read as is the case of PRESFILE shown in Appendix A.) QREAD reads in a logical record, stores the data and sets a switch should an end-of-file be encountered. For example, CALL QREAD(10,BUF,EOF) specifies that the first 10 characters (which in this case is all the characters) of the logical record be stored in the variable BUF. EOF is a logical variable which will be set to.TRUE. if an end-of-file is encountered. Since all data is read in a character format the subroutine CTOI can be used to convert character to integer. For example, CALL CTOI(BUF,1,l0,NUM) will convert the character form of the number stored in BUF (starting in column 1 and which is ten characters long) to integer form and place the result in NUM. This is necessary when integer data is actually to be stored in the data base. If a data base "item" was defined to contain character information (in the DDL) then only character data can be stored in it. Likewise with integer or real numbers as data. Finally QRCLOS closes the file designated in QROPEN. For example, CALL QRCLOS accomplishes this.

-44 - 6.2 Storing Data Now that data can be read by the access, program in some form (character and integer are the forms concerning this application) it must be stored in the data base as an "item" for later retrieval. The following routines described in this section are considered the basic subset of subroutines (from ISDOS Working Paper No. 88) needed to populate a data base.* FMSK Used to find a particular member record occurrence in a particular set. CR Used to create record occurrences. SFR Used to store data in a particular "item" of a particular record. AMS A SRM Used to define relationships between a record SOM occurrence and a particular set. SMOVE Used to store data in a "repeating item". 6.3 FMSK Find Member of a set based on Sort Key This routine was used (in the Presidential example) to check that a record occurrence based on the record identifier (sort key) for a particular record type had not been previously stored in the data base. For example, if BUF contained the identifier "WASHINGT" the call CALL FMSK(PORDER,BUF,IERR) would check member record occurrences of the set PORDER to see that an occurrence has the sort key value contained in BUF. (The reader may note that this operation is consistent with the DDL specified for the Presidential example, i.e., PORDER is a defined set sorted on the item IDENT in the PRES record type and "WASHINGT" is the value IDENT will take on for the PRES record occurrence for George Washington.) If a record occurrence can not be found that has "WASHINGT" as an identifier, IERR will take on the value -1. Otherwise, the record occurrence found will be made the current member of the set PORDER. This makes it possible to store or retrieve data from the record occurrence. If IERR has the value -1, the record occurrence does not exist and a record occurrence must be created before any data can be stored in it. 6.4 CR Create a Record occurrence This routine is used to create an occurrence of a particular record type (e.g., PRES) so that data may be stored in it and relationships to other record occurrences may be defined. * The subroutine SMOVE description can be found in the PSA software documentation package.

-45 - For example, an occurrence of a PRES record type can be created by the call; CALL CR(PRES,KEY,IERR) The data base key value for this occurrence is returned in KEY and any error codes are returned in IERR. 6.5 SFR Set Field in the current Record This routine is used to store data in a particular item (field) in a record occurrence. This would be used to store the character string "WASHINGT" contained in BUF in the item called IDENT in a PRES record occurrence. For example, CALL SFR(IDENT,PRES,BUF,IERR) would store the value of BUF in the item IDENT of the current PRES record occurrence. Any error code would be returned in IERR. It is important that BUF and IDENT are defined to hold the same type of data (i.e., INTEGER, CHARACTER, REAL, LOGICAL, etc.) 6.6 AMS Add a particular record occurrence as a Member of a Set Now that IDENT has a value the record occurrence may be added to the set PORDER as a member. (This could not have been done previously because PORDER is sorted on IDENT values.) For example, CALL AMS(PORDER,PRES,IERR) adds the current PRES record occurrence to the set PORDER and makes this record occurrence the current member of the set. The record occurrence is added to the set according to any ordering criteria defined in the DDL (i.e., FIFO, SORTED, etc.). At this point the particular record occurrence is the current member of the record type PRES and the current member record occurrence of the set PORDER. 6.7 SRM Set Record occurrence based on current Member of set In the case where the member record occurrence was found, this routine can set the current member of a set to be the current record occurrence of a particular record type. For example, CALL SRM(PORDER,IERR) would set the current member record occurrence of the set PORDER to also be the current record occurrence of its particular record type (which in this case is the PRES record type). At this point the particular record occurrence is the current record occurrence of the record type PRES and the current member record occurrence of the set PORDER.

-46 - 6.8 SOM Set the current Owner of a set, based on the current ifember of a set. This routine is used to set up relationships between two particular record occurrences. Before a record occurrence is designated as a member of a set its owner must be defined. (In ordering relationships this is not necessary since there is only one owner record occurrences; SYSTEM). For example, CALL SOM(PRESME,PORDER,IERR) makes the current member record of the set PORDER to be the current owner record of the set PRESME (marriage relationships). Once a marriage record (MARRGE) is created it can be related to a particular owner record by simply adding it to the PRESME set. For example, CALL AMS(PRESME,MARRGE,IERR) designates that the current MARRGE record is a member of the set PRESME. Its related owner record is defined by the previously used SOM routine. 6.9 SMOVE String MOVE This routine is used to store data in a repeating item. Using the example of the repeating item defined in the Presidential DDL: ITEM NOOCC INTEG 15 ITEM OCCUP CHAR 10 NOOCC 3 Remember that the value of NOOCC is the number of occurrences of the repeating item OCCUP for any given occurrence of the PRES record. When NOOCC=3 there must be three occupations stored (each as a 10 character name). Also note that 3 is the maximum number of occurrences of the repeating item. Assuming that the number of occurrences of OCCUP (value of NOOCC) is supplied by PRESFILE before the values for OCCUP, (the format of PRESFILE shows this to be true) this data can be read and stored in the following manner. CALL QREAD(1O,BUF,EOF) CALL CTOI(BUF,1,10,NUM) CALL SFR(NOOCC,PRES,NUM,IERR) IF (NUM.EQ. O) GOTO 111 PTR=l INC=NUM DO 11 I=1,INC CALL QREAD(10,BUF,EOF) CALL SMOVE(B,PTR,BUF 1,1 O) 11 PTR=PTR+10 CALL SFR(OCCUP.PRES,B,IERR) 111

-47 - First the value to be given NOOCC is read, converted to integer representation and stored, A test is made to see that if any occurrences of OCCUP exist and branching is done accordingly, The repeating item OCCUP can be considered to be one large storage location (big enough for 3 values) and so a pointer is used (PTR) to specify where in the storage location the data will be stored. Figure 6 shows the format of this location. 12345678901234567890 1234567890 OCCUP #1 OCCUP #2 OCCUP #3 Figure 6 INC is used to contain the NOOCC value in the DO statement. (This is a convention used throughout the coding process, rather than using NUM. Since NUM might be used within a DO loop, its value can be modified accidentally.) Next, each occurrence of OCCUP is read and stored in the variable B (dimension 8, to hold thirty characters). Note that PTR, INC. and Bare all declared as integer variables. SMOVE is then used to store each occurrance of OCCUP in B at its proper position (as designated by PTR). It is also specified that all ten (10) characters are to be stored starting at the first (1). Note that PTR will take on values of 1, 11 and 21. Finally, after all available occurrences of OCCUP have been stored in B the contents may be transferred to OCCUP in the data base via the SFR subroutine. 6.10 Code to Populate the Presidential Data Base Now that some of the basic operations have been described they can all be related together to show how the data in PRESFILE can be stored in the Presidential data base. A main program is used to identify the type of data that will be read from PRESFILE (i.e., one of the five types: PRES, ELECTION, ADMIN, CONGRESS or STATES data). After this is determined the appropriate subroutine is called that will handle storage of this data (i.e., CRPS, CREN, CRAN, CRCS or CRSS, respectively). To generate the object code for this code: $RUN *FTN PAR=SOURCE=BLOCFILE+ADMIN+CONGRS+ELECT+MAIN+PRES+STATE LOAD=CODE

-48 - BLOCFILE, ADMIN, etc. are the names of the files containing the subroutines, block data and main program code for the population operation, Table 3 presents relationships between the data in PRESFILE, the subprogram handling it and the file holding the source code for the subprogram. Table 3 Date type in Subprogram handling Source code PRESFILE this data type file name Data type identifiers main program MAIN PRES data CRPS subroutine PRES ELECTION data CREN subroutine ELECT ADMIN data CRAN subroutine ADMIN CONGRESS data CRCS subroutine CONGRS STATES data CRSS subroutine;STATE - -_ l BLOCK DATA 'BLOCDATA,_________......____ ~~ --- —--------..... --- —---- __ After up to etc.) $RUN. the object code the appropriate and executed by CODE+SELW:DBLIB has been generated, the code can be linked DBMS routines (e.g., QREAD, SFR, SMOVE, issuing: 1-PRESFILE 2=DBF 3=DBTF The rest of this section presents listings of the source code for the above subprograms.

,':::'** MAIN PiRUGRAM ***** * COMMON AREAS FOR MAIN * C OM '4N/PARS/ UM BUF, E0F INTEGER NUM,BUIF(3) LOGICAL EOF * DEFINE VARIABLES TO 3E USED IN THIS SUBPROGRAM * INTEGER ARRAY * REPORT INITIALIZATION PROCEDURES * CALL REPINT CALL NEWREP(.FALSE.) * OPEN THE DATA BASE FILE AND DATA BASE TABLE FILE (LOGICAL I/O UNITS 2 AND 3 RESPECTIVELY) * CALL OPEN 2.3, 100, ERR) * OPEN PRESFILE(LOGICAL I/O UNIT 1) TO BE READ BY BLOCKED DATA I/O ROUTINES * CALL OROPEN(I,101,00) * READ FIELD IN PRESFILE(SHOULD CONTAIN A DATA TYPE IDENTIFIER) * CALL OREAD(10,BUFEOF) * END PROCESSING SHOULD AN END-OF-FILE BE ENCOUNTERED * IF (EOF) GOTO 999 * TEST TU SEE IF THE IDFNTI=IER SPECIFIES PRESIDENTIAL DATA * J=ISCUMP ( BUF, tPRES, 1,4) IF (J.NE. 0) GOTO 98 * IF SO, CALL ROUTINE CRPS TO HANDLE THIS TYPE OF DATA * CALL CRPS GO TU 99 * TEST TO SEE IF THE IDENTIFIER SPECIFIES ELECTION DATA *,J=ISCOMP(BUF,,'ELECTION',1,8) IF (J.NE, O) GOTO 97 * IF SO, CALL ROUTINE CREN TO HANDLE THIS TYPE OF DATA * CALL CiET G tTO 99 * TEST Ti SEE IF THE IDENTIFIER SPECIFIES ADMINISTRATION DATA * 7 J=ISCJMP(BUF. ' ADAIN 'l,5) IF (J.NE. 0) GOT)O 96

C * IF SO, CALL ROUTINE CRAN TO HANDLE THIS TYPE OF DATA * CALL CRAN GOTO 99 C c~ * sTEST TO SEE OF THE IDENTIFIER SPECIFIES CONGRESS DATA * C 96 J= ISCJMP( UF, 1, CUNGRESS' 1,8) IF (J.NE. O) GOTO 95 C G * IF SO, CALL ROUTINE CRCS TO HANDLE THIS TYPE OF DATA * CALL CRCS GOTO 99 C C " TEST TO SEE IF THE IDENTIFIER SPECIFIES STATE DATA * 95 J=ISCO}MP(BUF,.I,.STATES',1,6) IF (J.NE. 0) GOTO 94 C C * [ IF SO, CALL ROUTINE CRSS TO HANDLE THIS TYPE OF DATA * CALL CRSS GOTO 99 C 4 ILLEGAL IDENTIFIER ENCOUNTERED, PRINT WARNING MESSAGE ~~C ~AND STOP * C 94 CALL JFBLOL( 1.(, 31,31HWARNING- RECORD-TYPE) CALL BUFBLD 1,, 10,BLUF CALL PBUF(2,0,.TRUE.) C C * CLOSE PRESFILE * C 999 CALL RCL.US C C * CLOSE THiE ATA BASE * C CALL CLOS(O ARRAY, IERR) END

-51 - SUBROUTINE CRPS **:** THIS ROU[INE HANDLES ALL DATA FOLLOWING A PRESIDENT DATA TYPE IDENTIFIER ***** * COtMMON AREAS FOR CRPS * CUMMON/NAMS/PRES, IDENT, FSTNAM, INIT-AL SURNAM, & MON THBi, DAY,YEARBHEIGHT PARTY tCOLEGE & ANSTRY, REL I GN, MONTHDDAYD,YEARD CAUSE & FATHER. MOTHER, NOOCC, OCCUP.MARRGE W I FE, & MOJNTHM, DAYM,YEARM, CHI LDN ADM I N MONTH, & DAY EARVPRESSTATENAMEYEA VES S NAM RAD, & CAPTAL. AREAARANK,POP,PRANKVOTES, & C ITYELECT WINNERUPPONCONGRS SENATE & NUMBER. HS ER EP. PRESME t PRESCS, PRESEN, & PRESANNUSTAT.CITIESCABINTSMEMBS,HMEMBS, & STASIZ, PORDER, SOR)ERCORDER, EORDERAORDER & ELECTO0PRESS,NUB,CONGPS INTEGER PRES(2),IDE'ET(2) FSTNAM(2),IN[TAL(2) SURNAM(2), & MONTHB(2),DAYB(2),YEARB (2 tHEIGHT(2),PARTY(2,COLEGE(2)v & ANSTRY (2),R tELIGN(2 ),MONTHD(2 ),DAYD)( 2),YEARND22) CAUSE ( 2), & FATHER(2),MOTHER(2),NOOCC(2),OCCUP(2),MARRGE(2),WIFE(2) M-)r'NTHM 2), DAYM(2), YEARM( 2 CHILN ( 2 ),ADMIN( 2),MONTH ( 2),; DAY(2),YEAR(2),VPRES(2),STATE(2),NAME(2) YEARAD(2), CAPTAL(2),RAREA(2,ARANK(2),POP(2) PRANK(2).VOTES(2); CITY(2),ELECT (2),WINNER (2),OPPON(2),CONGRS(2),SENATE(2), NUMBER(2) HSEREP (2) PRESME(2 )PRESC S(2)PRESEN(2), PRESAN(2),NUSTAT(2),CITIES(2),CABINT(2)tSMEMBS(2),HMEMBS(2), STASIZ(2),P',DER2SORDER2,CORER(2SRDER(2R(2), EOROER(2),AORDER(2), ELECTO ( 2 ) PRESS(2) NUB(2), CONGPS(2) CUM'?ON / PARS/NUM, BUF F OF INTEGER NUM,3UF(3) LOGICAL EOF * DEFINE VARIABLES TO BE USED IN THIS SUBPROGRAM * INTEGER B(8),PTR * READ THE PRESIDENT IDENTIFIER FROM PRESFILE * CALL OREAD(10,RBUF,EOF) * TFST Ti SEE IF THE PRESIDENT IS ALREADY IN THE DATA BASE * CALL FMSK( POROER. BUF, IERR) IF (IFRR.GT. -1) GOTO 110 * IF SO, GO TO 110; IF NOT, CREATE A RECORD OCCURRENCE FOR HIM AND STORE THE IDENTIFIER I* CALL CR(PRES,KEY, IERR) CALL SFR( IDFNT,PRESt.JF, IERR) * AnDD HIS RECORD fOCCURRENCE TO THE SET 'PORDER' * CALL AMS(PORD)ERKPRFS IERR)

-52 -G(ITi) 1 12 C * MAKE THE RECORD THE CURRENT RECORD OCCURRENCE 6 tIO.F THE RECORD TYPE 'PRES' *;Ji C'ALL SRM(PORDERIERR) C G * READ TIlE PRESIDENT'S LAST NAME AND STORE IT IN * SURNAM' * C1t2 CALL OREAD ( 1 BUF EOF) CALL SFR(SURNAM PRES, BUF,I ERR) C C * RFAD HIS FIRST NAME AND STORE IT IN 'FRSTNAM' * C CALL OREAD(10,BUF,EOF) CALL SFR(FSTNAMPRES. BUf. ERR) C * READ HIS MIDDLE INITIAL AND STORE IT IN 'INITAL' * C CALL UREADt lO.BUFEOF) CALL SFR INI rAL,PRES BUF, IERR) ~C *^ READ HIS MONTH OF BIRTH AND STORE IT IN 'MONTHB' * C CALL OREADILOBUF.EEOF CALL SFR(MONTHBPRESBUF, IERR) C C * READ HIS DAY OF BIRTH, CONVERT TO NUMBER, AND C STORE IN 'DAYB' * C CALL OREAD (1O,BUFOF) CALL CTO I (BUF,I 1.,O,NUM) CALL SFR(DAYB,PRESNUMIERR) C C * R EAD HIS YEAR OF BIRTH, CONVERT TO NUMBER, AND C STORE IN 'YEARB' * C CALL J READ( 1(,BUF. EOF) CALL CTO I(BUtF,1, lONUM) CALL SFR(YEARBPRESNUM.I ERR) C C: READ STATE NAME(AND STATE IDENTIFIER) BORN IN. ^C~ OtNLY STATE IDENTIFIER NEED BE USED TO FORM THE CGK RELATIONSHIP BETWEEN 'PRES' AND 'STATE' RECORDS * CALL QI,EAD ( 10BUF,EOF ) CALL Q.RFA)(10,BIJF,EUF) C * TEST TO SEE IF THE STATE IS ALREADY IN THE DATA BASE * CALL FM SK(SOROIR, UFIERR) IF (IERR.GT. -1) GOTO 101 C IF SO G IF CEATE A REC OCC ENCE C * IIF SO. GO TO 101i; IF NOT, CREATE A RECORD OCCURRENCE C- FOR IT AND STORE STATE IDENTIFIER IN IDENT * CALL CR(STATE,KFY,IERR) CALL SFR IDENTSTATEBUF IERR)

-53-: ADD STATE RECORD OCCURRENCE TO SET *SORDER * CALL AMS(SORI)ER,STATE.IERR) * FORM THE RELATIONSHIP(STATE OF BIRTH) BETWEEN PRESIDENT AND STATE * CALL SOM(PRESStSORDERIERR) CALL AMS ( PRE SSPRES. I ERR) * READ HIS HEIGH-T AND STORE IN 'HEIGHT* * CALL READ (10,BUFEOF) CALL SFR(HEIGHTPRES BUF, IERR) * READ HIS PARTY AND STORE IN 'PARTY' * CALL OREAD( 10BUFEOF) CALL SFR(PARTY,PRESBUF,IERR) * READ HIS COLLEGE ATTENDED AND STORE IN 'COLEGE' CALL OREAO(,10.OBUF, EF) CALL SFR(COLEGE PRES, BUF, IERR) 4 READ HIS ANCESTRY AND STORE IN 'ANSTRY' * CAtL OREAD( 10,BUFEOF) CALL SFR(ANSTRYPRESBUF, IERR) * READ HIS RELIGON AND STORE IN 'RELIGN' CALL OREAD(. BUFEOF) CALL SFR(RFLIGN.PRES,BUF, IERR) * READ NUMBER OF OCCUPATIONS, CONVERT TO NUMBER, AND STORE IN 'NOOCC * CALL OREAD(1O,BUFE(F) CALL CTO I (BUF, 1, O NUM) CALL SFR(NOOCC PRESNUM, IERR) * TEST TO SEE IF ANY OCCUPATION DATA SHOULDL BE STORED AS A REPEATING ITEM IF (NI.M,E.O. 0) GlTiO 11 PTR=1 INC=NUM * PACK THE OCCUPATIONS INTO A TEMPURARY BUFFER (HUF) BEFORE STORING IN DATA BASE DO 11 I=1,INC * RFAD AN OCCUPATION AND STORE IN 'BUF' * CALL O RE AD( 10, BUF, EtF ) CALL SMOVE (B,PTR.BUF- 1 10 ) PT R=PTR+ 10

* STUF THE CONTENTS OF 'BfIF' INTO 'OCCIIP' * CALL SFR (OCC(JP,PRES.B.IERR) C C * READ MONTH DIED AND STORE IN 'MONTHD' * C 11 CALL OREAD( 10 BULF,EOF CALL SFR(MONTHDPRESBUF, IERR) C C *4 READ DAY DIED, CONVERT TO NUMBER, AND STORE IN DAYD' * C CALL tJREAD(I1,BUFEOF) CALL CTOI (BUF, I O, NJM) CALL SFR(OAYD,PRES, tNUMIERR) AC * REAO YEAR DIED, CONVERT TO NUMBER, AND STORE IN 'YEARD' * C CALL tRF AD 10,BUFEOF) CALL CTOI(BUFi10..NUM) CALL S R(YEARD,PRES.NUM.M IERR) C C.C. * READ CAUSE OF DEATtH AN[D STORE IN 'CAUSE' * CALL OREAD( 10 BUF, EF ) CALL SFR(CAUSE,PRES JUF, IERR) C C * READ FATHER'S NAME AND STORE IN 'FATHER' * C CALL OREAD( 1OBUFEOF) CALL SFR(FATHERPRESBUFIERR) C C CALL QREAI)( 1,BtUF,EOF) CALL SFR(MOTHER PRES BUF IER R) C C * READ NUMBER OF MARRIAGE DATA OCCURRENCES AND C CONVERT TO NUMBER * CALL OREAD(10, BUFEOF CALL CTOI(BLUF..1lNUM) C ~C t* SPECIFY RELATIONSHIP BETWEEN PRESIDENT AND C MARRIAGE DATA * CALL SOM(PRESME,PORDER, IERR) INC=NUM C C # CREATE MARRIAGE RECURD AND STORE MARRIAGE DATA FOR ~C ~ EACH MARRIAGE DATA OCCURRENCE * C DO 1[2 I=1.INC CALL CR(MARRGEKEY.IERR) CALL AMS(PRESME,MARRGE tIERR) C *READ NAME OF WIFE AND) STORE IN 'WIFE' * CALL OREAD( 10, BUF, E1F) CALL SFR(WIFE,MARRGE, BUF IERR)

— J:X REA ) MGNTH I3F MARRIAGE AND STORE IN 'MONTHM' CALL ORFAD(10 BUFEf F) CALL SFR(MONTHM, MARRGE,8UFIERR) * READ DAY OF MARRIAGE, CONVERT TO NUMBER, AND STORE IN 'DAYM * CALL OREAD(10,BUF,EOF) CALL CTO (BUF.,1 0,N N) CALL SFRIDAYMMARRGENUM, IERR) * READ YEAR OF MARRIAGE, CONVERT TO NUMBER, AND STORE IN 'YEARM' * CALL dREAO(lO, 1 JF EOF) CALL CTOI(BUF,l,10,NUM) CALL SFR(YEARM,MARRGF,NUM, IERR) * READ NUMBER OF CHILDREN FROM MARRIAGE, CONVERT TO NUMBER, AND STORE IN 'CHILDN' * CALL QREAD(10,BUFEOF) CALL CTOI (B.F,,I 10, NUM) CALL SFR(CHILDNMARRGENUM, IERR) * READ NUMBER OF ELECT IONS WON AND CONVERT TO NUMBER * CALL OREAD(10 BUFEOF) CALL CTU I( UF, 1 10,NUM) * IF PRESIDENT WON NO PRESIDENTIAL ELECTIONSt GO TO 131; OTHERWISEI SPECIFY RELATIONSHIP BETWEEN PRESIDENT AND ELECTION DATA * IF (NUM.EO. ) GOTO 131 CALL SOM(PRESEN,PORDER IERR) INC=NUM * PROCESS EACH OCCURRENCE OF ELECTION DATA * DO 13 I=l,INC * READ ELECTION IDENTIFIER * CALL QREAD( 10lBUF, EOF * VFST TO SEE IF ELECTION IS ALREADY STORED IN DATA BASE * CALL FMSK(EURDERBUF, IERR) IF ( ERR.GT. -1) GOTO 14 IF SO, GO TO 14; IF NOT, CREATE ELECTION RECORD AND STORE IDENTIFIER IN 'IDENT * CALL CR(ELCTKEY, IERR) CALL SFR( IIDENT, FLECTf3UF IERR * ADD ELECT ION iRECORD TO SET EORDER' *

CALL A1S( ECRDER,ELEC E, [ERR) G)T:] 1 3 C * MAKE CURRENT M[EMBER f.F SFT 'EfRDER', CURRENT C RECORD OF TYPE 'ELECT' ~ C 14 CALL SRM(EORDER,IERR) C C FORM RELAT I NSHIP BETWEEN PRE SIDENT AND ELECTION C, RFCORD 4 13 - ALL AS ( PREStEN ELEC T, I ER ) C C * RFAA) NUMBEiR OF ADMINISTRATII'NS AND CONVERT TO NUMBER * C 1 31 CALL JRF A D( 10, U.F, EOF ) CALL CTOI (HtJF,.10,NUM) C C 4 SPECIFY RELATIONSHIP BETWEEN PRESIDENT AND C ADMINISTRATI.)N DATA # C CALL SCM( PRESANiP RDER, IERR) I NJC=NUM X~C *' PR, CESS EACH OCCURRENCE ()F ADMINISTRATION DATA *.C I, REA') ADMINISTRATION IDFNTIFIER * rJ CALL i)RF1D( 10,BUF,9EOF) C C * TEST TO SEE IF ADMINISTRATION IS ALRFADY STORED C IN DATA BASE * C CALL FMSK(Ar'RiDFR,3lJF, IERR) IF (IERR oGT. -1) GOTO 16 C C, "IF SF, GO TO 16; IF NUT, CREATE ADMINISTRATION RECORD C 'AN\) ST!ORE IDENTIFIER IN ' IDENTt * C CAL L R( ADtM IN,9KEY, IFRR) CALL SFR( I E- " T,A DMIN,B FIERRK C, 4* AW-J ) ADMINI ISTRATION RN ECOURD TO- SET 'AORDFR' * C G)T"3 17 C Ki<-C.)Ri) OF TYPE 'ADMIN' * 16 CALL SRM(AoJR!)ER,IERR) r C FORM RELATIINSHIP BETWEEN PRESIDENT AND ADMINISITRATION,lC, REEC')RD. C7 LL AS ( PR A M 17 CALL AMS(PRESAN,ADMIN,IERR) C (: R EAD' NlJtMBR OF CONGRFSSES AND CONVFRT TO NUMBER *

-57 -C'LL (REA)( 1O0,UFFlF ) CALL CTO I ( 3tJF, I,1tO,NUII INC=NUM * PRiCESS EACH OCCURRENCE OF CONGRESS DATA * DO 1~8 I=1 INC ~ READ C(,NGRESS ItDENTIFIFi * CALL iREFA3 OI( 10 ),F, EOF) ~ TESI TOi SEE IF CONGRESS IS ALREADY STORED IN DATA BASE * CALL FMSK(Ci R, RBUF, IFRR) IF ( ERR.GT. -1) GOTO 19 * IF, S0t GO T(t 19; IF: IF-OT CREATE CO.NGRESS RECORD AND STORE IDENTIFIER IN ' IE)NT' CALL C'R(CONGRSKLY, IERR) CALL SFi<( I DENT CONG7RS, UF, IERR) A'DD CONGRESS RECORD TO SET 'CORDER' * CALL AAS(CCORJFR,CGN3'KSIERR) * 4AKE CURRENT MEMBFR OF SET 'CORDER' I CURRENT RFCORO) IOF TYPE 'CONGRS' 4 CALL St3OM(CONGPS,C OR FR, IERR), FLR:'4 RELATIONSHIP BFTWEEN PRESIDENT AND CONGRESS RECtJRD THROUGH USE OF ' NR' RECORD CONNECTION * CALL S2 M(PRESCS,PORD ER IERR) CALL C ( JUr KEY, IERR) CALL A (1 C NGPS ( C,; S,N, t I ERR) CALL A'MS( PRESCS NU, I ERR) RET.JKRN 4 PR)CESSING OF DATA RELATED) TO O(NE PRESIDENT IS DONE 4 END

SUBROUTINE CRAN,C C ***** THIS ROUTINE HANDLES ALL DATA FOLLOWING AN C ADMINISTRATION IDENTIFIER * C C C * COMMON AREAS FOR CRAN * C COMMUN/NAMS/PRES,IDENT,FSTNAMI!NITAL,SURNAM, & MONTHB DAYBYEARB HEIGHTt PARTY, COLEGE & ANS TRY, REL IGN MONTHDO DAYDY E ARD, CAUS E ~ FATHER,MOTHERNOOCCUCCUPMARRGEWIFE, & MONTHM,DAYMYEARM,YE CHILDN,ADMINMONTH, & DAY,YEARVPRESISTATENAMEYEARAD, & CAPTAL,AREA,ARANKPOPPRANK, VOTES, & CITY,ELECT,WINNER,OPPON, CNGRSSENATE, & NUt1MER,HERREPPRESME,PRESCSPRESEN, & PRESAN,NUSTAT,CITIESCABINT, SMEMBSHMEMBS, & STASIZPORDERSORDER,CORDEREOROERAORDER, & ELECTO PRESSNUB,CONGPS INTEGER PRES(2), IDENT 2), FSTNAM(2), INITAL(2),SURNAM( 2) & MUNTHB(2),OAYB(2),YEARB(2),HEIGHT(2),PARTY(2),COLEGE(2Z) & ANSTRY(2)~RELIGN(2)~MONTHD(2),OAYO(2~tYEARD(2),CAUSE(2), & FArHER(2),MOTHER(2),NOOCC(2),UOCCUP(2),MARRGE(2),WIFE(2) & MONTHM(2),tAYM(2),YEARM(2),CHILDN(2)~AOMIN(2),MONTH(2)w & DAY(2),YEAR(2),VPRES(2),STATE(2),NAME(2) YEARAD(2), & CAPTAL(2),AREA(2),ARANK(2),POP(2,PRANK(2Z)VOTES(2), & C-ITY(2),ELECT(2),WINNER(2),OPPON(2) CONGRS(2) SENATE(2) & NUMBER(2),HSEREP(2), PRESME(2 ),PRESCS(2),PRESEN(2) & PRESAN(2),NUSTAT(2).CITIES(2h)CABINT(2),SMEMBS(2),HMEMBS(2)~ & STAS.Z2) PORDER(2 ) SORDER( 2 ) CORDER ( 2 ) EORDER(2) AORER(2), & ELECTO(2),PRESS (2 ) NUJB( 2 ), CNGPS (2 COMO40N/P AR S/NUM BUF EOF INTEGER NUM8BUF(3) LOGICAL EOF -C X* READ THE ADMINISTRATION IDENTIFIER FROM PRESFILE * C CALL QREAD(10,BUFEUF) 'C P* TEST TO SEE IF THE ADMTINISTRATION IS ALREADY IN C THE DATA BASE * CALL FMSK(AORDER, BU F I ERR) IF (IERR.GT. -1) GOTO 30 C: * ~I[F SO, GO TO 30; IF NOT, CREATE A RECORD OCCURRENCE FOR IT AND STORE THE IDENTIFIER IN 'IDENT * C. CA&LL CR(AOM IN, K EY, I ERR) CAtt SFR( IDEENT ADM IN, UF, IERR)Y C, s * ADD THIS RECORD TO THE SET 'AORDER' * CA!ILL AMS AORDER,ADMINI ERR) G6)1 O 301. C Ctd * MAKE THE RECORD THE CURRENT RECORD OCCURRENCE C~ OF THE RECORD TYPE 'ADMIN' *

CALL SRM(AORDERIERR) * READ MONTH THE ADMINISTRATION STARTED AND STORE IN 'MONTH' * CALL QREAD(10,BUF,'EOF) CALL SFR(MONTH,ADMINBUF, IERR) * READ DAY THE ADMINISTRATION STARTED, CONVERT TO NUMBER, AND STORE IN 'DAY' * CALL QREAD( 10,BUF,EOF) CALL CTOI (BUF,,1,ONUM) CALL SFR(DAYADMINNUMIERR) * READ YEAR THE ADMINISTRATION STARTED, CONVERT TO NUMBER, AND STORE IN 'YEAR' * CALL QREAD(10,BUF, EOF) CALL CTOI(BUF1,,ONUM) CALL SFR(YEAR,ADMINNUMIERR) * PRESIDENT NAME IS READ AND IGNORED( THIS INFORMATION IS ALSO GIVEN IN PRESIDENT DATA) * CALL QREAD(IOBUFEOF) * READ NUMBER OF CABINET RECORDS AND CONVERT TO NUMBER * CALL QREAD(10,BUF,EOF) CALL CTOI(BUF 1,O,NUM) * IF NO CABINETS, GO TO 31, OTHERWISE, SPECIFY RELATIONSHIP BETWEEN ADMINISTRATION AND CABINET RECORD * IF (NUM.EO. 0) GOTO 31 CALL SOM(CABINTAORDER, IERR) INC=NUM * PROCESS EACH OCCURRENCE OF CABINET DATA * DO 32 1=1,INC * CREATE CABINET RECORD OCCURRENCE * CALL CR(VPRESKEY, IERR) * READ FIRST NAME OF VICE PRESIDENT AND STORE IN 'FSTNAM' * CALL QREAD(10,BUFEOF) CALL SFR(FSTNAM,VPRESBUFIERR) * READ LAST NAME OF VICE PRESIDENT AND STORE IN ' SURNAM' * CALL QREAD(10O,BUF,EOF) CALL SFR(SURNAMVPRES,BUFIERR) * FORM RELATIONSHIP BETWEEN ADMINISTRATION AND

CABINET RECORD * 23 CALL AMS(CABINT,VPRES,IERR) C * READ NUMBER OF STATES ADMITTED DURING ADMINISTRATION C AND CONVERT TO NUMBER * C 3:1 CALL QREAD(1OBUFtEOF) CALL CTOI(BUF,1,1ONUM) C C * IF NO STATES ADMITTED, STOP; OTHERWISE, SPECIFY C -RELATIONSHIP BETWEEN ADMINISTRATION AND STATE RECORD * C IF (NUM *EQo O) RETURN CALL SOM(NUSTAT AOROERIE RR) INC=NUM C C * PROCESS EACH OCCURRENCE OF STATE DATA * C DO 34 I=1,INC C C * READ STATE NAME(AND STATE IDENTIFIER) ADMITTED DURING C THE ADMINISTRATION. ONLY THE STATE IDENTIFIERtNEED C BE USED TO FORM THE RELATIONSHIP BETWEEN 'ADMIN' C AND 'STATE' * C C CALL QREAD(I10.BUF, EOF) CALL QREAD(10,vBUFv EOF) C * TEST TO SEE IF THE STATE IS ALREADY IN THE DATA BASE * C CALL FMSK(SORDERBUF, ERR) IF (.IERR.GT* -1) GOTO 35 C C * IF SO, GO TO 35; IF NOT, CREATE A RECORD OCCURRENCE ~~C FOR IT AND STORE STATE IDENTIFIER IN 'IDENT' * CALL CR(STATEKEY,IERR) CALL SFR(IDENT,STATEBUF, IERR) C, * ADD STATE RECORD OCCURRENCE TO SET 'SORDER' * CALL AMS(SORDER,STATEIERR) GOTO 34 C C * MAKE THE RECORD THE CURRENT RECORD OCCURRENCE C OF THE RECORD TYPE 'STATE' * 3 5 CALL SRM(SORDERIERR) ":~t * FORM RELATIONSHIP BETWEEN ADMINISTRATION AND C STATE RECORD * 3d4 CALL AMS(NUSTATSTATE, IERR) -E TURN c l* PROCESSING OF DATA RELATED TO ONE ADMINISTRATION IS DONE * C. END

SLbt C. U r IE [ t- CE -61 - -^:.: ' THIS RIOUTLr'INE HANUL S ALL lATA FOLLOWING A t L [;CT IU 34 TA IDENTIFIEF > t CU,'; f! UN ARE.SS F P CR LT T CL Mf:C N/ fAM/PR LS,IDLIT T,STtAM, TIrITALSURNAM, & t!SNTH,,. Y 'IY [,YE[AR I,Fh-r IGHTPARTY,CCLEGE, L ANSTRFY,REL IGNIMCNTFC, CAYEVYEARRLtCAUSEt &, FA THr t E 'CTH E RNUJCCC,OCtCUP, A FARGE,WIFE, L MhNi ITTn, PAY,Y EA RN4, CH1 I LO AD IN, M CNTH lAY,VYL t',yVPRVESSTATE,NAVE, YFAPAC, & CA PAL AR A,A RANK POP, PRANK,VC T ES, & C I TY, E LF (T, W I NE R CPPGN, COtNGRCS S tNAT E, i" I IM iEi Erh-SLPEP,P K ESE tE,P ESCS,PR ESLN, t- r'FFSA.,NlUSTATCITIFS,CAHINT,SM EM1iS tHMEMBS, S '[SIZPCpUL,SCRD'F,CCRPLE- ECtOE'R ACRIER, ~!, [1 3. f I Z. p P.) X,,) L~ g S Ci R R.,, hi L FCTt ti, tPI; S, NUiCB C NGP S I rNTEGER; P.:S (2 ),I 1 ENT(2),FSTNAM (2), IN ITAL(2 ),SURNAM (2) t li T H ) t2) AY(2), YFAR ( 2 Y 2 T H T 2 ) P A R T Y 2 ) C0L E G E (2) & ANST P (?),P E LIGN(2),MO N THU(2),DAYC(2),YEAR 0 ( 2),CAUSE(2):F FATHE'-r(2),(C'THkER(2),NC}OCC2(?),CCUP(2),MARRGE(2),WIFE(2), C MiNThiM( 2 ),rAYM( 2),YFAiRM(2),CHI LDN 2),ADMI 2), MONTHt 2), t DAY(2),YEAR(2 ),VP ES(2 ),STATE(2), NAME(2),YEARAD(2), F CAPTAL( 2), F. EA(2),ARAN K(2),PCP(2) PRANK(2),VOTES(2) & C ITY(2), ELL CT(2),WINNER 2),O PPLiN (2, CONGRS(2), SENATE(2) NJUM'bEE (2) tiSEREP (2),PRES1'E (2 ) PR ESCS (2 ) PRESEN( 2),; PFSAN (2), NUSTAT(2),CITIES (2), CABINT(2) SMNEMBS(2), HMFNMS(2), & STASIZ(2),PORDER(2) SCRDER(2),CCPLER(2),EURDER(2),AORODR(2), & FLFC(T I2),PRESS( 2),NUB(2),C t NGPS(2) CCt'C?.N/PARS/ NUf, BUF tOF INTrFGE NtLM, tUF ( 3 LCCG ICAL F F 4 'LAD TiE E LECTIN IN ILN T I F I ER FRCM: PRESFILE * CALL P.EAt. (lO, I UF,ECF F T- TEST rT SEE IF THE tLECT ICN IS ALREACY IN THE DATA. 3ASE - CALL FMSK ( FCR ER,UF t ER) iF (IE P..GT. -1) iGOTO 20 * IF SCO, GO TO 20; IF NOT, CREATE A R fECORD OCCURRENCE }F-' IT AND STORtF THE IDFP riTIFIFR ^ CALL CfV ( FLFCTKEY, I FR) CALL SFFP ( IntNT, ECT, UF, IFRR) ' AUot. THIS RECf tkD) OCCURRENCE 7CO TH TE SET 'E RDER' * CAL L At'S(L C rI FR, ELECT, IEPk) GL(.i fC- 201.' M'\AKF THe P. (CU iRD TIHF CU I"RENT RECORD OCCURRENCE f' TH,;' C:,K ii C T YPC C L FC ' T

-62 - C A L L i, " ( i<W P F' R I r C: C.'. ) z V-<LA)D TlH YLAi < OF THE EL 'CTILCN, CONVFRT TO NUM3ERt AN' STORE iN 'YFAR' N Y 201 C/ALL.0. FAt{i 10, 'UF,E( F) CALL CT(1 (ttF,,1.,,UM) CALl.. Sf ( E:t,,ELECT,NUM, IF ) TA6 THE WDINNER CF ThL ELECTION AND STClRE IN 'WINNER' CA.I L C iF:. ar{ I1O, U F,FCF ) CALL St- ( P INN KE LECT, BUF I ER ) - PiREAi THE WINNING PA T Y ANLC STORE IN 'PARTY'V CA LL CpF AP 1lO PUF EF) CALl. SF P (PAP TY, ELECT,t UF, IER ) -i RFAC THE NtJil',HRFlR OF WINNING VUTES, CONVERT TC NUMBER, AND STOr(CH IN tVCTFS: CAl.. l t:.!.(O, i AJF(10, ECF) CALL LTOI (B UF, I,IlCNU>M) CALL SF (V() T ES EL CT NU, I F R ): t.AD qJUMB,.-EFP O L'')F l PPIuNFNTS AND CCNVERT TC NUMBER * CALL QL FAI( 10, UFUEF) CALL CItI (BUF, 1,1 iNUM. ) '+ SPECIFY:RELATIC NSHI P TET.EFN ELECTION AND OPPONENT CALL SU1'' (fL CT, FTCP FR, IFRK ) I, (c =NU. > PRf -SCFSS:-ACH 0CCUR.FNC- ltF ( FPPUNEjNT DATA * I] {- 21 I I, INC ^- EA^I: AN CRT CtCJRK ENCE OF AN UPPONENT RECURE AND FOrI RELATICt SHIP HFT'wFFN OPPONENT AND ELECTION RFCfRD}.CALL C^ (ciPPt.NtK-Y, IFI:' ) CAL L L S ( L F C T C, p N, I F ) ir ft-IF THE NAi:- CF CPPCNENT AND STORE IN NAME C LL O(-)rAr( 10, tIF ELF ) CAlt SF - ( NA E, PPCdtiN, iUF, r tI ) x- AL,A, CPPfCNNT 'S PARTY ANC STOREF IN PARTY' * CAL t.L L <F IPt 1f, UF E' ) CA.. L S F' t PA TY, C OPP C N,B UF,I ER ) E RAD Ni L UMRF F Ut OPPNEI: f nT'S VOlF'S, CCNVFRT TO NUlMBER, A'I\ — ST['!E. I-N 'V, TES' *

-63 -CAL L Q A:( 1tO,!i UF t EC ) CALL CTO I BUF, 1, I1Ci NUM) CALL SFR (VO"T ES,OPPGN,NUN, IEFRK ) RE T UK R, PR(1CESSING C F CATA fELLATEI TO ONE ELECTION IS DONE * Ef -.N!

-64 - SUBROUTINE CRCS C C ***** THIS ROUTINE HANDLES ALL DATA FOLLOWING A C CONGRESS DATA IDENTIFIER ***** C C C * COMMON AREAS FOR CRCS * C COMMON/NAMS/PREiS,IDENT,FSTNAM, INITALSURNAM, & MUNTHB,DAYBYEARBHEIGHTPARTYCOLEGE, & ANSTRY,RELIGN,MONTHDDAYDYEARDCAUSE, & FATHERMOTHER,NUOCC,OCCUP,MARRGE,WIFE, & MONTHM,DAYM,YEARM,CHILDN,ADMIN,MONTH, & DAY,YEAR,VPRES,STATE,NAME,YEARAD, & CAPTALAREAARANK,POPPRANK,VOTES, & CITY,ELECT,WINNER,OPPON, CNGRS, SENATE, ~ NUMBER,HSEREP,PRESME,PRESCSPRESEN, PRESAN,NUSTATCITIESCABINT, SMEMBSHMEMBS, & STASIZPORDERSORDERtCORDEREORDERtAORDER, & ELECTO,PRESSNUB,CONGPS INTEGER PRES(2),IDENT (2),FSTNAM(2),IN TAL(2),SURNAM(2), & MONTHB(2),DAYB(2),YEARB(2),HEIGHT(2),PARTY(2),COLEGE(2), 6 ANSTRY(2),RELIGN(2),MONTHD(2) DAYD(2),YEARD(2),CAUSE(2), f, FATHER(2),MOTHER(2),NOOCC(2),OCCUP(2),MARRGE(2),WIFE(2), & MONTHM (2),DAYM(2),YEARM(2),CHILDN(2)ADMIN(2) MONTH( 2), & OAY(2 ),YEAR(2) VPRES(2), STATE(2),NAME(2), YEARAD(2) ~ CAPTAL(2),AREA(2),ARANK(2),POP(2),PRANK(2,VOTES(2), & CI TY( 2) ELECT(2),WINNER( 2) rOPPON (2 ),CONGRS (2) t,SENATE(2), NUMBER(2) tHSEREP(2) PRESME(2) PRESCS(2) tPRESEN(2 t & PRESAN(2),NUSTAT(2)CIT I ES(2),CA INT(2),SMEMBS(2),HMEMBS(2) ~ STASIZ(2), PORDER(2),SORDER(2,CORDER(2) EORDER (2), AORDER(2) E ELECTO(2), PRESS(2),NU( 2),CONGPS( 2 ) COMMON/PARS/NUMBUF, EF INTEGER NUMBUF(3) LOGICAL EOF C C * READ THE CONGRESS IDENTIFIER FROM PRESFILE * C CALL QREAD(10,BUFEOF) C C * TEST TO SEE IF THE ELECTION IS ALREADY IN THE' ~C ~ DATA BASE * C CALL FMSK(CORDERBUF, IERR) IF (IERR.GT. -1) GOTO 401 C C * IF S0, GO TO 401; IF NUT, CREATE A RECORD OCCURRENCE C FOR IT AND STORE THE IDENTIFIER * C CALL CR(CONGRS,KEY,IERR) CALL SFR(IDENTCONGRS,BUF, IERR) C C * ADD THIS RECORD OCCURRENCE TO THE SET 'CORDER * C CALL AMS(CORDERCONGRSIERR) GOTO 40 C C * MAKE THE RECORD THE CURRENT RECORD OCCURRENCE C OF THE RECORD TYPE 'CONGRS' * C

I CALL SRM(CORDER,IERR) * READ THE NUMBER OF SENATE PARTIES AND CONVERT TO NUMBER * CALL QREAD(1OBUF,EOF) CALL CTO I(BUFt,11NUM) * SPECIFY RELATIONSHIP BETWEEN CONGRESS AND SENATE RECORD * CALL SOM(SMEMBSCORDERtIERR) INC=NUM * PROCESS EACH OCCURRENCE OF SENATE DATA * DO 41 I=1,INC * CREATE AN OCCURRENCE OF A SENATE RECORD * CALL CR( SENATE KEY,IERR) * READ THE SENATE PARTY AND STORE IN 'PARTY' * CALL QREAD(10,BUF,EtF) CALL SFR(PARTY SENATE,BUF, IERR) * READ THE NUMBER OF MEMBERS, CONVERT TO NUMBER, AND STORE IN 'NUMBER' * CALL QREAD(1OBUFEOF) CALL CTOI(BUF,1,10NUM) CALL SFR(NUMBERSENATENUMI ERR) * FORM RELATIONSHIP BETWEEN CONGRESS AND SENATE RECORD * L CALL AMS(SMEMBS,SENATE IERR) READ THE NUMBER OF HOUSE PARTIES, CONVERT TO NUMBER * CALL QREAD(1OBUFEOF) CALL CTOI(BUF,L,0, NUM) * SPECIFY RELATIONSHIP BETWEEN CONGRESS AND HOUSE RECORD * CALL SOM(HMEMBS,CORDER, IERR) INC=NUM * CREATE AN OCCURRENCE OF A HOUSE RECORD * DO 42 1=1, INC CALL CR(HSEREPKEY,IERR) * READ THE HOUSE PARTY AND STORE IN 'PARTY * CALL QREAD(10OBUF,EOF) CALL SFR(PARTYHSEREPBUF, IERR) * READ THE NUMBER OF MEMBERS, CONVERT TO NUMBER, AND STORE IN 'NUMBER* * CALL QREAD(1O,BUF,EOF)

CALL CTOI(BUF,1,10,NUM) -66 -CALL SFR(NUMBER,HSEREPNUM, IERR) * FORM RELATIONSHIP BETWEEN CONGRESS AND HOUSE RECORD * CALL AMS(HMEMBSHSEREP,IERR) RETURN * PROCESSING OF DATA RELATED TO ONE CONGRESS IS DONE * c c c C C END I... I. 0...... I...4-.. -.. A- -0-..- ....0..... a-..- -a- -I- -*- a- I #- M-."- -a- 0. .- a- -1... -....- &. I$- -A-.#. I- 0- i. v..-.- -A- -i. A A, -A. A A, S- J6 A. A. A- U.*- JL L. A. -A -4. &.-A. -k

-67 -SUBROUTINE CRSS ***** THIS ROUTINE HANDLES ALL DATA FOLLOWING A STATE DATA IDENTIFIER ***** * COMMON AREAS FOR CRSS * COMMON/NAMS/PRES, DENT,FSTNAM IN IAL,SURNAM, & MiONTHBDAYB,YEARBtHEIGHTPARTY~CGLEGE, & ANSTRYRELIGN1MONTHDDAYDYEARD,CAUSE, & FATHERMOTHER, NOOCCOCCUPMARRGEWIFE, ~ MONTHM, DAYMYEARMCHILDN ADMIN, MONTH, & DAY,YEARVPRESSTATENAME,YEARAD, & CAPTALAREAAREAARANKPOPPRANKVOTES & CITYELECT,WINNEROPPON,CONGRSSENATE, & NUMBERHSEREPPRESME, PRESCS,PRESEN, & PRESANNUSTATCITIESCAB INTSMEMBSHMEMBS, & STASIZPORDERSORDERCORDER,EORDERAORDER, & ELECTO0PRESSNUBCOiNGPS INTEGER PRES(2),IDENT(2),FSTNAM(2),INITAL(2),SURNAM(2), & MONTHB(2) DAYB(2),YEARB(2),HE IGHT(2)PARTY(2) COLEGE(2), & ANSTRY(2),RELIGN(2),MONTHD(2),PDAYD(2),YEARD(2)CAUSE(2), & FATHEER(2) MTHER(2,NOOCC( 2 ) OCCUP(2),MARRGE(2) WIFE(2), ~ MONTHM(2),OAYM(2),YEARM(2),CHILDN(2),ADMIN(2),MONTH(2), D OAY(2),YEAR(2),VPRES(2),STATE( 2)NAME(2) YEARAD(2) & CAPTAL(2),AREA(2),ARANK(2)POP(2),PRANK(2),VOTES(2)~ & CITY(2) ELECT(2)W[INNER(2),OPPON(2).CONGRS(2),SENATE(2), ~ NUMBER(2),HSEREP(2) PRESME(2) PRESCS(2),PRESEN(2) & PRESAN(2),NUSTAT(2),CITIES(2 ),CABINT(2),SMEMBS(2),HMEMBS(2), & STASIZ (2) PORDER(2) SORDER(2 ),CORDER(2) EORDER(2),AORDER(2), & ELECTO(2 )PRESS(2)tNU8( 2),CONGPS(2) COMMON/PARS/NUMBU F EOF INTEGER NUMOUF(3) LOGICAL EOF * READ THE STATE IDENTIFIER FROM PRESFILE * CALL QREAD(10,BUFEOF) * TEST TO SEE IF THE STATE IS ALREADY IN THE DATA BASE * CALL FMSK(SORDERBUF, IERR) IF (IERR *GT. -I) GOTO 50 * IF SO, GO TO 50; IF NOT, CREATE A RECORD OCCURRENCE FOR IT AND! STORE THE IDENTIFIER * CALL CR(STATEtKEYIERR) CALL SFR( IENT,STATEUF, IERR) * ADD THIS RECORD OCCURRENCE TO THE SET *SORDER * CALL AMS(SORDERSTATE,IERR) GOTO 51 * MAKE THE RECORD THE CURRENT RECORD OCCURRENCE OF THE RECORD TYPE 'STATE *

-68 - CALL SRM(SORDERIERR) C, * READ THE NAME OF THE STATE AND STOtRE IN 'NAME' * C 51 CALL QREAD(10,BUFEOF) CALL SFR(NAMESTATEBUF, IERR) C C * READ THE YEAR ADMITTED TO THE UNION, CONVERT TO NUMBER, C AND STORE IN 'YEARAD' ' C CALL OREADO(0BUF, EOF) CALL CTOI(BUF,l, 10NUM) CALL SFR(YEARADSTATENUM IERR) C ~~C * READ THE CAPITAL CITY AND STORE IN 'CAPTAL' * C CALL QREAD(10,BUF,EOF) CALL SFR CAPTAL,STATE,BUF,IERR) C C * READ THE AREA OF THE STATE, CONVERT TO NUMBER, C AND STORE IN 'AREA' * C CALL QREAD(10,BUF,EOF) CALL CTOI(BUF,1,O10,NUM) CALL SFR(AREA STATENUM I ERR) C C * READ THE RANK OF THE STATE (IN TERMS OF AREA SIZE), C CONVERT TO NUMBER, AND STORE IN 'ARANK' * C CALL QREAD(10,BUF,EOF) CALL CTOI (BUF, 1,10NUM) CALL SFR(ARANK STATE,NUM,IERR) C C * READ THE POPULATION OF THE STATE, CONVERT TO NUMBER, C AND STORE I N POP' * C CALL QREAD(1O,BUF,EOF) CALL CTOI BUF,1 10,NUM) CALL SFR (POP,STATE, NUM, IERR) C Ce * READ THE RANK OF THE STATE (IN TERMS OF POPULATION SIZE), ~C ~ CONVERT TO NUMBER, AND STORE IN 'PRANK' * C CALL QREAD(10, UF,EOF) CALL CTOI(BUFI,101ONUM) CALL SFR(PRANKSTATE, NUM, IERR) C C * ADD THIS RECORD OCCURRENCE TO THE SET 'STASIZ' *) CALL AMS(STASIZSTATE,IERR) C * READ THE NUMBER OF ELECTORAL VOTES FOR IHE STATE, C CCONVERT TO NUMBER, AND STORE IN 'VOTES' * C CALL QREAD( 10, UF,EOF ) CALL CTOI(BUF, 1,1ONUM) CALL SFR(VOT'ES STATENUM, IERR) * READ NUMBER OF MAJOR CITIES AND CONVERT TO NUMBER *

-69 -CALL QREAD(IOBUF,EOF) CALL CTOI BUF, 1 lO,NUM) * IF NO MAJOR CITIES. STOP; OTHERWISE SPECIFY RELATIONSHIP BETWEEN STATE AND CITY RECORD * IF (NUM.EQ. O0) RETURN CALL SOM(CITIES,SORDER,IERR) I NC=NUM * PR(CESS EACH OCCURRENCE )F CITY DATA * DO 53 I=1,INC * CREATE AN OCCURRENCE OF A CITY RECORD * CALL CR(CITYKEY,IERR) * READ NAME OF CITY AND STORE IN 'NAME' * CALL QREAD(10,BUF, EOF) CALL SFR(NAME,CI'TYBUF,IERR) * READ POPULATION OF CITY AND STOR IN 'POP' * CALL QREAO 10,BUFEOF) CALL CTOI(BUF, 1, 0,NUM) CALL SFR(POP CITY,NUMtERR) * FORM RELATIONSHIP BETWEEN STATE AND CITY RECORD * CALL AMS(CITIESCITY IERR) RE TURN * PROCESSING OF DATA RELATED TO ONE STATE IS DONE * END

-70 - 7. GENERATING REPORTS FROM THE DATA BASE Once data has been successfully entered into the data base there are several routines (described in ISDOS Working Paper No. 88 and the PSA software documentation package) which can be used to aid in the retrieval process and in formatting the retrieved data. 7.1 Retrieving Data There are several routines available to the user (of which just a few are described here) to aid in the retrieval of data in a random fashion or via some ordered manner. FNM 1 Used to locate member record occurrences FFM J for a given owner record occurrence. SOM 1 Used to retrieve data occurrences based on some defined relationship. SMM J GFM Used to retrieve data from a particular "item" occurrence. GFO J SMOVE Used to retrieve data from a repeating item. 7.2 FFM Find First Member record occurrence This routine is used to find the first member record occurrence for the current owner record in a given set. For example, if a listing of all President names were to be retrieved and printed the call CALL FFM (PORDER, IERR) finds the first member record occurrence of the set PORDER. (Looking back, notice that the DDL designated the owner record for this set to be SYSTEM and member record occurrences to be of the type PRES.) At this point the first member occurrence has been located or an error code has been returned in IERR. Data can now be taken from the record occurrence (if no error was encountered). 7.3 FNM Find Next Member record occurrence This routine can be used to find the first member record occurrence (like FFM) if there is no current member record occurrence, or can be used to find any subsequent member record occurrences in the order specified in the DDL. For example, CALL FNM (PORDER, IERR) will find the next PRES record occurrence, based on the value of

-71 - the IDENT item. (Remember that the set PORDER is ordered on the IDENT items within the PRES record occurrences.) A return code value of -1 will be given to IERR should an end-of-file condition be encountered, 7.4 SOM Set the current Owner of a set, based on the current Member of a set. This routine is used (as in SMM)-to locate and retrieve data based on specific relationships between the record types in the data base. For example, for a PRES record occurrence (found by FFM or FNM) it may be desirable to find those ELECT record occurrences related to it via the PRESEN relationship, CALL SOM (PRESEN, PORDER, IERR) specifies that the current member record of set PORDER (which would be a PRES record type) is to be made the current owner record of the set PRESEN (whose members are ELECT record types), Once this has been set, the first member record occurrence of the set PRESEN is available for any retrieval procedures. The next ELECT member record occurrence for the particular PRES record occurrence can be located by the FNM routine: CALL FNM (PRESEN, IERR) 7.5 SMM Set the current Member of a set, based on the current Member of a set. This routine can be used to retrieve data for a record occurrence which is a member of two different types of sets. For example, all PRES record occurrences are members of the set PORDER (ordering of all Presidents by identifier) as well as the set PRESS (relationship between Presidents and State born in). So, given that a particular PRES record occurrence is available via FFM or FFM, the STATE record occurrence the President is related to can be found by the call CALL SMM (PRESS, PORDER, IERR) where the current member of the set PORDER also now becomes the current member of the set PRESS. State data can now be extracted. 7.6 GFM Get Field from Member record occurrence Once the appropriate record occurrence has been found by the above routines, GFM is the routine used to actually retrieve the data from the record. For example, to retrieve the first name of a President the call CALL GFM (FSTNAM, PORDER, BUF, IERR) would be used, This retrieves the data from the "item" FSTNAM in the current member record occurrence of the set PORDER (which means this is a PRES record occurrence) and places the data in BUF. BUF must be of the same data type (i.e. integer, character, decimal, etc,) as the "item" and large enough to hold its value,

-72 - 7.7 GFO Get Field from Owner record occurrence This routine is basically the same as GFM, but retrieves data from an owner record occurrence rather than a member, Looking back at the SMM routine, a STATE record occurrence was found as a result of CALL SMM (PRESS, PORDER, IERR) which also made the STATE record occurrence the current owner of the set PRESS. GFO allows data from the STATE record to be retrieved. CALL GFO (NAME, PRESS, BUF, IERR) retrieves the data in the "item" NAME from the current owner record occurrence of the set PRESS, and puts the data into BUF. 7.8 Report Routines As the data is being retrieved it has to be formatted in some manner to be presented as a report. The following routines aid in this process. HEDING Used to print a heading for the report BUFBLD Used to store data in the output buffer to be NINBUF printed PBUF Used to print out contents of the output buffer 7.9 HEDING (Heading) This subroutine allows the programmer to specify a title for a report. If the report is more than one page long, the title will be presented at the top of each new page. For example, by specifying CALL HEDING(31,31H** PRESIDENT/ELECTION REPORT **,0,3) the title "** PRESIDENT/ELECTION REPORT **" will be printed at the top of each page of the report. The first parameter value, 31, designates that the title is 31 characters long. The zero (0) parameter value above specifies that the title should be centered. (Any positive integers in place of this parameter value specifies the column where the title begins.) Finally, the last parameter value, 3, designates the number of spaces to skip before printing out the contents of the report. 7.10 BUFBLD (Buffer Build) This routine allows the storage of character data into an output buffer which when printed, becomes part of the report. For example, CALL BUFBLD(1,1, 14,14HPRESIDENT NAME) stores the character string "PRESIDENT NAME" into the first

-73 - position (1) in the output buffer (as designated by the first paramemter), The third parameter (here 14) specifies the number of characters in the string, Taking another example, CALL BUFBLD(28,1,3,BUF) this specifies that the contents of the variable ( a character array), BUF, should be stored in the output buffer, starting at the 28th position in the buffer. The second parameter specifies an index into BUF where the character string starts. (In this case the character data of interest starts in the first (1) position.) 3 specifies the length of the character string to be stored. Note that if BUF contained a twelve character string, the last 9 characters would be ignored while length is specified to be 3. 7.11 NINBUF (Numeric Integer into Buffer) This routine is used much in the same way as BUFBLD but, instead places numeric data (rather than character) into the output buffer. For example, CALL NINBUF(NUM,21,4) converts the numeric data in the variable NUM into character format and stores this starting at position 21 in the output buffer. The last parameter specifies the length of the number being stored. The number is assumed to be an integer. 7.12 PBUF (Print Buffer) This routine prints out the contents of the output buffer set up by the BUFBLD and NINBUF routines. By specifying PBUF(O,1,.TRUE.) The output buffer is printed, a line is skipped after the line is printed (1), and the buffer is blanked out (.TRUE.). The zero (0) parameter designates that no lines should be skipped before printing the buffer. (Of course, this can have any positive integer value.) If the buffer is not blanked out (.FALSE.) data stored in the buffer will be overlayed over the previous data. 7.13 Code to Generate Reports from the Presidential Data Base Now that the basic routines needed to generate reports from a data base have been described, examples of how these routines can be used to actually generate reports will be given in this section. The common areas and block data used in the population of the data base can be used in these report programs to reduce effort in defining variables and constants.

-74 - Assuming the source code for the report program.to be in TESTPROG, the object code can be put into TEST when $RUN *FTN PAR=SOURCE=TESTPROG LOAD=TEST is given. Assuming BLOCKFILE contains the object version of the block data subprogram for the data base the report program can be executed by the command: $RUN TEST+BLOCKFILE+SELW:DBLIB 2=DBF 3=DBTF where DBF is the data base file and DBTF is the data base table file. The remainder of this section presents descriptions and listings of programs that generate reports from the Presidential data base. Appendix B presents the reports generated from these programs.

-75 - TEST PROGRAM #1 This program obtains an alphabetical listing of all presidents in the data base. It prints out first and last name and middle initial if there is one, For each president, it also finds all elections related to that president that won him the presidency and the date of the election, and at least one of the opponents he beat. In some cases a particular opponent is not specified but rather that a number of opponents were defeated. For those presidents with no election information, nothing is given.

C **** PRESIDENT/ELECTION REPORT PROGRAM **** C C * THIS PROGRAM RETRIEVES AND PRINTS ELECTION INFORMATION C RELATIVE TO EACH PRESIDENT * C C * COMMON AREAS FOR THE PROGRAM * C COMMON/NAMS/PRESIDENT,FSTNAM,INITALSURNAM, & MONTHB,DAYE, YEARB,HEIGHT,PARTY COLEGE, & ANSTRY,RELIGN,MCNTHDDAYO,YEARO,CAUSE, & FATHER,MOTHERNOOCC,OCCUP,MARRGE,WIFE, & MONTHM,DAYMYEARM,CHILDNADMINMONTH, & DAYYEARVPRES,STATENAMEYEARAD, & CAPTAL,AREA,ARANKPOPPRANKVOTESt C ITY,ELECT tWINNEROPPGN,CONGRS,SENAT E & NUMBERtHSEREPPRESMEPRESCSPRESEN, & PRESAN,NUSTAT,CI'TIES CABINTSMEMBS HMEMBS, ~ STASIZ,PORDER tSORDER,CORDEREORDERAORDER, ~ ELECTO,PRESS,NUB,CONGPS INTEGER PRES(2),IDENT(2),FSTNAM(2),INITAL(2),SURNAM(2), & MONTHB(2),DAYB(2),YEARB(2),HEIGHT(2),PARTY(2),COLEGE(2), & ANSTRY(2),RELIGN(2),MONTHD(2),OAYD(2),YEARD(2),CAUSE(2), & FATHER(2),MOTHER(2),NOOCC(2),CCCUP(2),MARRGE(2),WIFE(2), & MONTHM(2),AYM(2 )tYEARM( 2),CHILDN(2) ADMIN(2),MONTH (2, ~ DAY(2),YEAR(2),VPRES(2),STATE(2),NAME(2),YEARAD(2), & CAPTAL(2),AREA(2),ARANK(2),POP(2),PRANK(2),VOTES(2), & CITY(2),ELECT(2),WINNER(2),OPPON(2),CONGRS(2),SENATE(2) & NUMBER(2),HSEREP(2),PRESME(2),PRESCS(2),PRESEN(2), & PRESAN(2), NUSTAT (2ES(,CITIES(2CABINT(2),SMEMBS(2),HMEMBS(21, & STASIZ(2),PORDER(2),SORDER(2),CORDER(2) EORDER(2),AORDER(2), F ELECTO(2), PRESS(2),NUB(2,CONGPS(2) COMMON/PARS/NUM,BUFEOF INTEGER NUMBUF(3) LOGICAL EOF C C $ REPORT INITIALIZATION PROCEDURES * CALL REPINT CALL NEWREP(.FALSE.) eC ~ * SPECIFY THE TITLE TO BE PRINTED AT TOP OF EACH PAGE OF C THE REPORT * CALL HEDING(31,31H** PRESIDENT/ELECTION REPORT **,0,3) C, C * OPEN THE DATA EASE FILE AND THE DATA BASE TABLE FILE C ( LOGICAL I/O UNITS 2 AND 3 RESPECTIVELY ) * C CALL OPEN(2,3, 10 IERR) C ~C *~ FIND PRESIDENT RECORD CCCURRENCE. IF NONE CAN BE FOUND, C STOP * CALL FNM(PORDERIERR) IF (IERR.EQ. -1) GOTO 100 C CQ * PLACE COMMENT INTO OUTPUT BUFFER * CALL BUFBLD( i,l14,l4HPRESIDENT NAME)

-II * RETREIVE PRESIDENT'S FIRST NAME, MIDDLE INITIAL AND SURNAME AND PLACE THEM INTO THE OUTPUT BUFFER * CALL CALL CALL CALL CALL CALL GFM(FSTNAM, PORCERBUF, IERR ) BUFBLD( 16, 110,BUF ) GFM(INITALPCRDERUF, IERR) BUFBLD(28,,3,BUF) GFM(SURNAMPORCERBUF, IERR BUFBLD(31,1 0,BUF) * PRINT OUT BUFFER WITH PRESIDENT'S NAME * CALL PBUF(2,0,.TRUE.) * TEST TO SEE IF THE PRESIDENT WON ANY ELECTIONS FOR THE PRESIDENCY AND IF NOT, GO PROCESS THE NEXT PRESIDENT * CALL SOM(PRESEN,PGRDER IERR) '5 IF (IERR.EQ. -1) GOTO 1 * PLACE COMMENT INTO OUTPUT BUFFER * CALL BUFBLO(4,1,29,29HWON ELECTIC * RETRIEVE YEAR PRESIDENT BUFFER * AGAINST) WON ELECTION AND PLACE IN OUTPUT CALL GFM(YEAR,PRESENNUNIERR) CALL NINBUF(NUM,21,4) * FIND OPPONENT PRESIDENT INTO OUTPUT BUFFER * BEAT IN THIS ELECTION AND PLACE CALL CALL CALL SOM(ELECTO,PRESEN, IERR) GFM(NAME, ELECTC,BUF, I ERR BUFBLD( 34,1, 10,BUF) * PRINT CUT OUTPUT BUFFER WITH ELECTION INFORMATION * CALL PBUF(OO,O.TRUE.) * CONTINUE TO PROCESS ANY RELATED TO PRESIDENT * REMAINING ELECTION RECORDS CALL FNM(PRESEN, IERR) GOTO 25 * CLOSE THE DATA BASE * 100 CALL END CLOS (OARRAY, IERR)

-78 - TEST PROGRAM #2 This program obtains an alphabetical listing of all states in the data base. For each state it prints out state name and year admitted to the union. It also finds any city records related to that state and prints out city name as well as city population.

C **** STATE/CITY REPORT PROGRAM **** C C * THIS PROGRAM RETRIEVES CITY INFORMATION AND HISTORICAL C INFORMATION RELATIVE TO EACH STATE * C C C * COMMON AREAS FOR THE PROGRAM * C COMMUN/NAMS/PRES IDENTFSTNAM, INTALSURNAM, & MONTHB,DAYBYEARBtHEIGHTPARTY,COLEGE, & ANSTRYREL IGN,MONTHD,DAYDYEARD CAUSE, & FATHERMOTHERNOOCCOCCUPMARRGE tWIFE & MONTHM,DAYMYEARMCHILDNADMINMONTH, & DAY YEAR VPRES STATE NAME YEARAO & CAPTALAREAARANKPOP,PRANKVOTES, & CITYELECT,WINNER,OPPONCONGRS SENAT E & NUMBER HSEREP PRESMEPRESCS, PRESEN & PRESANNUSTATrCITIESCABINTSMEMBSHMEMBSt & STASIZPORDERSORDERCORDER, EORDERAORDER & ELECTOPRESSNUBCONGPS INTEGER PRES(2),IDENT(2tFSTNAM(2),INITAL(2),SURNAM(2), & MONTHB(2),DAYB(2) tYEARB(2),HEIGHT(2)PARTY(2) COLEGE( 2) & ANSTRY (2),RELIGN(2,tMONTHD(2),DAYD(2),YEARD( 2),CAUSE(2). & FATHER(2),MOTHER(2),NOOCC(2),OCCUP(2),MARRGE(2),WIFE(2), & MONTHM(2),DAYM(2),YEARM(2)CHILDN(2),ADMIN(2) MONTH(2), & DAY(2 ),YEAR(2 ),VPRES(2) STATE(2),NAME(2) YEARAD(2), 6 CAPTAL( 2,AREA(2),ARANK(2),POP(2 PRANK(2, tVOTES(2 ), 6 CITY(2),ELECT(2).WINNER(2),OPPON(2),CONGRS(2),SENATE(21 & NUMBER(2),HSEREP(2t)PRESMEI2),PRESCS(2),PRESEN(2), & PRESAN(2) NUSTAT(2),CITIES(2),CABINT(2),SMEMBS(2),HMEMBS(2), & STASIZ(2),PORDER(2),SORDER(2)~CORDER(2),EORDER(2),AORDER(2), & ELECTO(2),PRESS(2),NUB(2),CONGPS(2) COMMON/PARS/NUM, BUF, EOF INTEGER NUMBUF(3) LOGICAL EOF C * REPORT INITIALIZATION PROCEDURES * C CALL REPINT CALL NEWREP(.FALSE.) C C * SPECIFY THE TITLE 'TO BE PRINTED AT THE TOP OF EACH PAGE C OF THE REPORT * C CALL HEDING(27,27H** STATE AND CITY REPORT **,0,3) C * OPEN THE DATA BASE FILE AND DATA BASE TABLE FILE C ( LOGICAL I/O UNITS 2 AND 3 RESPECTIVELY * CALL OPEN(2,.3100LIERR) C C * FIND STATE RECORD OCCURRENCE, IF NONE CAN BE FOUNDSTOP * C 3 CALL FNM (SOROERt IERR) IF (IERR.EQ. -1) GOTO 2 C C * PLACE COMMENT INTO OUTPUT BUFFER * CALL BUFBLD(I1,l,1,IIHS'TATE NAME-)

-80 -* RETRIEVE STATE NAME, PLACE IN BUFFER, AND PRINT OUT * CALL GFM(NAME,SORDER,BUF, IERR) CALL BUFBLD(13,, 1 O BUF) CALL PBUF(2,0,.TRUE.) * PLACE COMMENT INTO OUTPUT BUFFER * CALL BUFBLD(4,1,20,20HADMITTED IN THE YEAR) * RETRIEVE YEAR STATE WAS ADMITTED TO UNION, PLACE IN BUFFER, AND PRINT OUT * CALL GFM(YEARADSURDERNUM,IERR) CALL NINBUF(NUM,26,4) CALL PBUF({Ot,.TRUE. * TEST TO SEE IF THERE ARE ANY CITY RECORDS RELATED TO THIS STATE. IF NOT, GO PROCESS NEXT STATE RECORD * CALL SOM(CITIES,SORDER, IERR) IF (IERR.EQ. -1) GOTO 3 * PLACE COMMENT INTO OUTPUT BUFFER AND PRINT OUT * CALL BUFBLD(4,1 32,32HMAJOR CITIES ARE POPULATION) CALL PBUF(OO, TRUE.) * RETRIEVE CITY NAME AND CITY POPULATION AND PUT INTO OUTPUT BUFFER * CALL GFM(NAME,CITIES~BUF,IERR) CALL BUFBLD(4,tl10,BUF) CALL GFM(POP,CITIES,NUM, ERR) CALL NINBUF(NUM,23,10) * PRINT OUT CITY NAME AND CITY POPULATION * CALL PBUF(IOO, TRUE.) * FIND NEXT CITY RECORD RELATED TO STATE. IF NONE, PROCESS NEXT STATE RECORD * CALL FNM(CITIESIERR) IF (IERR.EQ. -L) GOTO 3 GUTO 1 * CLOSE THE DATA BASE * CALL CLOS( OARRAY IERR) END

-81 - TEST PROGRAM #3 This program gets an alphabetical listing of presidents. For each president it also finds out in what year and to whom the president was married by retrieving all occurrences of the marriage records associated to the president. It also finds all administration records associated to that president and for each administration record, the vice president related to that administration, If that isn't enough, the state the president was born in is also found and the state name is printed out.

**** PRESIDENTIAL INFORMATION REPURT PROGRAM **** C * THIS PROGRAM RETRIEVES INFORMATION ABOUT EACH PRESIDENT C SUCH AS MARRIAGE DATE, WIFE'S NAME, YEARS OF ADMINISTRATION. C VICE PRESIDENTS AND STATE OF BIRTH * C C * COMMON AREAS FOR THE PROGRAM * C I COMMiJN/NAMS/PRES,IDENTFSTNAMINITALSURNAMt & MONTHB, DAYB, YEARB, HEIGHTPAR TYtCULEGE & ANSTRY, RELIGNMONTHDDAYDYEARDCAUSE, & FATHER,MO THERNOOCCOCCUPMARRGEWIFE & MONTHM DAYM YEARMCHILDN,ADMIN,MONTHt & DAYYEAR,VPRES STATENAMEYEARAD, & CAPTAL AREA ARANKPOP, PRANKVOTE S & CITY, ELECTW INNER,OPPONt CONGRSSENATE, & NUMBERHSEREPPRESMEPRESCS,PRESEN, & PRESAN NUSTATtC ITIEStCABINT, SMMEMBS,HMEMBS, & STASIZ,PORDERtSORDERCORDER, ERDERtAORDER, & ELECTOPRESSNUBCONGPS INTEGER PRES(2) IDENT(2),FSTNAM(2,INITAL(2) tSURNAM(2), & MONTHBI(2),DAYB(2),YEARB(2),HEIGHT(2),PARTY(2),COLEGE(2) S ANSTRY(2),RELIGN(2),MONTHD(2),DAYD(2~,YEARD(2,tCAUSE(2), 6 FATHER(2),MOTHER(2),NOOCC(2)tOCCUP(2),MARRGE(2),WIFE(2), ~ MONTHM(2),DAYM(2),YEARM(2),CHILDN(2),ADMIN(2)MUONTH 12) S DAY(2),YEAR(2) VPRES(2),STATE(2) NAME(2) YEARAD(2) t & CAPTAL 2 ) AREA(2 ) ARANK (2) t POP (2 ) PRANK (2) ~ VOTES( 2), I CITY(2) ELECT2), WINNER(2),CPPON(2),CONGRS(2),SENATE(2), & NUMBER(2),HSEREP(2),PRESME ()PRESCS(2),PRE SSEEN(2), & PRESAN(2) tNUSTAT(2),CITIES(2),CABINT(2),SMEMBS(2,HMEMS(2), & STASIZ(2),PORDER(2),SORDER(2),CORDER(2),EORDER(2),AORDER(2), & ELECTO(2),PRESS(2),NUB(2),CONGPS(2) COMMON/PARS/NUM,BUFEOF INTEGER NUMBUF(3) LOGICAL EOF C C sci* REPORT INITIALIZATION PROCEDURES * C CALL REPINT CALL NEWREPI.FALSE.) C C * SPECIFY TITLE TO BE PRINTED AT THE TOP OF EACH PAGE OF C THE REPORT * C CALL HEDING(36,36H**PRESIDENTIAL INFORMATION REPORT **,O,3) C C * OPEN THE DATA BASE FILE AND THE DATA BASE TABLE FILE C ( LOGICAL I/O UNITS 2 AND 3 RESPECTIVELY ) * CALL OPEN(23,100,IERR) C C * FIND A PRESIDENT RECORD OCCURRENCE. IF NONE FOUND, STOP * C CALL FNM(PORDERIERR) IF (IERR.EQ. -1) GOTO 100 C C * PLACE COMMENT INTO OUTPUT BUFFER * C

IF (IERR.EQ4 -1) GOTO 30 * RETRIEVE VICE PRESIDENT'S LAST NAME AND STORE IN BUFFER * CALL GFM(SURNAM,CABINT,BUF, IERR) CALL BUFBLD(31,llIOBUF) * PRINT OUT BUFFER WITH ADMINISTRATION DATA * 0 CALL PBUF(OO, TRUE ) * TEST TO SEE IF THE PRESIDENT HAS ANY OTHER ADMINISTRATION RECORDS RELATED TO HIM. IF SO, PROCESS EACH RECORD AS ABOVE * CALL FNM(PRESANIERR) IF (IERR *GT. -I) GOTO 3 * FIND STATE PRESIDENT WAS BORN IN, RETRIEVE NAME OF STATE AND STORE IN BUFFER WITH COMMENT * CALL SMM(PRESSPORDERIERR) CALL GFO(NAMEPRESS BUF, IERR) CALL BUFBL D(l, 8,8H80RN IN:) CALL BUFBLD(10,,10vBUF) * PRINT OUT BUFFER WITH STATE INFORMATION * CALL PBUF(OtO,.TRUE ) * PROCESS NEXT PRESIDENT RECORD * GO TO 1 * CLOSE THE DATA BASE * LO0 CALL CLOS(OtARRAYIERR) END

CALL BUFBLD(l,110, lOHPRESIDENT-) C C * RETRIEVE PRESIDENT'S LAST NAME, PUT IN OUTPUT BUFFER, C AND PRINT OUT BUFFER * C CALL GFM(SURNAMPORDERBUFIERR) CALL BUFBLDO12,,10tBUF) CALL PBUF(2,Ot TRUE.) C C * FIND A MARRIAGE RECORD RELATED TO THE PRESIDENT * C CALL SOM(PRESMEPORDERIERR) C C * IF YEAR OF MARRIAGE EQUALS ZERO, A MESSAGE SHOULD BE C PRINTED THAT THE PRESIDENT WAS NOT MARRIED * C 2 CALL GFM(YEARM,PRESMENUMIERR) IF (NUM.EQo 0) GOTO 5 C C * PUT COMMENT, YEAR OF MARRIAGE, AND WIFE'S NAME INTO C OUTPUT BUFFER AND PRINT OUT * C CALL BUFBLDO(1,122,Z2HWAS MARRIED IN TO) CALL NINBUF(NUM,16,4) CALL GFM(WIFEPRESMEBUF IERR) CALL BUFBLD(24,llOBUF) CALL PBUF(O,0,.TRUE.) C C * TEST TO SEE IF THERE ARE ANY MORE MARRIAGE RECORDS RELATED C TO THE PRESIDENT, IF SO, PROCESS EACH RECORD AS ABOVE * C CALL FNM(PRESMEtIERR) IF (IERR.GT. -1) GOTO 2 GOTO 25 C C * PRINT MESSAGE THAT PRESIDENT WAS NOT MARRIED * C 5 CALL BUFBLD(It,115,15HWAS NOT MARRIED) CALL PBUF(OO,.TRUE.) C C * PUT COMMENTS INTO OUTPUT BUFFER AND PRINT OUT * C 25 CALL BUFBLD(llt25,25HHEADED ADMINISTRATIONS CALL BUFBLD(28, 1 9 4,t14HVICE PRESIDENT) CALL PBUF(IOOtTRUE.) C C * FIND AN ADMINISTRATION RECORD RELATED TO THE -PRESIDENT * C CALL SOM(PRESAN,PORDERIERR) C C * RETRIEVE YEAR OF ADMINISTRATION AND PUT IN BUFFER * C 3 CALL GFM(YEARPRESANNUM IERR) CEST T SEE IF E P HA A V RESID DUR C * TEST TO SEE IF THE PRESIDENT HAD A VICE PRESIDENT DURING C THE ADMINISTRATION. IF NOT, GO TO 30 * C CALL BUFBLD( 15,1,2,2HIN) CALL NINBUF(NUMl9t4) CALL SOM(CABINT,PRESAN,IERR)

-85 - APPENDIX A Presidential File (PRESFILE) Listing

PRES w-ASHINGT WASHINGTONGEORGE:6FT. 21N. FED:ERALIST ENGLISH EPISCOPAL 14 I 799PNEUiJMONIA AUGUSTINE MARY 0- 2E1789 E1792 C3 C4 PRFS ADAMSJ ADAMS MASS. MASS 5FT. 7 N. FEDERAL ISTHAR VARD JULY 4 18260EBILITY JOHN 1764 5 1E1'796 F ERUAR Y 2A1 JCHN ENGLISH SUSANNA 1A3 2LAWYER JANUARY 3SURVEY 1MARTHA A2 UNITAR 22 17;4 OR FARMER JANUARY OCTOBER IAN 1ABIGAIL 2C5 1743VIRGINIA JULY 32VIRG IN IA SOLDIER VIRGIN1aDECE MBE 6 1?5T C2 4C1 2LAWYER OCTOBER C6 30 1735 TEACHER 25 PRES JEFFE "EM-P D I ARR E180C PRES 5FT. PEB.IL E1808 PRES 6FT. C18 OMASS 'RSO JEFFERSON THOMAS.FEP WM.-MARY WELSH 'fHEA PETER JANE E1804 MAD I SON MADISON 4 IN. UEM-REP PRINCETON.I'TY JAMES ELEANOR E1812 MONROE MONROE OIN. DEM-REP WM.-MARY 1831DEBILITY SPENCE 2E1816 E1820 PRES ADAMSJQ 5FT. 7IN. OEM-REP 23 1848PARALYSIS 4 1E1824 APRIL 13 WRITER VIRGINIA 6FT. 2IN. 4 1826 T2 - 6 2 2A4 JAMES ENGLISH IMARTHA A5 EP I SCOPAL IDOLLEY 1 2A6 A7 JAMES SCOTCH EPI SCOP ELIZABETH 2A8 ADAMS JOHN HARVARD ENGLISH JOHN ABIGAIL 1AI1 171 4C7 MARCH ILAWYER SEPTEMBER 4C11 APRIL 2LAWYER 1ELIZABETH FEBRUARY A9 C8 C9 CO1 16 1751-VIRGINIA VIRGINIA JUNE 28 1836 15 1794 0 2 C12 C13 28 1758VIRGINIA SOLDIER JULY C14 VIRGINIA AL F 4 3 16 1786 Q. JULY UNITARIAN ILOUISA 2C19 15 1767S.C. SOLDIER SADDLER AUGUST 4C21 4C15 2LAWYER JULY C20 C16 C17 11 1767MASS. SECRETARY FEBRUARY 26 1797 PRES JACKSON JACKSU')N ANDR EW MARCH SCOT-IR.I SHPRESBYT. TBIDROPSY ANDREW ELIZABETH E1828 E1832 2A11 PRES VANBUREN VAN BUREN MARTIN 5FT. 6IN. DEMOCRATIC DUTCH ASTHMA ABRAHAM MARIA 3LAWYER 1RACHEL A12 SC JUNE 15 C22 5 JULY 6FT. 1IN.. DEMOCRATIC 8 1845 1791 0 2 DECEMBER DUTCH REF..1HANNAH FEBRUARY 2C25 C26 1773VIRGINIA VIRGINIA C23 1782NEW YORK II C24 NEWYORK i 1862 ILAWYEER 24 1836 H. 1A13 21 180 PRES HARRISOW 5FT. 8IN. WHIG )7 FEBRUARY 4 9 HARRISON WILLIAM HAMP.-SYD.ENGLI SH EL IZABETH 1A14 I 1 EPISCOPAL ISOLDIER APRIL 4 18 ANNA NOVEMBER 25 1795 10 C27- PRES: TYLER TY-L ERE - J-OHN VIRGINIA 6FT. OIN. WHIG WM.-MARY ENGLISH EPISCOPA 1862FEVER JOHN MARY 2LETITIA JULIA JUNE 26 1844 7 C28 PRES POLK POLK JAMES K. NORTHC 5FT. 8TN. D E MOCRATICU.NC. CAR.SCOT-IRISHPRESBYT. 15 1849DIARRHEA SAMUEL JANE 0 1E1844 1A16 41PNEUMONIA BENJAMIN 1E1840 MARCH L MARCH 0 ILAWYER 1A15 29 29 JANUARY 1813 2C27 1795N.C. 18 7 1824 1790VIRGI NI A NOVEMBER ISARAH 2C29 84VIRGINIA 2 2LAWYER CLERK JUNE JANUARY 1 1 C30 PRES TAYLOR VIRGINIA 5FfT. 8IN W-HIG TAY LOR ZACHARY ENGLISH NOVEMBER 24 17 FP T,rnp ai,' r A tn A ar- r

1A17 1C31 7 1800NEW YORK NE~ LAWYER WOOLCARDERMARCH FEBRUARY 5 1826 L PRES FILLMORE FILLMORE MILLARD dYORK 5FT. 9IN. WHIG ENGLISH UNITARI 8 1874DEBILITY NATHANIEL PHOEBE 2CAROLINE FEBRUARY 10 1858 I C32 PRES PIERCE PIERCE FRANKL 1. NEWHAMP 5FT. 10IN.DEMOCRATICBOWDOIN ENGLIS8 1869STOM.INFL.BENJAMIN ANNA 3 1E1852 1A19 JANUARY 1A18 NOVEMB NOVEMB C34 PA ABRAHA NGL IS NANCY ANDREW FNGLIS MARY JULY ER E R 1LAWYER 23 10 2C3] I 1804N.f OCTOBER [AN 2ABIGAIL 0 IN EPISCOPAL 1JANE 2C33.79 1PA. 2 0 1. 0 ) 1834 PRES 6FT. OIN. 1868GOUT 1E1856 M H 2A21 H 2C39 18220HIC BUCHANAN BUCHANAN JAMES DEMOCRAT ICDICKINSON SCOT-IRISHPRESBYT. JAMES ELIZABETH 1 lA20 2C35 FEBRUA 1MARY A22 DECEMB 1EL IZA C40 OHIO 3 rRY IER 12 2LAWYER NOVEMBER 1809KENTUCKY FARM WORK.APRIL 4 18' APRIL C36 KENTUCKY C39 NORTHC 42 31 31 ILAWYER - 23 JUNE 0 0 1 PRES LINCOLN LINCOLN 6FT. 41N. REPUBLICAN > 1865ASSASSIN. THOMAS 2 2E1,860 E1864 PRES JOHNSONA JOHNSON 5FT. lOIN.REPUBLICAN 1875PARALYSIS JACOB 3C37 C38 29 1808N*C. 2TAILOR PUB. OFF. JULY 2 1848 C42 C43 18220HIO JANUARY 1852 4 MAY 5 1827 5 PRES GRANT GRANT ULYSSES S. '5FT. 8IN. REPUBLICANU.S.MIL.ACENGL-SCOT METHODIST 1885CANCER JESSE HANNAH 1JULIA 2E1868 E1872 2A24 A25 PRES HAYES HAYES RUTHERFORDB. 5FT.8IN. REPUBLICANKENYON METHODIST 1893HEART DIS.RUTHERFORDSOPHIA ILUCY 1E1876 1A26 2C45 17 8 0 1A23 C44 OHIO r JAMES ENGLI S ELIZA I APRIL AUGUST OCTOBER DECEMBER C46 ISOLDIER 4C41 1LAWYE 'R 27 22 4 30 PRES GARFIELD GARFIELD REPUBLICANWILL IAMS ASSASSIN. ABRAM E188.0 OCTOBER H Ao DIS.CHRIS NOVEMBER T ILUCRETIA 1C47 k 19 2LAWYER NOVEMBER 0 18310HIO ( CANAL DRIVSEPTEMBER 11 1858 OHIO 6FT.OIN. 19 1881 7 1 1A27 5 ELLEN C48 2LAWYER OCTOBER PRES 1830VERMONT VERMON TEACHER NOVEMBER 25 1859 CLEVELAN CLEVELAND GROVER T PRES ARTHUR ARTHUR 6FT.2IN. REPUBLICANUNION 18 1886APOPLEXY WILLIAM 3 0 1A28 MARCH CHESTER A. SCOT-IRISHEP ISCOPAL MALVINA 1 2C47 18 1837NEW JERSEY TEACHER JUNE NEWJERSEY 5FT.111N. DEMOCRATIC ENGL-I RISHPRESBYT. C53 OHIO 24 5 C54 OHIO 13 2MARY 2C51 18430HIO 1908DEBIL TY 2E 884 PRES 5FT. 6IN. 1901 PNEUMON IA APRIL C52 OHIO RICHARD ANNA E1892 HARRISOB HARRISON REPUBLICANMIAMI 0. JOHN ELIZABETH 1FRANCES A31 2A29 BENJAMIN ENGLISH I AUGUST 2CLERK JUNE 4 6 1896 PRES MCKINLEY MCKINLEY 5FT.IOIN. REPUBLICANALLEGHANY 1901ASSASSIN. WILLIAM 2c 1896 E1.900 PRESBYT. 2CAROLINE OCTOBER 1 IE1888 WILLIAM SCOT-IRISHMETHODIST NANCY 4C49 ILAWYER JANUARY 1IDA A33 2 C50 20 MARCH20 1A30 1886 1833 1853 29 2LAWYER JANUARY TEACHER SEPTEMBER 25 1871 14 2 2A32 3

C5-5 C56, C57 -: 1 858NEW YORK N EWYORK PUB F F. JNMiU AR Y' 2T 1880 2A34 A35 TAFT WILLIAM H. PRES R OOSEVET ROOSEVELT THEODORE 5FT. 1OI N.REPUBLICANHARVARD DUTCH 6 191SRHEUMATISMTHEODORE MARTHA IEDI TH DECEMBER 2 18 4C57 C58 C59 OCTOBER 2I DUTCH REF SEPTEMBER LAWYER 15 MARCH 18 5 70?HI 0 86 C60 OHIO 8:.0 2L AMW'E R 2ALICE OCTOrER 5 IE 1904 PRES TAFT 6FT. OIN. REPUBLICAI YALE LOUISE A 36 2 LAWYER JUNE E1912 PRES 6FT. OIN. EMBOLI SM E1920 CONGREG. GRACE SCOT-IR ISHUN ITAR IAN 1930DEBI I TY 8 1HELEN JUNE 19 1886 3 IE1908 2C61 C62 PRES WILSON WILSON WOODROW.1I856VIRGINIA VIRGINIA 6FT. OIN. DEMOCRATICPRINCETON ENGLISH PRESBYT. TEACHER FEBRUARY 3 1924HEART DIS.JOSEPH JESSIE 24 1885 3EDITH DECEMBER 18 19-15 E 1916 2A37 A38 4C63 C 64 C65 HARDING HARDING WARREN G. NOVEMBER 2 18650HIO REPUBLICANOHIO CENT.SCCT-IRISHBAPTIST JOURNALISTAUGUST GEORGE PHOEBE 1FLORENCE JULY 18 1891 1A39 2C67 C68 PRES COOLIDGE COOL I GE JULY 4 1872VERMONT VERMONT 5FT. 10IN.REPOBLICANAMHERST 1LAWYER JANUARY 5 1933HEART ATT.JOHN VICTORIA OCTOBER 4 1905 2 1E1924 2A40 C68 C69 C70 PRES HOOVER HOOVER HERBERT C. 1874IOWA IOWA 5FT. 111N.REPUBLICANSTANFORD SWISS-GERMQUAKER OCTOBER 20 1964DEBILITY JESSE HULDA 1LOU 1899 2 IE1928 1A42 2C71 ROOSEVEF ROOSEVELT FRANKLIN D0 JANUARY 30 1882NEW YORK ALPHONSO DECEMBER 2ELLEN 0 C66 OHIO 2 19; 0 CALVIN ENGLISH A41 AUGUST F E BRUARY C72 NEWYORK 2 2 I 23 I I 45 3 10 ENGINEER 10 PRES 6FT. 2IN. DEMOCRAT CER HEMORRJAMES E1932 E1936 C73 C74 HARRY S. ENGL-SCOT BAPTIST MARTHA ICHARVARD SARA CUTCH EPISCOPAL 1ANNA ILAWYER MARCH 17 E1940 E1944 4A43 A44 C75 C76 C77 C78 C79 MAY 8 1884MISSOURI MISSOURI 2CLOTHIER SENATOR APRIL A45 PRES 5FT. - 1905 12 6 19' 4 7 A46 TRUMAN 9IN. DEMOCRATIC TRUMAN 0 0 JOHN 1 ELIZABETH JUNE 28 4C79 C80 C81 A47 A48 DWIGHT D. OCTOBER SWI SS-GERMPRES BYT. IMAMIE JULY A49 A50 JOHN F. MAY IRISH CATHOLIC 1JACQUELINESEPTEMBER 2C87 C88 1908TEXAS TEXAS 0 1934 " 14 ISOLDIER MARCH 1890TEXAS 1 1916 4C83 C84 C85 29 1917MASS. ISENATOR NOVEMBER 12 1953 PRES JCHNSONL JOHNSO 6FT. 3IN. DEMOCRATICS.W.TE 0 SAM REBEKA 1; r- t ^ A - 1919 1 E 1948 2 C82 PRES EISENHOW EISENHOWER TEXAS 5FT. IOIN.REPUBLICANU.S.MIL.AC 28 1969HEART DIS.DAVID IDA 2 2E1952 E1956 2 C86 PRES KENNEDY KENNEDY MASS 5FT. 11 IN.DEMOCRAT ICHARVARD 22 1963ASSASSIN. JOSEPH ROSE 3 IE1960 1A-.S IN LYNDON B. AUGUST 27 XAS ENGLISH DIS.CHRIST S ENA-TOR H- ICLAU tt n OV>isWQ -D Q.

3ADAMS I ELECTION E1796 PINCKNEY FEDERAL E1800 1 FEDERALIST 1804JEFFERS 188MADI SON 6ELECTIO 89ELECT IO 34ELECTIO 1ELECTIO 99CRAWFOR JACKSON DEMOCRA JACKSON DEMOCRA WIRT ANTIMAS HARRISON WHIG INDEP. DEMOCRATIC WHIG DEMOCRATIC WHIG REPUBLICAN 180 39ELECT IO 21ELECTIO 80ELECTIO 66ELECTIO 184ELECTIO 155ELECTIO 182ELECTIO 168ELECTIO 145WEAVER IBRYAN IBRYAN 1PARKER IBRYAN 2ROOSEVE WILSON DEMOCRA HARDING REPUBLI COOLIDGE REPUBLI ELECTION E1928 ELECTION E1932 ELECTION E1936 ELECTION E1940 ELECTION E1944 ELECTION E1948 IST 800, 651 ONI I Ii FEDERALIST 77CLINTON DEM-REP 1796J. ADAMS FEDERALIST 59BURR OEM-REP JEFFERSON OEM-REP 73 P I NCKNEY FEDERAL I ST 64JAY DEM-REP 162 IP INCKNEY DEM-R EP 122 2P INCKNEY 501 71 4, 309 OTHERS 4BURR 1 FEDERALIST FEDERAL I ST FEDERALIST 2 OTHERS JEFFERSON DEM-REP 481 73) DEM-RE P 1 14 471 IN E1812 1812MADISON DEM-REP 128 1' IN E1816 1816MCNROE DEM-REP 183 11 IN E1820 1820IONROE OEM-REP 231 1I IN E1824 1824J.Q. ADAMSDEM-REP 84 3 I-NDEP.. 41CLAY INDEP* 37ELECTION T IC 178 LADAMS NAT-REP 83ELECTION TIC 219 3CLAY NAT-REP 49FLOYD I ON 7ELECTION E1836 1836VAN BUREN DEMOCRATIC 73WHITE WHIG 26WEBSTER WHIG 11ELECTION E1840 1840W.HARRISONWHIG 234 60ELECTION E1844 1844POLK OEMOCRATIC 170 OS5ELECT ION E1848 1848TAYLOR WHIG 163 127ELECTION E1852 1852PIERCE DEMOCRATIC 254 42ELECTION, E1856 1856BUCHANAN DEMOCRATIC 174 114FILLMORE AMERICAN 8ELECTION E1860 1860 300UGLAS DEMOCRATIC 12BRECKRIDGESOU. DEM. 72 IN E1864 1864LINCOLN REPUBLICAN 212 1 )N E1868 1868GRANT REPUBLICAN 214 1 IN E1872 1872GRANT REPUBLICAN 286 1i IN E1876 1876HAYES REPUBLICAN 185 1 IN E1880 1880GARFIELD REPUBLICAN 214 11 IN E1884 1884CLEVELAND DEMOCRATIC 219 1 IN.1888 1888B.HARRISONREPUBLICAN 233 1 IN E1892 1892CLEVELAND DEMOCRATIC 277 21 PEOPLES 22ELECTION -E1896 1896MC KINLEY I DEMOCRATIC 176ELECTION E1900 1900MC KINLEY I DEMOCRATIC 155ELECTION E1904 1904TROOSEVELTI DEMOCRATIC 140ELECTION E1908 1908TAFT I DEMOCRATIC 162ELECTION E1912 1912WILSON I 'LT PROGRESS. 88TAFT REPUBLICAN 8ELECTION JTIC 277 IHUGHES REPUBLICAN 254ELECTION CAN 404 ICOX DEMOCRATIC 127ELECTION CAN 382 2DAVIS DEMOCRATIC 136LAFOLLETTE 1928HOOVER REPUBLICAN 444 ISMITH I 19''2FRCCSEVELTDEMOCRATIC 472 IHOOVER I 1936FROOSEVELTDEMOCRATIC 523 ILANDON I 1940FROOSEVELTDEMOCRATIC 449 IWILLKE I 1944FROOSEVELTDEMOCRATI C 432 IDEWEY 1948TRUMAN DEMOCRATIC 303 2DEWEY I ELECTION I ELECTION I CLINTON CLINTON KING I ADAMS JACKSON E1828 E1832 NULLIFIER 170 68 EL ECT ION ADAMS E1804 E1808 INDEP. INDEP. FEDERALI ST INDEP. INDEP. 1828 1832 11 4 14MANGUM IVAN BUREN ICLAY ICASS 1SCOTT 2FREMONT LINCOLN REPUBLICAN BELL CONSTIT. - MC CLELLANDEMOCRATIC SEYMOUR DEMOCRATIC GREELEY DEMOCRATIC TILDEN DEMOCRATIC HANCOCK DEMOCRATIC BLAINE REPUBLICAN CLEVELAND- DEMOCRATIC HARRISON REPUBLICAN REPUBLICAN 271 REPUBLICAN 292 REPUBLICAN 3 3 REPUBLICAN 321 DEMOCRATIC 435 E1916 1916 E1920 1920 E1924 1924 PROGRESS. 13 DEMOCRATIC 87 REPUBLICAN 59 REPUBLICAN 8 REPUBLICAN 82 REPUBLICAN 99 REPUBLICAN 189

- THUR MONO - S TEEiNS ON S T:E VEN'.-^SIN NIXON STA,-.R IGHTS CD:EM IOCI-RA. T I C R If -CiR AT I C RE'PtUB;L I CAN GOLDWA TER REAPU8L ICAN JOHN A3 A4 OHIO ELB:R-IDGE MONROE ALABAMA DANIEL ADAMSJQ JACKSON JACKSON A13 Al4 A15 A16 TEXAS TAYLOR F I LLMORE PIERCE 8UCHANAN KANSAS LINCOLN JOHNSONA GRANT GRANT ADAMS 4 1793WASHVI 21 4GT MARCH MARCH -AD-M IN A5 OADM IN A6 ILOUISIANA LA ~ r-co o V. 39tEL CTION 39ELECTION 73E LECT ION 19 ELECT ION 52ADMIN 2-VERMONT 1 4 1791 4 1801 MARCH MARCH ADM.IN 1I ND I ANA TOMPKINS ADMIN IMISSOURI CALHOUN CALHOUN VAN BUREN E 1952 E 956 E 1960 E 1964 Al 1952EI SENHOWERREPUBL ICAN 1956E ISENHOWERREPUBLI CAN L960KENNEDY DEMOCRATI C 19-64L JOHNSONDEMOCRATIC APR IL VERMONT KENTUCKY.JOHN ADAMS KENTUCKY 7AOAMSJ LJEFFER S A7 INDIANA A9 MISSOURI 442 4,eS 7 303 486 -il 1, J: I THOMAS ) IAARON 4 I- 1805JEFFERSO 4 180 9MAOI SON 30 ADMIN A2 ITENNESSEE TENN JEFFERSON BURR 1GEORGE 1 GEORGE 4.. 1813MADISON MARCH ILLINOIS ILLINOIS 4 182 MONROE MARCH ADMIN OADMIN 10HIO CLINTON CLINTON I 4 1811 ALABAMA 1789WASH I NGT,t rC'. r i MAI NE TOMPK I MARCH MARCH APRIL MARCH IOWA ADMIN 2W VA 4 4 I DANIEL MAINE NS 1 JOHN 1JOHN 1MARTIN IOWA IMILLARD 0 1WILLI AM IJOHN A21 WESTVA IANDREW 0 SCHUYLER 1HENRY 1877HA YES 1881GARFIELD 1881ARTHUR ITHOMAS ILEVI SO 1893CLEVELAN I MARCH ADMIN 4MISS. MARCH ADMIN OADMIN OADMIN 2ARKANSAS 4 1837VANBUREN 4 1841HARRISOW 6 1841TYLER 4 1845PCLK WISCONSIN WISC F ILLMRE 1CAL IFORNIACAL KING BRECKRI DGE MARCH NEVADA NEVADA JOHNSON 1NEBRASKA NEBRASKA COLFAX WILSON IWILLIAM 1C HESTER 0 HENOR I CKS MORTON A8 MISS A10 A.l1 A12 ARKANSAS IRICHARD 1JOHN 0 1GEORGE A17 418 A19 A20 ADMIN OADMIN ADMIN OADM IN 3MINNESOTA MINN 4 1861LINCOLN ADMIN A22 OADMIN A23 ADMIN A24 OADMIN A25 1COLORADO COLORADO WHEELER ARTHUR OADMIN A29 OADMIN A30 6WASHINGTONWASH WYOMING WYOMING STEVENSON IGARRET MARCH MARCH MARCH MICHIGAN JOHNSON TYLER 1FLORIDA DALLAS MARCH JULY MARCH MARCH OREGON MARCH APRIL MARCH MARCH ADMIN OADMIN OADMIN MARCH MARCH MONTANA ADMIN IUTAH HOBART 4 4 4 MICHIGAN ADMIN OADMIN OADMIN FLORIDA ADMIN 3TEXAS 4 10 4 4 OREGON KANSAS 1HANN I BAL HAMLIN 4: 15 4 4 I I 1 82 182S 1833 1849 185C 1853 1857 1865 1865 1869 1873 20 CLEVELAN HARRISOB NORTHO S.D. 4 A32 MARCH A33 MARCH A26 A27 A28 MONTANA A31 UTAH MARCH MARCH SEPTEMBER 4 1885 4 1889 N.D. MARCH ADMIN OA-DMIN IDAHO IDAHO IACLA I 1897MCKINLEY 190 1MCKINLEY 4 4 1 /. ITHEODORE ROOSEVfEt T... A s " A34 SEPTEMRFR

N 'WME XICO THCMA.S THOMAS CAL VIN 0 0) 0 0 i A48 A49 A450 ALASKA i LYNDON 0 38 2 FEfCERALIST C5 484 641 21 DEM-PEP FEDEPALIST.C1O 1181 481 2 AR I ZONA MARSHALL MARSHALL COOLIDGE ADMI N ADM IN ADM IN ADM IN ADMIN ADMIN ADMIN JANUARY JANUARY JAN UARY HAWAI I JOHNSON ADM IN CONGRESS ANT I-F ED ARIZONA ADMIN OADMIN OADMIN OADMIN A41 MARCH 442 MARCH 443 MARCH 444 JANUARY A45 JANUARY A46 JANUARY A47 APRIL 20 1. 20 1 20 1L A37 A38 A39 A40 ~ I 949TRUMA N 953E ISENHOW 957E SENHOW A51 A52 MARCH MARCH MARCH AUGUST 4 4 4 10 20 L2 12 I 4 4 4 3 1925COOLIDGE 1929HOOVER 1933ROOSEVEF 1937ROOSEVEF 1941 ROOSESVEF V1945ROOSEVEF 1945TRUMAN 1 ALBEN IRICHARD 1 RICHARD 1913WILSON 1917WILSON 192 HARDING 1923COOL IDG 1CHARL ES ICHARLES 1 JOHN 1JOHN 1 HENRY IHARRY 0 Y 196 KENNEDY 1963JOHNSON IHUBERT BARKLE NIXON NIXON HAWWa I A53 Cl ADMIN OADMIN JANUARY NOVEMBER 20 22 FEDERALIST 13 19DEM-REP 2FEDERAL CONGRESS C6 DEM-REP FEDERALIST 25 70EM-REP 2FEDERAL CONGRESS Cll DEM-P EP FEDERALIST 27 JANUARY 2FEDERAL 26CONGRESS C2 37DEM-REP 2FEDERALIST 13.IST 20DEM-REP 2FEDERAL 42CONGRESS C7 36DEM-REP 2FEDERALIST 27 1ST 6DEM-REP 2FEDERAL 94CONGRESS C12 36DEM-REP 2FEDERALIST 25 I ST 10DEM-REP 2FEDERAL 156CONGRESS C17 2 5DEM-REP 2FEDERALIST 1IAN 20 20JACKSON 2 EMOCRA 74CONGRESS C22 3DEMOCRATIC TIC 220NAT-REP 20 1965JOHNSONL 1ST 17ANTI-FED 2FEDERALI 33CONGRESS C3 48DEN-REP 2FEDERALIST 12.ST 19DEM-REP 2FEDERALI 69CONGRESS C8 39DEM-REP 1 2FEDERALIST 28 IST 60EM-REP 2FEDERALI 108CONGRESS C13 68DEM-REP 1 2FEDERAL IST 34. ST 7DEM-REP 2FEDERALI 158CONGRESS C18 26DEM-REP 1 2ADMIN. 1 IAN 28,* 9 ST 16DEM-REP 2FEDERAL 57CONGRESS C4 54DEM-REP 2FEDERALIST 13 ST - 14DEM-REP 2FEDERAL 02CONGRESS C9 2-5DEM-REP 2FEDERALIST 28 ST 6DEM-REP 2FEDERAL.12CONGRESS C14 65DEM-REP 2FEDERALIST 35 ST 4DEM-REP 2FEDERAL 87CONGRESS C19 O05JACKSONI AN 2AOMI N. 1 E 1 1 E 0 DAWES CURTIS GARNER GARNER WALLACE TRUMAN OADMIN OADMIN OADMIN 2ALASKA 1 L 0 HUMPHREY 2FEDERALIST 13 IST 17 2 52CONGRESS 58DEM-REP 2FEDERALIST 18 IST 9 2 116CONGRESS - 24DEM-REP 2FEDERALIST 30 IST 9 2 1 7CONGRESS 42D EM-REP 2FEDERALIST 44 IST 4 2. 97CONGRESS 94JACKSON IAN 2DEMOCRATIC 21 14CONGRESS 3DEMOCRATIC TIC 27 DEM-P P FEDEFAL C15.1ST I1DEM-REP 2FEDERAL 141CONGPRSS C16 270EM-REP 2FEDEPALI ST 44 26 JACKSON 2ADMIN. 119CONGRESS C21 139NAT-R EP OEM-REP ADM I N. C20 0 TER C23 26NAT-REP 3nEMOCRATIC 580THERS 2 3DEMOCRA 14 1NAT-REP 22 25NAT-REP 8 2DEMOCRA 147ANTIMASON 53CTHERS 20OTHERS 60CONGRESS C24

S S,: 25 OIE- "nCRATIC -- - 253W; 10 7CTHE RS 2DEMOCRAT I 20EMCC P T IC 18OTHERS 24CONGRESS C26 124WH IG 2 14 5 WH I 98( 3( 4 WHIG DF'MtOCRAT I 280 THERS 6CONGRESS C28 3DEMOCR AT C C 31 WHIG 6CONGRESS C30 3DEMOCRAT I C 142WHIG 108WHIG 30EMUCRA 25 3CEMOC R A 2DEMOCRATIC 118CONGRESS C27 3DEMOCRAT IC 102~ TIC 25WHIG 790THERS 1( 3DEMOCRATIC 143t TIC 36WHIG 280THERS CONGRESS C29 WHI G 21OTHERS CONGRESS C31 DEMOCRATIC 38WHIG CONGRESS C25 DEMOCRAT I C 108HI& G 28WHIG 3DEMOCRAT IC WHIG 1330THERS 3 22 22 1 2 3 770THERS 115OTHERS 4( 31 DEMOCRATIC 35WHIG O190THERS OTHE RS 3 C33 3DEMOCR, 159WH G REPUBLICAN 150THERS 43CONGRESS C35 30ENOCRATIC DEMOCRAT I C IOREPUL 1140THPRS 25OTHERS 9CONGRESS C32 3DEMCCRATI C C 40WHIG 2.3DE MC RATI C 112WHIG 24 5CONGRESS 3inFMnC RAT I C 140 WH IG 88 THERS ATI 71 CTHERS 5 3DEMOCRAT 118REPUBLICAN 22OTHERS 2 4CONGRESS C34 3DEMOCR 3DEMOCRATIC 83REPUBLICAN FIC 36REPUBLICAN 200THERS 920THERS 26CONGRESS C36 4 3DEMOCRATIC AT I C 1080THERS 36 IC AN 26CTHERS 31CCNGRESS C37 30EMOCRATIC 8 3 92REPUtLICAN AN 31 30C ONGRE S S 3DEMOCRATI C 3DEMOCRATIC 9REPUBLIC OTHERS C3 8 43REPUBLICAN 1050THE-IRS 3DEMOCRATI C 9REPUBLIC;AN 75REPUBL ICAN 102CTHERS 9l REPUBLICAN 42 2DEMCCRATIC 421 DEMOCRATIC 11REPUBLICAN 42 21 C41. 2DEMOCRAT IC 11REPUBLICAN 149CONGRESS C42 2DEMOCRATIC 104REPULI CAN 134CTHERS 5( REPUBLICAN 49CTHERS5 31 360THERS CONGRESS C39 REPUBLICAN 1.49 DEMOCRATIC 49f 56 21 17REPUBL ICAN CONGRESS C43 DEMOCRATIC 921 2DEMOCRAT IC CONGRESS C40 10 2 5 '. PI REPUBL [C DEMOCRAT AN 143CONGRESS 'IC 63REPUBLICAN 52 3DEMOCRATIC 3DEMOCRATIC 19 AN 1940THERS REPUBLIC 14CONGRESS 3DEMOCRAT C44 IC 1 DEMOCf A T I C 36REPUBLI C 140CONGRESS C46 3DE OC RAT C- 1 DE MOCRATI-C... - 37REPU:8L IC 147CTHER S 3DEMOCRATIC 29REPUBLICAN 450THERS 69REPUBLICAN 109OTHERS 14CONGRESS C45 AN 39CTHERS 1 2DEMOCRATI C 3DEMOCRATIC 42REPUBLICAN 330THERS 49RFPUBLICAN 1300THERS 14CONGRESS C47 AN. 370THERS' - I ' -3DEMOCRAT IC 1CCNGRESS C48 3DEMOCRATIC 36REPUBL] 3DEMCCRATIC 197REPUBLICAN 1180THERS 2 3 153R EPUBL ICAN 1 3 13 5REPU L [ C AN [CAN 38 O1CONGR E S S O:THRR S C49 14OCTHERS 3DEMOCRAT DEMfOCRATIC C52 2 2DEMOCRATIC 34REPUBLICAN 43 2CGNGRESS C50 2 'IC 169REPUBLICAN 1520THERS 44REPUBLICAN 38 2DEMOCRATIC 3DEMOCRAT I C 39REPUBLICAN 43' DEMOCRA 3DEMOCRATIC 183REPUBLICAN TIC 37REPUBLICAN 39 4CONGRESS C51 2 159REPU8LICAN 166CONGRESS OTHERS 2 3DEMOCRAT IC 235REPUBLICAN R E P-U BL- I A N IO NT WC D C 88CTHERS 9CONGRESS C53 30EMOCRATIC 3

- -I — 1- -. - -- - = 'M) tCR-ATIC 34REPUBLICAN 47CTHERS 7 204CTHERS 40CONGRESS C56 3DEMOCR CTHERS 8 3DEMCCRATIC 163REPUBLICAN C57 3DEMOCRATIC 31REPUBLICAN 550THERS 151REPUBLICAN 1970THERS 9CONGRESS C58 PREPUB ICAN 57 2DEMCCRATIC 178REPUBLICAN OEMOCHATIC 33REPUBLICAN 57 2DEMOCRATIC C60 2DEMOCRATIC 31iRPUBLICAN 61 222CONGRESS C61 2DEMOCRATIC 32REPUBL 172REPUBLICAN 219CONGRESS C62 2DEMOCR 3DEMOCRATIC 228REPUBLICAN 16 10THERS DEMOCRAT I C 51R.EPUBLICAN 440THERS 1 12 7THERS 17CONGRESS C64 2'DEMOCR 3DEMOCRATIC 230REPUBLICAN 1960THERS [)EML'CPAT1C 53REPUBLICAN 42 3DEMOCRATIC 6CONGRESS C66 2DEMOCRATIC 47REPUBL 190REPUBLICAN 2400THERS 3CONGRESS C67 REPUBLICAN 59 3DEMOCRATIC 131REPUBLICAN C68 3DEMOCRATIC 43REPUBLICAN 5O1THERS 3DEMOCRAT IC 113REPUBLICA AN ATIC 26REPUBLICAN 53 1850THERS 9CONGRESS 4 31 2DEMOCRATI C 208CONGRESS C59 DEMOCRAT IC 33 2 136REPUBL CAN 250CONGRESS 2DEMOCRATIC 164REPUBLICAN ICAN 61 - 2DEMOCRATIC ATIC 41REPUBLICAN 51 LCONGRESS C63 3 3D'EMOCRATI'C 291REPUBLICAN ATIC 56REPUBLICAN 40 9CONGRESS C65 2 216REPUBLICAN 2100THERS ICAN 49 3DEMOCRATIC 2DEMOCRATIC 37 30O10THERS 1CONGRESS 2 3DEMOCRATIC 205REPUBLICAN 225CTHERS 5CONGRESS C69 30EMOCR, RFPUBLICAN 560THERS 1 3DEMOCRATIC 183REPUBLICAN 4CONGRESS C70 3DEMOCRAT IC 46REPUBL I CAN 49OTHERS 3DEMOCRATIC 195REPUBLICAN 237CTHERS 3CONGRESS C71 DEHOCCATIC 39REPJBL ICAN 560THERS l 30EMOCRATIC 2670THERS ICONGRESS C72 3DEMOCRATIC 47REPUBL OTHERS 1 3DEMOCPATIC 220REPUBLICAN 2140THERS C73 3DEMOCRATIC 60REPUBLICAN 350THERS 1 310REPUBLICAN 117CTHERS 5CONGRESS C74 3DEMOCR REPUBLICAN 250THERS 2 30EMOCRATIC 319REPUBLICAN 10CONGRESS C75 3PEMOCRATIC 76REPUBLICAN 160THERS 3DEMOCRATIC 331REPUBLICAN 890THERS 13CONGRESS C76 ODEMOCRATI-C 69REPUBLICAN 23CTHERS 4 3DEMOCRATIC ATIC 39 2470THERS - — 1 I 'O 3 167REPUBLICAN ICAN 48 ICONGRESS 3DEMOCRATIC ATIC 1030THERS 69 4 3 261REPUBLICAN 1640THERS 4CONGRES S C77 3DEMOCR OTHERS 2 3DEMOCRATIC 268REPUBLICAN C78 3DEMOCRATIC 58REPUBLICAN 37CTHERS 218REPUBLICAN 2080THERS 4CONGRESS C79 ATIC 1620THERS 66F 1 3t PEPUBLICAN 380THERS 2CONGRESS C80 188REPUBLICAN 24 R EPUBL ICAN C82 1990THERS OTHERS C84 42 20EMOCRAT I 1 1 3DEMOCRATIC 242REPUBLICAN 2DEMOCRATIC 45REPUBLICAN 51 5CTHERS 1CONGRESS C81 2E 3DEMOCRATIC 263REPUBLICAN 1710THERS C 49REPUBLICAN 47 3DEMOCRATIC 1CCN-RESS C83 3DEMOCRATIC 47F 3DEMOCRATIC 211REPUBLICAN 221CTHERS REPUBLICAN 28 5CONGRESS 3DEMOCRATIC EMOCRAT I C 56 1900THERS 30EMOCRAT IC DEMOCRATIC 54 1CONGRESS 234REPUBLICAN REPUBLICAN 48 232REPUBLICA 2DEMOCRATI 30EMOCkt TIC 48REPUBLICAN 470THERS,N 203CONGRFSS C85 2DEMOCRATIC C 233REPUBLICAN 200CONGRESS C86 1 49REPUBLICA 2DEMOCRATI ICONGRESS 2DEMOCRATIC N 47 C 64

F Pt)UBLICAN O FM C P A T I C C88 34 21 65EPUBL ICAN 2 DEOCRAT IC DEMCCRATIC 35 67REPUBL I 2DEMOCRA 2831 21 CAN kTIC 177CONGRESS C89 29 516 MONT7GOME 1139 STATES 192210 OAKLAND GLENDALE SANTA AN 50 NEW HAVE 585 J ACKSONV 0. R 10 A 5REPUBLICAN 140CONGRESS C90 2DEMOCRATIC 248REPUBLI CAN 1871 9 29 3556000 21 10 Y 134393HUNTSVILLE 123519STATES 1 277000 50 3 0 9 6 1670000 34 5 ARKANSAS ARKANSAS 1836LITTLEROCK 1LITTLEROCK 128929STATES - CAL 4 EPUBL I CAN 1531 DEMOCRATIC 2631 33 21 68REPUBLICAN 2DEMOCRATIC STATES ALABAMA 4BI RMINGHAM ALASKA ALASKA STATES ARIZONA 2PHOENIX CONGRFSS REPUBL IC DEMOCRAT ALABAMA 3408 19 ARIZONA 5056 'AN 174CONGRESS 'IC 258REPUBLICAN 32 2DEMOCRATIC 64REPUBLICAN 36 1819MONTGOMERY 887MOBILE 202779 )59JUNEAU 586400 1912PHOENIX,66TUSCON 236877; C87 2 53104 CALI FORN IA 28 2012000 1850SACR AMENTO 15f 31 8693 6 3 0 1 40 14LOSANGELES 367548LONG BEACH 344168SACRAMENTO 119422PASADENA 116407BERKELEY 100350STATES COLCRADC CCLCRADO 2479015SAN FRAN. 237712SAN JOSE 1L1268ANAHEIM 1876DENVER 30 6 1DENVER )09 48 2959000 N 141752WATERBURY 10 49 534000 46 60 22 6160000 201030ST. PETER. 18 21 4583000 15 493887STATES 24 713CSTATES 3 9 1298STATES 12 8 DELAWARE OSTATES 14 GEORGIA 3ATLANTA 1959HONOLULU IDAHO OSTATES CONN 4HARTFORD DELAWARE FLORIDA 4MIAMI GEORGIA CONN 740316SAN DIEGO 573224 204196FRESNO 133929 104184TORRANCE 100991 104247 8 2048000 1. 1788HARTFORD 162178BR IGEPORT 156748 178700VER 2057 (IDA 1845TALLAHASSE 291688TAMPA 274970 1788ATLANTA 58876 FLOR I 487455SAVANNAH 149245COLUMBUS 778000 40 116779STATES 4 HAWAII 1 HONOLULU HAWA I I 294194STATES 6424 47 IDAHO ILLINOIS 1890BOISE ILLINOIS 83557 1818SPRING. 13 7C5000 41 4 4 56400 PEORIA 12 144463SOUT 5629C STATES KANS 3WICH 1792FRAN STATES LA 3NEWO 1820AUGU MARYLAND 939024STAT 14 N[WBEDFORD 7 25 10974000 26 103162STATES INDIANA INDIANA 13 6INDIANAP. 476258GARY H BEND 132445HAMMOND 111698STATE 26 2748000 25 9 AS KANSAS 1861TOPEKA ITA 254698KANSASC I TY 121901TOPEK KFORT 40395 37 3229000 LOUISIANA 1812BATONROUGE RLFANS 627525SHREVEPORT 160535BATON STA 33215 39 979000 t788ANNAPOLIS 10577 42 31 ES MASS MASS. 1788BOSTC 5BOSTON 697197WORCESTER 1 102447STATFS MICHIGAN MICHIGAN 3CHICAGO 3550404ROCKFORD 132109 1816INDIANAP. 36291 38 5C6700 178320FORTWAYNE 172594EVANSVILLE 'S IOWA IOWA 1846DES MOINES 29ES MOINES 206739CED. RAP. 103545 82264 14 2303000 29 7:A 119484STATES KENTUCKY KENTUCKY 9 11 31 3732000 154190STATES LOUISVILLE 390639 4 0! MAIN STAT 19 IE p 'ES p 157000 18 10 it IN 8257 45 5437000 86587SPRING. 174463CAMBRIDGE 1837LANSING 58216 23 'r 196940GR. RAPIDS 1773131 -SOTA 1858ST. PAUL 84068,,0 n n -T %. - r ~ M. 10 MAINE MARYLAND BALTIMORE 10 107716 8740000 DEARBORN 12 21 112007LANS I NG 3646000 5DETROIT 1670144FLINT 107807STATES MINN MINNE 10 MTNINM AD 20

462700 MONTANA NEBRASKA OMAHA 0 13 1889HFLENA NEBRASKA 1I 301598LI NCOLN 12 2ST. LOUIS 147138 867L INCOLN 750026KANSA SCITY.475539STATES MONTANA 4 693000 43 4 OSTATES?7 15 1437000 35 5 2 7722 128521STAT-S NEVADA NEVADA 1864 7 9304 TRENTON 276101PATE NEWMEXICO NEW ALBUQ. 2 216038YONK NORTHC N.C. CHARLOTTE N.D. OHIO OHIO CLEVELAND DAYTON 453000 47 3 OSTATES NEWHAMP N.H. 44 702000 42 4 OSTATES NEWJERSEY 7836 46 7078000 8 17 6NEWARK RSON 143663CAMDEN 11 759TRENTON 114167EL IZAETH MEXICO 1912SANTA FE 121666 5 1015000 37 2011.89STATES NEWYORK NEW YORK 1788ALBANY 49576 43 8NEW YORK 7781984BUFFALO 532759ROCHESTER ERS 19063.4ALBANY 129726NI AG. FALL 102394UTI CA 1789RALEIGH 57712 24 5135000 11 201564GREENSBORO 1,19574WIN. SALEM 111135RALEIGH 105722 1889BISMARK 70665 17 625000 45 4 1803COLUMBUS 41222 35 10591000 6 810858CINCINNAT I 505550COLUMBUS 471316TOLEDO 318003, 262332YOUNGSTOWN 166689CANTON 113631STATES OKLAHOMA CARSONC I TY 110540 1788CONCORD NEW JERSEY 1787 405220JERSEYC I TY 107698STATES 4 1 30 18113000 31861 ISYRACUSE 100410STATES 13 4 STAT ES NORTHD OSTATES 26 8 AKRON 290351 OKLAHOMA 1907 OKLA. CITY 69919 18 2518000; 261685STATES OREGON OREGON 18! 6 1PORTLAND 372676STATES 33 11712000 3 29 138440SCR ANTON 111443ALLENTOWN 1083i 1214 50 913000 39 S.C. 1788COLUMB IA 31055 27 59SALEM PA 8 PA. 2OKLA. CITY 324253TULSA 96981 10 2008000 32 1787HARRI SBURG 45333 2002512PITTSBURGH 604332tRIE R.I. 1790PROVIDENCE IVIDENCE 207498STATES SC 5PHILA. 47STATES I 4 1I 40 2692000 I Cn,. RI PRO so STATES 26 657000 8 44 4 S.D. TENN MEMPHIS TEXAS TEXAS HOUSTON AUSTIN MICH. FALL 1889PIERRE 770 TENNESSEE 1796NASHVILL 536585NASHVILLE 1708 1845AUSTIN 2673 'DALLAS 679684SANANTON CORP. CHR. 167690AMARILLO STATES UTAH UTAH UTAH 1S.L. CITY 1894 47 16 f 42244 74CHAT ANOOGA 39 2 34 3976000 130009KNOXVILLE 10972000 5 OSTATES 4 17 118827STATES 0 11 25 11 939219 185545 101724 4 36 9609 RICHMOND 219958PORT 68192 T ACMA 33 4213000 WYOMING 43 422000 48 40815 -36 4597CCO 'SMOUTH 144773NEWP. NEWS 20 3276000 22 147979STTES WESTVA 10 587718FORTWORTH 356268ELPASO 276687 137969LUBBOCK 1228691BEAUMONT 119175 1896S.L. CITY 84916 11 1034000 54STATES VERMONT VERMONT 179 M'ONTPEL IER 3 OSTATES VIRGINIA VIRGINIA 1788 14 12 4NORFOLK 304869R ICHMOND 62STATES WASH WASHINGTON 18890LYMPIA 9 3SEATTLE 557087SPOKANE 181608 1863CHARLESTON 24181 41 1805000 WISCONSIN 1848MADISON 56154 27 E 741324MADI SON 157844STATES WYOMING 9 315000 49 3 * ** ***** 1136 W.VA wISC M ILWAUKE 7 16 OSTATES 12 2i 1890CHEYENNE 97914

-96 - APPENDIX B Presidential Report Examples

R - VER.S 7 4. O I l J) f)$4 V4~~~~~~~~k.S~~~~~oi 7~~~~~4~~~J(I~~~~) P A&E 1~~~~ar PA'GE 1 U,4 lVERSITY Ui M ICHIGAN MT$S * P ES tI)ENTI/ FL ECT IOfN REPOR T ** PRESIDEN4T ilAME JCHN ADAMS W-ON ELECT ION OF 1796 A(;.AIN ST JLFFERSUN PRESIDENT NAME JOHN 0. ADAMS WON ELECTICON OF 1824 AGAINST JACKSON PRESIDENT NAME CHEST ER A. ARTHUR PRESIDENT NAME JAMES 3UCHANAN W.ON ELECTION OF 185.6 AGAINST FREMONT PREtS-IDENT NAME GROVER WON ELECTION OF 1384 WON ELECTION OF 1392 CLEVELAND AGAINST 3LAINE AGAIN ST HARRISON I PRESIDENT NAME CAL VI ' COOL I DGE WON ELECTION OF 1924 AGAINST DA-VIS PRESIDE NT NAAME ODW IHT WON. ELECT ION OF 1952 WO N ELECT ION O F 1956 PRESIDENT NAME MILLARD D. t.I SENHOWER AGAINST STEVENSON AGAINST STEVENSON FILLM4ORE PRESIDENT NAME JAME S A. GARFIELD WON ELECTION OF 1880 AGAINST HANCOCK PR ESID ENT NAME ULYSSES WON ELECTION OF 1868,... -,,,.... - S-. GRANT A:G/INST SE YMOUJR

P-SA VER'SI., 74,.,. UNIVERSITY tOF MICHIGAN / MTS * PRESIDENT/ELECTION REPORT ** PRESIDENT NAME WARREN. G. HAROING WON ELECTION OF 1920 AGAINST COX PRESIDENT NAME BENJAAIN HARRISON WON ELFCTION OF 1888 AGAINST CLEVELAND PRESIDENT NAME WILLIAM H. HARRISON WON ELECTION OF 1840 AGAINST VAN BUREN PRESIDENT NAME RUTHERFORD B. HAYES WON ELECTION OF 1876 AGAINST TILDEN PRESIDENT NAME HERBERF C. HOOVER WON ELECTION OF 1928 AGAINST SMITH PRESIDENT NAME ANDREW JACKSON WON ELECTION.F 1828 AGAINST ADAMS WON ELECTION OF 1832 AGAINST CLAY PRESIDENf NAME THOMAS JEFFERSON WON.ELECTION OF 1800 AGAINST BURR WON ELECTION OF L804 AGAINST PINCKNEY I 00 I PRESIDENT NAME ANDREW JOHN SON PRESIDENT NAME LYNDON. JOHNSON WON ELECTION OF 1964 AGAINST GOLDWATER PRESIDENT NAME JOHN F. KENNEDY WON ELECTION OF 1960 AGAINST NIXON

:P.I ' ~ ~ S I 7?4, 71 0 S'-P 2'9,' 17t4 i1:17.1t UJNIVERS ITY ~ - ' CH I GAN / M fTS '-.PESIDEN1/LL.CTIIJN iqEPtldKT r* V P ESI t:DENT N AME A BR AHAM WON ELECTION O IF 18,60 WON EL ECT ION OF 1.804 PRESIDEN T NAMME JAMES WON ELFCT IO.N OF 1308 WON EL ECTI.ON: OF 1.812 PRESI'DENT NAME WILLIAM WON ELECTION OF 1396 WON ELECTION OF 1900 PR-ES IDENT N-AM E JAMES 'WON ELECTION OF 1816 WON ELECTION OF 8 20 L I NC OLN AGAINST DOUGLAS AGAIN:ST MC CLELLAN MA-DI SON AGAINST PINCKNEY AGAJIdNST CLINTON M4CK INLEY AGAINST BR YAN AGAINST BRYAN O N R-OE AGAINS T KING AGAINST ADAMS -. Jo t PRESIDENT NAME FRANKLIN PIERCE WON ELECTION OF 1852 AGAIN'ST SCOTT PRE.S-IDENT NAME JAMES K. POLK W:ON ELECTION OF 1844 AGAINST CLAY PR.ESIOENT NAME FRA-NKLIN WON ELECT ION OF 1932 WON ELECTION OF 1936 WON ELECTION OF 1940 WON ELECTION OF 1944 D. ROOSE.V-LT AGAINST HOOVER AGAINST LANDON AGAINST WILLKE AGAINST DEWEY PRESIDENT NAME THEODORE ROOSEVELT WON ELECTION OF 1904 AGAINST PARKER

UN I V1E RS I TY -i F CH-GA / -...I.r.l 5 *t PRESIDENT/FLECTION REPORT * PRESIENT 'NAME WILLIAM H. TAFT WON ELECTION OF 1908 AGAINST BRYAN PRESIDENT NAME ZACHARY TAYLOR WON ELECTION OF 1848- AGAINST CASS PRESIDENT NAME HARRY S. TRUMAN WON ELECTION OF 1948 AGAIN4ST DEWEY PRESIDENT NAME JOHN TYLER PRESIDENT NAME MARTIN VAN BUREN WON ELECTION OF 1836 AGAINST HAR-RISUN PRESIDENT NAME GEORGE WASHINGTON WON ELECTION OF 1739 AGAINST ADAMS WON ELECTION — F 1792 AGAINST AD.AMS PRESIDENT NAME WOODROW WILSON WON ELECTION -OF 1912 A.GA.IiNST ROOSEVELT WON ELECTION O(F 1916 AGAINST HUGHES I C o i

P'W E R-S:I.l T4ia 10O ('16 6 —v l 4-2 UtIvVERSI TY Of MICHIGAN t PSF - ** STATE AAND CITY REPORT ** STATE- NAME- ALABAMA ADMITTED IN THE YEAR MAJOR CITIES ARE BI RR MI NGHAM MOB IL E MONTGOM ERY HUNTSVI L LE STATE NAME- ALASKA A DMI-TTED IN THE YEAR STATE NAME- ARIZONA ADMITTED IN THE YEAR MAJOR CITI -ES: ARE PHOENIX TUSCON 1819 POPULAT ION 340887 2027 79 134393 1:23519 1959 1912 POPUL AT ION 5 056 66 236-877 I O./ STATE NAME- ARKANSAS ADMITTED IN THE YEAR MAJOR CITIES ARE L IT TLEROCK STATE.-NAME- CALI F O:RNI A ADM-ITTED -IN THE YEAR MAJOR CITIES ARE LOS ANGEL E S SAN: FRAN. SAN DI EGO OAK L AND LON'G BEACH SACRAMENTO SAN JOSE FRESNO GLE ND ALE 1836 POPULAT ION 128929 1850 POPULAT ION 2479015 740316 573224 367548 344168 237712 204196 133929 114-422

UNIVERSITY OF MICH IGAN /- MIS ** STATE AND CITY REPORT ** BERKELEY ANAHEIM TORRANCE SANTA ANA 111268 104184 100991 100350 STATE NAME- COLORADO ADMITTED IN THE YEAR MAJOR CITIES ARE DENVER STATE NAME- CONN. ADMITTED IN THE YEAR MAJOR CITIES ARE HARTFORD BRIDGEPORT NEW HAVEN WATERBURY STATE NAME- DELAWARE ADMITTED IN THE YEAR STATE NAME- FLOR-IDA ADMITTED IN THE YEAR MAJOR CITIES ARE MIAMI TAMPA JACKSONV ST. PETER. 1876 POPULATION 493887 1788 POPULATION 162178 156748 141752 107130 1787 1845 POPULATION 291688 274970 201030 181298 I ro I STATE NAME- GEORGIA ADMITTED IN THE YEAR MAJOR CITIES ARE ATLANTA SAVANNAH 1788 POPULATION 487455 149245

Sik Efa&Q14 Ic7 t L0 UNIVERSIT OF MICKtIGAN t IbTS ** STATE rtEND CITY REPORT ** COL UMBUS I 16779 STATE NARME- HAW AAI ADMIfTTEO IN THE YEAR MAJOR CITIES ARE HONOLULU STATE NAME- IDAHO ADMITTED IN THE YEAR STATE NAME- I:LL INO'ISADMIT'TED [IN THE YEAR MAJOR CITIES ARE CH-I:C CAGO ROCKFORD PEORI: A 1959 POPULA T ION 294 194 1890 1818 POPULAT ION 35,50404 132109 103162 I C> STATE NAME- IND IANA ADMITTED IN THE YEAR MAJOR CITIES ARE INDIA NAP. GARY FORTWAYNE EVANSV ILLE SOUTH BEND HAMMOND STATE NAME- IOWA ADMITTED IN THE YEAR MAJOR CIT IES ARE DES MOINES CED. RAP. 1816 POPULAT ION 476258 178320 172594 144463 132445 '111698 1846 POPULAT ION 2'06739 103545

** STATE AND CITY REPORT ** STATE NAME- KANSAS ADMITTED IN THE YEAR MAJOR CITIES ARE WICHITA KANSASCITY TOPEKA STATE NAME- KENTUCKY ADMITTED IN THE YEAR MAJOR CITIES ARE LOUISVILLE STATE NAME- LOUISIANA ADMITTED IN THE YEAR MAJOR CITIES ARE NEWORLEANS SHREVEPORT BATON ROUGE STATE NAME- MAINE ADMITTED IN THE YEAR STATE NAME- MARYLAND ADMITTED IN THE YEAR MAJOR CITIES ARE BALTIMORE 1861 POPUL AT ION 254698 121901 119484 1792 POPULAT I ON 390639 1812 POPULAT ION 627525 160535 154190 1820 1788 POPULAT ION 939024 I 0 I STATE NAME- MASS. ADMITTED IN THE YEAR MAJOR CITIES ARE BOSTON WORCESTER SPR ING. CAMBRIDGE 1788 POPULAT ION 697197 186587 174463 107716

PSA VERSION '740710 w 6 - -i6 i 4g-i-4 iUNIVERS[IY OF MICHIGAN / MTS ** STATE AND CITY REPORT ** NEWBEDFORD 102447 STATE NAME- MICHIGAN ADMITTED IN THE YEAR MAJOR CITIES ARE DETROIT FL INT GR. RAPIDS DEARBORN LANSING STATE NAME- MINNESOTA ADMITTED IN THE YEAR MAJOR CITIES ARE MINNEAP. ST. PAUL DULUTH STATE NAME- MISS. ADMITTED IN THE YEAR MAJOR CITIES ARE JACKSON STATE NAME- MISSOURI ADMITTED IN THE YEAR MAJOR CITIES ARE ST. LOUIS KANSASC I TY STATE NAME- MONTANA ADMITTED IN THE YEAR 1837 POPULAT ION 1670144 196940 177313 112007 1078.07 1858 POPULATION 482872 313411 106884 1817 POPULATION 144422 1812 POPULATION 750026 475539 I Ln I 1889

** STATE AND CITY REPORT ** ADMITTED IN THE YEAR MAJOR CITIES ARE OMAHA LI NCOLN STATE NAME- NEVADA ADMITTED IN THE YEAR STATE NAME- N*H. ADMITTED IN THE YEAR STATE NAME- NEW JERSEY ADMITTED IN THE YEAR MAJOR CITIES ARE NEWARK JERSEYCITY PATERSON CAMDEN TRENTON ELIZABETH 1867 POPULATION 301598 128521 1864 1788 1787 POPULAT ION 405220 276101 143663 117159 1 14167 107698 I 0 I STATE NAME- NEW MEXICO ADMITTED IN THE YEAR MAJOR CIT'IES ARE ALBUQ. STATE NAME- NEW YORK ADMITTED IN THE YEAR MAJOR CITIES ARE NEW YORK BUFFALO ROCHESTER SYRACUSE YONKERS 1912 POPUL ATION 201189 1788 POPULATION 7781984 532759 318611.216038 190634

-P1A VERS I'ON 740710 P&A ESI 4 0D 4 914 i 44A92 UNIVERSITY OF MICHIGAN I MfTS ** STATE AND C[TY REPORT ** ALBANY NIAG. FALL UTICA 129726 102394 100410 STATE NAME- N.C. ADMITTED IN THE YEAR MAJOR CITIES ARE CHARLOTTE GRE ENSBORO WIN. SALEM RAL E I GH STATE NAME- N.D. ADMITTED IN THE YEAR STATE NAME- OHIO ADMITTED IN THE YEAR MAJOR CITIES ARE CLEVELAND CINCINNATI COLUMBUS TOLEDO AKRON DAYTON YOUNGS TWN CANTON 1789 POPULAT ION 201564 119574 111135 105722 1889 1803 POPULATION 810858 505550 471316 318003 290351 262332 166689 113631 0 I 1 STATE NAME- OKLAHOMA ADMITTED IN THE YEAR MAJOR CITIES ARE OKLA. CITY TULSA 1907 POPULAT ION 324253 261685 I T-A- r - A -,M A: r r- n,.

UNIVERSITY OF MiCHIGAN- / ' Ml ** STATE AND CITY REPORT ** ADMITTED IN THE YEAR MAJOR CITIES ARE PORTLAND STATE NAME- PA. ADMITTED IN THE YEAR' MAJOR CI1TIES..ARE PHI LA PITTSBURGH ERIE SCRANTON ALLENTOWN STATE NAME- R.I. ADMITTED IN THE YEAR MAJOR CITIES ARE PROVIDENCE 1859 POPULAT ION 372676 17,87 POPULATION 2002512 604332 138440 111443 108347 1790 POPULAT ION 207498 0 00 o I STATE NAME- SoCo ADMITTED IN THE YEAR 1788 STATE NAME- S.D. ADMITTED IN THE YEAR 1889 STATE NAME- TENNESSEE ADMITTED IN THE YEAR MAJOR CITIES ARE MEMPHIS NASHVILLE CHA TA NOOGA KNOXV ILL E 1796 POPULATI ON 536585 170874 130009 118827 STATE NAME- TEXAS

PSA VERSION 740710 OCT 6, 1974 16: 48. 2 PAGE UNIVERSITY OIF MICHIGAN / MTS 4* STATE AND CITY REPORT ** ADMITTED IN THE YEAR MAJOR CITIES ARE HOUST ON DALLAS SANANTONIO FORTWORTH ELPASO AUSTIN CORP. CHR. AMARILLO LUt8BOCK BEAUMONT MICH. FALL STATE NAME- UTAH ADMITTED IN THE YEAR MAJOR CITIES ARE S.L. CITY STATE NAME- VERMONT ADMITTED IN THE YEAR STATE NAME- VIRGINIA ADMITTED IN THE YEAR MAJOR CITIES AR E NORFOLK R ICHMOND PORT SMOUTH NEWP. NEWS 1845 POPULATION 939219 679684 587718 356268 276687 185545 167690 137969 128691 119175 101724 1896 POPULAT ION 189454 1791 1788 POPULAT ION 304869 219958 144773 113662 0 I STATE NAME- WASHINGTON ADMITTED IN THE YEAR MAJOR CITIES ARE SEATTLE, tr.' lo W.,.-'r 1889 POPUL AT ION 5575087

UNI VtK.l IY T ur nrlniu, l, -, -, ** STATE AND CITY REPORT ** TACOMA 147979 STATE NAME- W*VA ADMITTED IN THE YEAR 1863 STATE NAME- WISCONSIN ADMITTED IN THE YEAR MAJOR CITIES ARE MILWAUKEE MADISON STATE NAME- WYOMING ADMITTED IN THE YEAR 1848 POPULAT ION 741324 157844 1890 I 0

PSAB VERSIUN 740710 POAT 6I 1 OT 6, '9'. 1:5^, a' UNIVERSITY UF MICHIGAN / MTS **PRESIDENTIAL INFORMATION REPORT:** PRESIDENT- ADAMS WAS MARRIED IN 1764 TO ABIGAIL HEADED ADMINISTRATIONS VICE PRESIDENT IN 1797 JEFFERSON BORN IN: MASS. PRESIDENT- ADAMS WAS MARRIED IN 1797 TO LOUISA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1825 CALHOUN BORN IN: MASS. PRESIDENT- ARTHUR WAS MARRIED IN 1859 TO ELLEN HEADED ADMINISTRATIONS VICE PRESIDENT IN 1881 BORN IN: VERMONT PRESIDENT- BUCHAANA WAS NOT MARRIED HEADED ADMINISTRATIONS VICE PRESIDENT IN 1857 BRECKRIDGE BORN IN: PA. PRESIDENT- CLEVELAND WAS MARRIED IN 1886 TO FRANCES HEADED ADMINISTRATIONS VICE PRESIDENT IN 1885 HENDRICKS IN 1893 STEVENSON BORN IN: NEW JERSEY, PRES IDENT- COOLIDGE 'S MA RRIED IN 1905 TO GRACE 4i:isi '^ A 4;t ~ *~.* - _ _ _.. — a — J -.j

**PRESIDENTIAL INFORMATION REPORT ** IN 1923 IN 1925 DAWES BORN IN: VERMONT PRESIDENT- E ISENHOWER WAS MARRIED IN- 1916 TO MAMIE HEADED ADMINISTRATIONS V:ICE PRESIDENT IN 1953 NIXON IN 1957 NIXON BORN IN: TEXAS PRESIDENT- FILLMORE WAS MARRIED IN 1826 TO ABIGAIL WAS MARRIED IN 1858 TO CAROLINE HEADED ADMINISTRATIONS VICE PRESIDENT IN 1850 BORN IN:' NEW YORK PRESIDENT- GARFI ELD WAS MARRIED IN 1858 TO LUCRETIA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1881 ARTHUR BORN IN: OHIO PRESIDENT- GRANT WAS MARRIED IN 1848 ra JULIA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1869 COLFAX IN 1873 WILSON BORN IN: OHIO PRESIDENT- HARDING WAS MARRIED IN 1891 TO FLORENCE HEADED ADMINISTRATIONS VICE PRESIDENT -J N.)

PSA VERSION 740710 OCT 6, 1974 19:52.18 PAGE 3 UNIVERSI Y OF MICHIGAN / MITS **PRESIDENTIAL INFORMATION REPORT ** I N 1921 COOL IDGE BORN IN: OHIO PRESIDENT- HARRISON WAS MARRIED IN 1853 TO WAS MARRIED IN 1896 TO HEADED ADMINISTRATIONS IN 1889 BORN IN: OHIO CAROL INE MARY VICE PRESIDENT MORTON PRESIDENT- HARRISON WAS MARRIED IN 1795 TO ANNA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1841 TYLER BORN IN: VIRGINIA PRESIDENT- HAYES WAS MARRIED IN 1852 TO LUCY HEADED ADMINISTRATIONS VICE PRESIDENT IN 1877 WHEELER BORN IN: -OHIO PRESIDENT- HOOVER WAS MARRIED IN 1899 TO LOU HEADED ADMINISTRATIONS VICE PRESIDENT IN 1929 CURTIS BORN IN: IOWA PRESIDENT- JACKSON WAS MARRIED IN 1791 TO RACHEL HEADED ADMINISTRATIONS VICE PRESIDENT IN 1829 CALHOUN IN 1833 VAN BUREN RflnQ tf. c r

%011 a vI-r' DL I -a 'IV FrlA I I I7 j u g IJ **PRESIDENTIAL INFORMATION REPORT ** PRESIDENT- JEFFERSON WAS MARRIED IN 1772 TO MARTHA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1801 BURR IN 1805 CLINTON BORN IN: VIRGINIA PR-ES IDENT- JOHNSON WAS MARRIED IN 1827 TO ELIZA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1865 BORN IN: N.C. PRESIDENT- JOHNSUN WAS MARRIED IN 1934 TO CLAUDIA HEADED ADMINISTRATIONS VICE PRESIDENT I N 1963 IN 1965 HUMPHREY BORN IN: TEXAS PRESIDENT- KENNEDY WAS MARRIED IN 1953 TO JACQUELINE HEADED ADMINISTRATIONS VICE PRESIDENT IN 1961 JOHNSON BORN I-N: MASS. PRESIDENT- LINCOLN WAS MARRIED IN 1842 TO MARY HEADED ADMINISTRATIONS VICE PRESIDENT IN 1861 HAMLIN IN 1865 JOHNSON BORN IN: KENTUCKY I __j. __j 4b I PRESIDENT- MADISON

PSA VERSION 740710 MCT b* 1974 19:52,18 UNIVERSITY OF MICHIGAN / M4TS **PRESIDENTIAL INFORMATION REPORT ** S WAS MARRIED IN 1794 TO DOLLEY HEADED ADMINISTRATIONS VICE PRESIDENT IN 1809 CLINTON IN 1813 GERRY BORN IN: VIRGINIA PRES:IDENT- MCKINLEY WAS MARRIED IN 1871 TO IDA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1897 HOBART IN 1901 ROOSEVELT BORN IN: OHIO PRESIDENT- MONROE WAS MARRIED IN 1786 TO ELIZABETH HEADED ADMINISTRAf IONS VICE PRESIDENT IN 1817 TOMPKINS IN 1821 TOMPKINS BORN IN: VIRGINIA I I! PRESIDENT- PIERCE -WAS MARRIED IN 1834 TO JANE HEA ADED ADMINISTRATIONS IN 1853 BORN IN: N.H. VICE PRESIDENT KING PRESIDENT- POLK WAS MARRIED IN 18-24 TO HEADED ADMINISTRATIONS IN 1845 BORN IN: NoC. SARAH VICE PRESIDENT DALLAS PRESIDENT- ROOSEVELT i~~~~~~~~~~,l~uri

UM L V C 3 ~,,, I-II A,, I I a 1 vw ', I I,, **PRESIDENTIAL INFORMATION REPORT ** HEADED ADMINISTRATIONS VICE PRESIDENT IN 1933 GARNER IN 1937 GARNER IN 1941 WALLACE IN 1945 TRUMAN BORN IN: NEW YORK PRESIDENT- ROOSEVELT WAS MARRIED IN 1880 TO ALICE WAS MARRIED IN 1886 TO EDITH HEADED ADMINISTRATIONS VICE PRESIDENT IN 1901 IN 1905 FAIRBANKS BORN IN: NEW YORK I __J..ar Ot I PRESIDENT- TAFT WAS MARRIED IN 1886 TO HEADED ADMINISTRATIONS IN 1909 8ORN IN: OHIO HELEN VICE PRESIDENT SHERMAN P:ESIDENT- TAYLOR WAS MARRIED IN 1810 TO HEADED ADMINISTRATIONS IN 1849 BORN IN: VIRGINIA MARGARET VICE PRESIDENT FILLMORE PRESIDENT- TRUMAN WAS MARRIED IN 1919 TO ELIZABETH HEADED ADMINISTRATIONS VICE PRESIDENT IN 1945 IN 1949 BARKLEY BORN IN: MISSOURI

PS A VERS ION 740710 %OCT b 6 t9T74 t952. 8 PrAGEV -7 UNIVERSITY OF MICHIGAN / MTS **PRESIDENTIAL INFORMATION REPORT ** PRESIDENT- TYLER WAS MARRIED IN 1813 TO LETITIA WAS MARRIED IN 1844 TO JULIA HEADED ADMINISTRATIONS VICE PRESIDENT IN 1841 BORN IN: VIRGINIA PRESIDENT- VAN BUREN WAS MARRIED IN 1807 TO HEADED ADMINISTRAT IONS IN 1837 BORN IN: NEW YORK PRESIDENT- WASHINGTON WAS MARRIED IN 1759 TO HEADED ADMINISTRATIONS IN 1789 IN 1793 BORN IN: VIRGINIA PRESIDENT- WILSON WAS MARRIED IN 1885 TO WAS MARRIED IN 1915 [O HEADED ADMINI STRATIONS IN 1913 IN 1917 BORN IN: VIRGINIA HANNAH VICE PRESIDENT JOHNSON MARTHA VICE PRESIDENT ADAMS ADAMS ELLEN EDITH VICE PRESIDENT MARSHALL MARSHALL con CDo o(O~== I,