PACER Data Entry, Retrieval, 

and Update for the National Coal 

Resources Data System (Phase I)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%

GEOLOGICAL SURVEY PROFESSIONAL PAPER 978

PAGER Data Entry, Retrieval, 

and Update for the National Coal 

Resources Data System (Phase I)

By S. M. CARGILL, A. C. OLSON, A. L. MEDLIN, and M. D. CARTER 

GEOLOGICAL SURVEY PROFESSIONAL PAPER 978

A set of programs, written in FORTRAN IV, which 

extends the capability of GRASP and which has 

been developed in response to the need for a 

computer-based National Coal Resources Data System

UNITED STATES GOVERNMENT PRINTING OFFICE, WASHINGTON : 1976
UNITED STATES DEPARTMENT OF THE INTERIOR 

THOMAS S. KLEPPE, Secretary

GEOLOGICAL SURVEY

V. E. McKelvey, Director

Library of Congress Cataloging in Publication Data

Main entry under title:

PACER.

(Geological Survey professional paper; 978)

Bibliography: p.

Supt. of Docs. SI 19.16:978

1. National Coal Resources Data System. 2. PACER (computer program) I. Cargill, S. M. II. Series: United

States. Geological Survey. Professional paper; 978. 

Z699.5.C57P3 029.7 75-619422

For sale by the Superintendent of Documents, U.S. Government Printing Office

Washington, D.C. 20402 

Stock Number 024-001-02768-2
CONTENTS

Page

Abstract ____ ____________________ 1

Introduction _ ___________________________________ 1

Scope and purpose ______________________________________ 2

Acknowledgments ___________________________________ 2

Definition of terminology ___________ 2

System description ___ ____________________ 3

PACER search and retrieval operation ____-______________ 3

MERIT data file ___________________________________ 5

WCOAL data file __________________________________ 5

USALYT data file _...._____________________________ 11

Entry of new data ___ 12

Use of the update option ____ __ _ 14

Update procedure 1 ________________________________ 17

Update procedure 2 ________________________________ 20

Update procedure 3 __________________________________ 21

Update procedure 4 _________________________________ 22

Update procedure 5 __________________________________ 23

Use of tabular summary option ____________________________ 23

Example of interactive session _____________________________ 24

Programmer's reference __________________________________ 24

Modifications to GRASP _______________________________ 24

Update programs of PACER _____________________________ 35

References cited _______________________________________ 36

Appendix A. Names used with NCRDS files __________________--_ 38

B. Program listings of modified GRASP routines __________ 52

C. Program listings of PACER subroutines ______________ 61

ILLUSTRATIONS

FIGURE 1. MERIT data-entry form ______________

2. Coal provinces of the conterminous United States

3. Coal regions of the conterminous United States _

4. Coal regions of the Alaska coal province _______

5. Data-entry format for WCOAL _________

6. Data-entry format for USALYT _____ 

7. Example of an interactive session using PACER _

8. Tabular summary of coal resources _______

9. Tabular summary of coal analyses 

10. Subroutine activity flow _____ _________

Page

7

8

9

13

18

19

25

30

33

36

TABLES

TABLE 1. List of PACER commands ___________ _ .

2. List of WCOAL record variables ___ _ _ .

3. Geological age names used with WCOAL and ECOAL

4. List of USALYT record variables ___________.

Page 

4

10

11

15

III
Any use of trade names and trademarks in this publication is for descriptive purposes 

only and does not constitute endorsement by the U.S. Geological Survey.
PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR THE 

NATIONAL COAL RESOURCES DATA SYSTEM (PHASE I)

By S. M. CARGILL, A. C. OLSON, A. L. MEDLIN, 

and M. D. CARTER

ABSTRACT

PACER is a set of programs, written in FORTRAN IV, 

which extends the capability of GRASP and which has been 

developed in response to the need for a computer-based National Coal Resources Data System (NCRDS). PACER allows the user to enter data into one of three files, to search 

for and retrieve records using specific data elements, and to 

modify and update existing data records. All coal resource 

records west of the Mississippi River are grouped into 

WCOAL, whereas those east of the river are grouped into 

ECOAL. Each data record in WCOAL and ECOAL reflects 

a unique tonnage estimate of coal resource in a predefined 

category of thickness, overburden, and reliability of estimate. 

The USALYT file contains published coal analytical data 

and is structured to be as compatible as possible with the 

coal-resource tonnage files; however, it is not yet separated 

into east and west. A detailed description of the files is accompanied by user documentation for the use of the data 

files. A programmer's reference is also included to facilitate 

the installation and use of this software system on other 

computers.

INTRODUCTION

When probability of future energy shortages was 

recognized during the summer of 1973, considerable 

thought was directed to finding substitute sources of 

energy. Particular emphasis was given to studying 

coal in terms of that resource satisfying the energy 

needs of the United States during the interim period 

between the present dominant use of petroleum 

products and the advent of widespread use of fusion, 

solar, geothermal, and other forms of energy. The 

U.S. Geological Survey undertook to develop a computer-based National Coal Resources Data System 

(NCRDS) so that better estimates and evaluations 

could rapidly be made of this huge domestic resource. 

Development of the NCRDS began in July 1974 

along two somewhat parallel paths which have become known as Phase I and Phase II.

Phase I includes retrieval and analysis software 

and three data bases:

1. WCOAL, which contains coal-resource tonnage 

estimates for deposits west of the Mississippi 

River;

2. ECOAL, which contains coal-resource tonnage 

estimates for deposits east of the Mississippi 

River;

3. USALYT, which contains published coal analytical data.

Information is stored in these files in an aggregated 

form, readily accessible for providing resource summaries throughout given geographic regions.

Phase I data records are stored in files which are 

accessed by a modified version of the Geological Retrieval and Synopsis Program (GRASP) (Bowen 

and Botbol, 1975) known as PACER: this is an acronym for Program to Analyze Coal Energy Resources. As of December 1975, the data files WCOAL 

and ECOAL contain nearly 25,000 logical records of 

coal-resource information for deposits east and west 

of the Mississippi River.

These two data files are from different sources. 

WCOAL consists of nearly 16,000 records and is a 

corrected and modified version of the Rocky Mountain Coal Reserve file received from the U.S. Bureau 

of Mines. ECOAL contains coal-tonnage records for 

the States east of the Mississippi River and probably 

will contain about 10,000 records when the file is 

completed in the spring of 1976.

Phase II data bases will include geologic information taken from point sources, such as core samples, 

field observations, and other forms of analysis. The 

software associated with Phase II will be designed 

to process these data so that they may be reduced to 

an aggregated or summary form amenable to Phase 

I applications.
PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

PACER provides the user with access to the data 

in an interactive timesharing mode. The method of 

access to the master data records, using a remote 

terminal, is the main purpose of this report. Some 

new programming has been done to fill the specific 

requirements of the NCRDS and its principal users. 

These new programs are additions to GRASP, as it 

has been published, and, therefore, are included 

herein.

Examples of data are provided for clarity, and a 

sample session is included in a later section to help 

the user understand data relationships in the file. 

Because the file structures of ECOAL and WCOAL 

are identical, all references to WCOAL also apply to 

ECOAL, except where noted.

SCOPE AND PURPOSE

The scope of WCOAL, in terms of data elements, 

is limited to an estimate of coal tonnage for some 

defined area (State, county, township/range, and 

section) and contains specific definition of coal field, 

district, province, region, formation, coal bed, depth 

to coal coal (overburden), reliability of data, rank, 

and thickness of coal. Other incidental information 

includes the source document name from which the 

tonnage estimates were taken and its year of publication; topographic quadrangle name; base year of 

the tonnage estimate; and geologic age by System 

and Series. The scope of USALYT overlaps, to a 

large extent, the data in WCOAL. Replacing data 

such as depth, thickness, reliability, and tonnage 

estimates, are such data elements as sample identification and type, analysis identification and type, ash, 

moisture, fixed carbon, oxygen, hydrogen, and 

nitrogen values.

The purpose of this report is to provide a detailed 

description of how a user may access, enter, modify, 

and delete the data in the Phase I file. The design 

philosophy of PACER, as it pertains to WCOAL 

and USALYT, is also described in detail for the 

benefit of the programmer who wishes to modify the 

system or to install the software on his computer.

The purpose of the project, development of the 

NCRDS, has been to provide a means whereby estimates of coal resources, by a variety of characteristics, can be made accurately and quickly, and 

whereby the data may be updated easily with new 

information.

The PACER system was developed on Computer 

Science Corporation's INFONET timesharing system on a UNIVAC 1108 under the company's General Programming System (GPS). Development of 

PACER took approximately 2 man-years.

ACKNOWLEDGMENTS

Development of Phase I of the National Coal Resources Data System has been facilitated by the use 

of the Rocky Mountain Coal Reserve file from the 

U.S. Bureau of Mines MERIT (Mines Energy Resources, Information, and Transportation) System. 

This file of some 5,000 logical records formed the 

basis of WCOAL, and as such, has been the nucleus 

for Phase I data development.

The authors wish to express their thanks to Roger 

W. Bowen, particularly for his invaluable help in 

converting the original data into GRASP formats 

and generally for his assistance in understanding the 

GRASP system. We also wish to thank Joseph Moses 

Botbol for his continuing encouragement to bring 

the system into production.

DEFINITION OF TERMINOLOGY

Definitions of some computer terminology are 

given to clarify its use in this report.

Interactive. This term implies, in a broad sense, 

reciprocal activity between user and computer. It 

also implies a response to a user-initiated transaction to permit appropriate user action based upon 

timely computer response. The word is closely associated with a sense of immediacy of response 

time: interactive is a matter of degree; therefore, 

a system is less interactive the longer it takes to 

get a response.

Timesharing. This term, in its simplest definition, is 

a computing technique in which several users may 

utilize a computer concurrently for input, processing, and output functions.

Dictionary. The dictionary, or dictionary file, contains 

the alphanumeric entries which are associated with 

a data record. The data record contains not the 

value itself but a "pointer." The pointer is a number that indicates at which sequential position in 

the dictionary file may be found the correct character string value for that data field.

Master file. The master file contains the records of 

the data base. The fields within the record contain 

integer values (for integer data), floating-point 

values (for decimal data), and integer pointers 

(for alphanumeric data). The file is structured 

slightly differently from a conventional GRASP 

numeric master file in that multiple-choice-type 

items are not used, nor is the master file 

compressed.
SYSTEM DESCRIPTION

Mask file. The "Mask file contains the item names, 

item types (integer, real, character string, multiple choice, and qualified real), and pointers to the 

first entry in the dictionary file for each charactertype item" (Bowen and Botbol, 1975, p. 3).

Definitions file. This file contains the acronyms used 

for data variable and the meaning (definition) of 

each acronym. Other record length parameters are 

also defined in this file; however, the reader is referred to the GRASP report (Bowen and Botbol, 

1975) for a detailed description.

Additional data processing definitions may be found 

in "Computer Dictionary" (Sippl and Sippl, 1974), 

or in Calkins and others (1973).

SYSTEM DESCRIPTION

A brief description of procedures and commands 

is provided below for the PACER version of the 

GRASP system. The reader is referred to the more 

detailed description of GRASP (Bowen and Botbol, 

1975) for further clarification of procedures and 

commands. A detailed description of the data bases, 

WCOAL and USALYT, may be found following descriptions of the programs.

PACER SEARCH AND RETRIEVAL OPERATION

After a successful hookup and log-on procedure 

has been completed, the user requests the program by 

typing in the word PACER following the system 

prompt,!. At this point, PACER types a statement informing the user which data files are available for 

use and giving a brief description of the data contained therein, and requests the user to name the 

data file to be accessed.

The user may select one of several commands to 

perform various functions once the system has 

prompted with, ENTER COMMAND. Table 1 lists 

these commands and their meanings. The following 

is a detailed explanation of some of the commands.

COND (condition) requires three entries: acronym/relation/value. The acronym refers to the data 

variable name (for example, STATE), and value is 

the desired value of the variable (for example, 

ALASKA). The relation between these two may be 

expressed by one of the following seven operators:

EQ ____equal to.

NE ____not equal to.

GT ___greater than.

LT ____less than.

LE _ _less than or equal to.

GE ___greater than or equal to. 

BE ____between or equal to.

Examples: STATE EQ WYOMING 

COUNTY EQ JOHNSON 

YEAR BE 1967,1970 

RANK LE SUBBIT 

TONNAGE GT 350.00

Note that all the relational operators may be used 

for both alphabetic and numeric data. This is valid 

for alphabetic data only if they are ordered in such 

a way that their sequence in a list is significant. For 

example, rank of coal (RANK) may be logically ordered in a list so that anthracite (ANTH) tops the 

list, followed by semi-anthracite (SEMI ANTH), 

bituminous (BIT), low-volatile bituminous (LV 

BIT), medium-volatile bituminous (MV BIT), highvolatile bituminous (HV BIT), and lignite (LIGNITE). If the condition were set so that RANK EQ 

LIGNITE, then all lignite records would be retrieved; if RANK GT MV BIT were entered, then 

only LV BIT, SEMI ANTH, and ANTH records 

would be retrieved; if RANK BE MV BIT,ANTH 

were entered, then all records for anthracite, semianthracite, low-volatile bituminous, and mediumvolatile bituminous coal would be retrieved.

Conditions may reflect repeating acronyms and 

relational operators, and each condition is prefaced 

by A, B, C, D, . . ., Z (up to 26 conditions). Thus, 

CONDition A might be STATE EQ MONTANA, 

and CONDition B, perhaps STATE EQ WYOMING. 

It is up to the user to associate these conditions with 

the proper logic to effect the desired retrieval, as 

described below in the command, LOGIC.

PACER will keep printing the next available alphabetic character as it expects another condition. 

If no more conditions are to be entered, the user 

strikes carriage return (CR) without any entry.

LOGI (logic) provides the user with a way to 

associate any two or more conditions specified in the 

CONDition command. Three Boolean logical operators are used to connect one condition with another:

.AND. or * 

.OR. or + 

.NOT. or -

Note that the word operators are bracketed by periods, but that the equivalent symbol operators are not. 

The structure of a LOGIc command allows the user 

to string together as many as 26 conditions (A,B,C, 

... ,Z) with operators as follows:

A.AND.B + C*D
4 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

TABLE 1. List of PACER commands

ENTER COMMAND: HELP

THE COMMANDS WHICH MAY BE ISSUED (AND THEIR MEANING) ARE LISTED BELOW!

CUiMD - INITIATES THE REQUEST FOR RETRIEVAL CRITERIA TO BE tNTERED IN

THE FORM: NAME REL VALUE 

L06I - INITIATES THE REQUEST FOR A LOGICAL EXPRESSION TO 8t ENTERED

USING LOGICAL OPERATORS, 

SEAR - INITIATES THE SEARCH OF A FILE BASED UPON PREVIOUSLY ENTERED

CONDITIONS AND LOGIC. 

LIST - ALLOWS THE USER TO LIST SELECTED VALUES (VARIABLE NAMES WILL

BE ASKED FOR) IN A FILE, 

FILE - ALLOWS THE USER TO SELECT OR CHANGE THE DATA BASE TO BE USED,

QUIT - TERMINATES THE SYSTEM. ENTERING j IN RESPONSE TO A PROMPT WILL 

ALSO STOP THE SYSTEM.

NAME - USED TO PRINT ITEM NAMES* THEIR TYPES AND DEFINITIONS IN A

SELECTED SET OF GROUPS, 

HELP - USED TO OBTAIN THE ABOVE COMMAND DEFINITIONS.

REVI - LISTS THE FILES WHICH HAVE BEEN USED AS WELL AS THE CONDITIONS

ANO LOGIC ENTERED. 

DUMP - PRINTS ALL ITEMS OR SELECTED ITEMS PRESENT FOR EACH RECORD IN A

SELECTED FILE. WAITS AFTtR EACH N LINES. 

FUNC - PROVIDES FOR THE COMPUTATION OF FUNCTIONS ON ITEMS IN A DATA

SET (OR FILE). 

MERG - COMBINES THE CONTENTS OF SEVERAL SELECTED SUBFILES INTO A

SINGLE SUBFILE. 

fABL - PERMITS THE SELECTION OF SPECIALLY SORTED AND FORMAITED

TABULAR OUTPUT DISPLAYS. 

UPDA - PERMITS THE ADDITION* THE DELETIONt OR THE MODIFICAIION OF RECORDS

OR PORTIONS OF RECORDS BELONGING TO THE MASTER FILE.

Parentheses may be used to group specific logical 

relationships, as in the following example:

(A.AND.B + C)*D

The order in which conditions are satisfied is given 

by the Boolean operators: .NOT., .AND., and .OR.

If parentheses are used, they take precedence over 

the order of the operators. In the example above, the 

expression (A.AND.B + C) is evaluated before it is 

combined with D.

SEAR (search) is a function that allows the user 

to actually retrieve the desired data records on the 

basis of the conditions that were logically connected. 

The user must define a new file name which will contain the retrieved records. The new data file thus 

created is a subfile of WCOAL or USALYT and may 

be saved for future study or may be deleted at the

termination of the session using the QUIT command. 

If the file is to be deleted after conclusion of the 

session, the deletion is performed external to 

PACER execution under control of the operating 

system: in the case of INFONET, this is done with 

a IDROP "filename" command directive.

The user may access records in a previously created subfile. He may also combine records residing 

in two separate subfiles, each of which were retrieved 

by two separate searches of the main file, into a 

single subfile through the use of the MERGe command. The user may refine the data contained in a 

subfile by generating new conditions and logic and 

by performing a search of the subfile to satisfy those 

conditions and that logic. A new subfile is then created. Future use of any subfile must be preceded with
SYSTEM DESCRIPTION

a reference to one of the available main files after 

the ENTER DATA BASE NAME command in order 

that all dictionaries are properly linked with the 

data.

The UPDA (update) command is described in detail in a later section because it is a new and extensive modification of the original GRASP system.

Other command options available (table 1) are 

self-explanatory at the time of operation. The user 

should note that the QUIT command terminates 

PACER sessions. The computer system will then 

prompt the user with the names of user files that 

have been created with a request to specify those 

files that are to be saved, perform the indicated file 

maintenance, and followed by a !. The response of 

OFF breaks the link between the terminal and the 

computer.

MERIT DATA FILE

The Rocky Mountain Coal Reserve data file of the 

MERIT System was acquired from the Bureau of 

Mines when it contained some 5,200 records of coal 

resources for States west of the Mississippi River. 

Data records are entered into the MERIT file in an 

80-column card image format, and are put out also 

in an 80-column card image format. Figure 1 shows 

that the system requires the data to be entered on 

four different card types, which are identified in 

column 9 of the form. The first two cards contain 

data pertinent to location and stratigraphy, and the 

third card contains bibliographic data. The fourth 

card contains multiple DCT codes and tonnage estimates. In the DCT code, the D stands for depth to 

coal, the C stands for class, and the T stands for 

thickness of the coal seam; these codes are equivalent 

to Branch of Coal Resources classification nomenclature, ORT (overburden, reliability, and thickness) . The four physical records (card types) constitute one logical record.

WCOAL DATA FILE

The WCOAL file is a modified version of the 

MERIT file in that several Bureau of Mines data 

elements have been removed and new Geological 

Survey data elements have been added. The following data fields have been retained from the indicated cards of the MERIT record:

Card No. 1. .P.M.

TOWNSHIP NO. 

RANGE NO.

Card No. 2.

Card No. 3.

Card No. 4.

E/W

SEC. NO.

COAL FIELD NAME

FORMATION NAME 

.__SEAM NAME

RANK NAME 

.__DATA SOURCE

YR. OF PUBL. 

.__DCT ) all

TONNAGE ) values.

In addition, three other Bureau of Mines variables 

have been retained, the names of which do not appear in the data entry form shown in figure 1, but 

which are a part of the MERIT file. From card No. 

3, Quadrangle Name (QUAD) and Base Year 

(BYEAR) have been retained. The first three variables of each card, FIPS State code, FIPS county 

code, and a record sequence number, have been 

lumped together to form a single WCOAL variable 

called ID.

All other data fields have been deleted from each 

of the MERIT records because either the data contained in the field are inconsistent, or the data are 

infrequently, if ever, entered for the variable, or 

they are anticipated not to be applicable to Phase I 

of the NCRDS. The remaining data fields and the 

additional new fields, when strung together, form a 

single physical and logical record. In the MERIT 

system, the State code, county code, and sequence 

number together are repeated from card to card as 

the logical link between the several physical records.

In WCOAL, however, the emphasis has changed 

from that of location to the use of ORT codes and the 

corresponding tonnage values as the basis for a 

unique record. Only one set of ORT codes and one 

tonnage value are provided per record. The effect of 

this change has been to create WCOAL as a file of 

15,972 unique tonnage records.

Each record has been expanded from the abbreviated Bureau of Mines record to include eight new 

variables:

STATE _____State name (not FIPS code). 

COUNTY ___County name (not FIPS code). 

AAPGPRV ___AAPG province number. 

COALPRV ___Coal province name. 

REGION ___Coal region name. 

DISTRCT ___Local area designator. 

SYSTEM ___Geologic age: System. 

SERIES ____Geologic age: Series.
PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

WCOAL, therefore, is composed of records from 

Bureau of Mines and Geological Survey files. Each 

record is organized into four categories:

Location information. 

Geologic designations. 

Bibliographic information. 

Resource delimiters.

Table 2, list of WCOAL record variables, provides a 

complete list of the variables, in their proper sequence, that make up one WCOAL record. Within 

each category is listed the variable name or mnemonic, its data type code, and a description. PACER allows one of the three data type codes to be associated 

with any variable:

I = whole numbers (integer values) 

R = decimal numbers (real values) 

A = alphanumeric strings

The appropriate type code for each item is shown 

in table 2. Although each variable is briefly described in table 2, some further elaboration of the 

data elements is useful, especially as to the purpose 

of some of the items. Therefore, each variable is 

described below, with specific reference to appendix 

A, which shows the names each variable can assume 

as listed in WCOAL dictionaries.

STATE name is used in preference to the FTPS 

(U.S. Natl. Bur. Standards, 1973) State code because the name is more readily known to the user.

COUNTY name is also used instead of the FIPS 

county code. A list of all county names and the associated State is available from a U.S. National Bureau of Standards (1973) publication and is not 

provided.

PMERID is the principal meridian from which a 

township/range survey was begun, and is given as a 

numeric code in WCOAL records. Appendix A.I lists 

the meridians and baselines of the United States 

rectangular surveys, as provided by the Bureau of 

Land Management, as well as the Bureau of Mines 

code associated with each name.

TWNSHIP is the township number of the township/range survey. Three digits are provided for the 

town-ship number, allowing values from 001 to 999. 

However, no provision has been made for half townships.

NS is the township direction, north or south.

RANGE is the range number, and, like TWNSHIP, three digits are allowed with no provision for 

half ranges.

EW is the range direction east or west.

SECTION is the section number within a township/range unit. This is a two-digit value usually 

between 01 and 36.

AAPGPRV is the AAPG (American Association 

of Petroleum Geologists) province number (Meyer, 

1970). The purpose of using this number is to provide a link between the National Coal Resources Data 

System and other national energy data systems. The 

associated geologic provinces, districts, basins, and 

so on, do not necessarily correspond from one resource to another.

COALPRV is the coal-province name. Figure 2 

shows the coal provinces of the conterminous United 

States, Alaska being an additional province.

REGION is the coal-region name and is a subset 

of coal provinces. Figure 3 shows the coal regions of 

the conterminous United States, and figure 4 shows 

the coal regions for the Alaska province. The coal 

regions for the lower 48 States correspond to those 

given by Trumbull (1960), but no previous designations have been given to the regions of the Alaska 

province as shown in figure 4, although the base map 

from Barnes (1961) has been used. Appendix A.2 

provides a list of the region names available for use 

with WCOAL.

FIELD is the coal-field name. A complete list of 

coal-field names used in WCOAL may be found in 

appendix A.3.

DISTRCT is a local area designator applicable 

mainly to the Alaskan areas. These names are, in 

many cases, interchangeable with field names, implying no hierarchical difference between district 

and field. Appendix A.4 lists all names which are 

used with WCOAL and which are in the coal district 

dictionary.

FORMATN is the formation name. A complete 

list of formation names used in WCOAL may be 

found in appendix A.5.

BED is the coal-bed name. A complete list of coalbed names used in WCOAL is provided in appendix 

A.6.

Neither FORMATN nor BED contains a complete 

list of formation or coal-bed names. The list currently in use is predominantly that compiled by Bureau 

of Mines engineers using Geological Survey publications, and other documents, for the compilation. This 

list will be modified for use in NCRDS.

SYSTEM is the geological age designation. The 

following system names are in use with WCOAL: 

Tertiary, Cretaceous, Jurassic, Triassic, Permian, 

Pennsylvanian, and Mississippian.

SERIES is the name given to a divided system.
SYSTEM DESCRIPTION

go£o

hJ 

O 0i8£w

S

fct

<, tj

M 

 11

t-1

NOI o

 E

<

ft

1uI

Ul S

IS

II?<oPtL. 1Zi

X.sjs^*g^L

19V

TON

MU SH11

_---------

2

ff1i2|[[38!

fc*n=Bii U

X 

Ul

Ult

u.

tn

X X

 c1«2

2 C 8<Ia2

a <

u If

i^?TXi

8

TMlCKNC

0X1ii;

Ul B1> .----.--

CM---

O*sCg23121s1ssI2iJ:i =s!i

J <ii»

KS

U, ^

j Itl

Ul u

(E§1

----

toItl e§ 2

i 3iSuiP

fp

zP ! g t1

TONNAGE y

i

i 

Id

I £k 1 ---

51---

2 S

£ k2k{g^If{i

s i!!Pk1 =e*» »»1 .--.--.-- -.--.----- .-.----- .-.-------- .-------

.2 

8 J

7*!J

"« A D 0

CM ^ T«i *P

.1 s' $ -' 

"2 CM A CM

 CM l«i ^

|

.SH

XI I 1 "8 "8 "2

S xi £ S

I 1 £ I

 CM K5 *

XI ^^ * *

^rf* cl 0

J*JJ

st S §i

O CM 1* -i 

l^tl

Si S c$ A

 CM" »o ^= t

vt

UJ s

1- 

U O

 §
PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

500 MILES

500 KILOMETRES

EXPLANATION

Provinces

1 Alaska (see fig. 4)

2 Eastern

3 Gulf

4 Interior

5 Northern Great Plains

6 Pacific Coast

7 Rocky Mountain

Types of coal in fields

Anthracite

Low-volatile 

bituminous

Medium- and highvolatile bituminous

FIGURE 2. Coal provinces of the conterminous United States. (Modified from Trumbull,

1960.)
SYSTEM DESCRIPTION

500 MILES

500 KILOMETRES

EXPLANATION 

Regions

1

2

3

4

5

6

7

8

9

10

11

12

Rhode Island meta-anthracite

Pennsylvania anthracite

Atlantic coast

Appalachian

Northern

Eastern

Western

Southwestern

Mississippi

Texas

Fort Union

Powder River

13 Black Hills

14 North Central

15 Tertiary lake beds

16 Bighorn Basin

17 Wind River

18 Hams Fork

19 Uinta

20 Southwestern Utah

21 San Juan River

22 Raton Mesa

23 Denver

24 Green River

See figure 2 for explanation 

of pattern areas

FIGURE 3. Coal regions of the conterminous United States. (Modified from Trumbull,

1960.)
10 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

TABLE 2. List of WCOAL variables

LOCATION INFORMATION 

GEOLOGIC DESIGNATIONS 

BIBLIOGRAPHIC INFORMATION 

RESOURCE DELIMITERS

STATE STATE NAME

COUNTY COUNTY NAME

PMERIO PRINCIPAL MERIDIAN

TWNSHIP TOWNSHIP NUMBER

NS DIRECTION OF TOWNSHIP (N OR S)

RANGE RANGE NUMBER

EW DIRECTION OF RANGE (E OR W)

SECTION SECTION NUMBER

AAPGPRV AAPG PROVINCE NUMBER

COALPRV COAL PROVINCE NAME

REGION COAL REGION NAME

FIELD COAL FIELD NAME

DISTRCT LOCAL AREA DESIGNATOR

FORMATN FORMATION NAME

BED COAL BED NAME

SYSTEM GEOLOGIC AGE I SYSTEM

SERIES GEOLOGIC AGEl SERIES

QUAD A TOPOGRAPHIC QUADRANGLE NAME

BYEAR I BASE YEAR FOR TONNAGE ESTIMATES 

00 MEANS ORIGINAL DATA 

51 MEANS DATA TAKEN AS OF 1951

SOURCE A SOURCE DOCUMENT

YEAR I PUBLICATION YEAR OF SOURCE DOCUMENT

THICKNS I COAL BED THICKNESS CODE

OVR8RDN I OVERB ROEN THICKNESS IN FEET

RELIABL I RELIA ILITY CODE

14 TO 28 INCHES 

28 TO 42 INCHES 

GREATER THAN 42 INCHES 

2.5 TO 5 FEET

5 TO 10 FEET 

GREATER THAN 10 FEET 

UNCLASSIFIED 

CLASSIFIED BY ZONE

0 TO 3000

0 TO 2000

0 TO 1000 

1000 TO 2000 

2000 TO 3000 

GREATER THAN 3000 

STRIPPABLE 

UNCLASSIFIED

RANK A

1 MEASURED

2 MEASURED AND INDICATED

3 INDICATED

4 = INFERRED

5 * UNCLASSIFIED 

RANK OF COAL

ANTH » ANTHRACITE 

SEMI ANTH * SEMI-ANTHRACITE 

BIT » BITUMINOUS

TONNAGE I

LV 

MV 

HV 

HV 

HV 

HV

BIT 

BIT 

BIT 

BIT A 

BIT 8 

BIT C 

SUBBIT 

SUBBIT A 

SUBBIT B 

SUBBIT C 

LIGNITE 

COAL RESOURCE

LOW-VOLATILE BITUMINOUS 

MEDIUM-VOLATILE BITUMINOUS 

HIGH-VOLATILE BITUMINOUS 

HIGH-VOLATILE BITUMINOUS A 

HIGH-VOLATILE BITUMINOUS B 

HIGH-VOLATILE BITUMINOUS c

SUB-BITUMINOUS 

SUB-BITUMINOUS A 

SUB-BITUMINOUS B 

SUB-BITUMINOUS C 

LIGNITE 

IN MILLIONS OF SHORT TONS. .

TONNAGE RECORD EXISTS FOR EVERY UNIQUE COMBINATION OF THICKNESS CODE* OVERBURDEN COOE» RELIABILITY CODEt RANK CODE* AND LOCATION CATEGORY* 

AS WELL AS CERTAIN STRATIGRAPHIC DESIGNATIONS.
SYSTEM DESCRIPTION 11

Series names in use with WCOAL are Eocene, Lower, Middle, Miocene, Oligocene, Paleocene, Pliocene, 

and Upper.

Table 3 shows the ordered relationship between 

System and Series. Note that the repetition of Series 

names from one System to another has no effect on 

their use, because each requires only one dictionary 

entry.

TABLE 3. Geological age names used with WCOAL and 

ECOAL

System

Tertiary _ _ ___ __ _ _ _ _.

Cretaceous __ _ _____ .

Jurassic _ ______ __ __ _.

Triassic _____________ .

Permian _ _ __ _______

Pennsylvania!! _ __ __.

Mississippian ________ .

Series

_____ Pliocene

Miocene

Oligocene

Eocene

Paleocene

___ Upper

Lower

_____ Upper

Middle

Lower

___ Upper

Middle

Lower

 Upper

Lower

_ Upper

Middle

Lower

Upper

Lower

QUAD is the topographic quadrangle name and 

refers to the quadrangle for which the resource tonnage was made. Often the quad name is not known 

or is not unique to the tonnage record. Therefore, the 

present list of quadrangle names given in appendix 

A.7 is very brief.

BYEAR is the base year for which estimates were 

made of the tonnages of coal. As an example, 51 indicates that the estimates are for remaining resources 

as of 1951; 00 indicates that the tonnage estimate is 

of original coal resources.

SOURCE is the publication from which the data 

were taken. Appendix A.8 lists these publications.

YEAR is the publication year of the source 

document.

THICKNS is the coal thickness code. The name of 

this variable corresponds to the Bureau of Mines "T" 

for thickness in the DCT code. The possible values of 

THICKNS are shown in table 2.

OVRBRDN is the overburden thickness code. 

The name of this variable corresponds to the Bureau 

of Mines "D" for depth in the DCT code, but the

categories have been renumbered to permit a search 

over a range of overburden depths. The possible 

values of OVRBRDN are shown in table 2.

RELIABL is the reliability code given to a tonnage estimate. The name of this variable corresponds to the Bureau of Mines "C" for class in the 

DCT code. It also has been renumbered to permit a 

search over a given range. The possible values of 

RELIABL are shown in table 2.

RANK is the name given for the quality of coal 

in terms of energy content. Fourteen rank categories 

are provided in the list; they range from anthracite 

to lignite. The order of these ranks is such that the 

user may enter ranges of rank (for example, RANK 

BE HV BIT,SUBBIT) as a condition.

TONNAGE is the estimated coal resource in millions of short tons to two decimal places. A tonnage 

value exists for every unique combination of thickness code, overburden code, reliability code, and 

location.

USALYT DATA FILE

A review of the published coal analytical data revealed that it was not feasible to add this type of 

data to the existing area/tonnage records of the 

WCOAL file, as there were few, if any, areas of 

direct correlation. Therefore, a separate data base 

of published coal analytical data is maintained as the 

file USALYT on the PACER system; it is accessed 

by specifying USALYT for the ENTER DATA 

BASE NAME command. This file uses the same dictionaries as WCOAL; however, it has separate mask 

and definitions files for the 46 data items, as shown 

in table 4.

The two files were structured as closely alike as 

possible to facilitate retrieval and correlation of data 

by the user. A comparison of tables 2 and 4 shows 

that the location, geologic, and bibliographic fields 

are the same as in WCOAL, with the exception of 

the item BYEAR (base year). BYEAR is not applicable to the type of data in USALYT. For this 

reason, the resource delimiter fields also have been 

deleted, with the exception of RANK. The following 

is an expansion of the brief definitions given in table 

4 of the additional data items for USALYT:

ANIDA is the alphabetic part of the analysis 

identification number. Some of the reported analyses 

have alphanumeric identification numbers. Because 

PACER treats alphanumeric data as dictionary 

items, the identification number is recorded in two 

parts. This dictionary contains the 26 letters of the 

alphabet.
12 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

ANIDN is the numeric part of the reported analysis identification number.

SAMPTYP is a numeric code to indicate the type 

of sample on which the analysis was done.

ANLYTYP is a numeric code to represent the 

condition of the sample when it was analyzed.

VALREP is a numeric code indicating the type of 

data that the individual values represent, such as an 

average of several samples or a single sample.

TRACE indicates by Y=yes or N = no whether 

the analysis included trace-element values. These 

values are not included in the data file, because their 

occurrence in the Phase I published analytical data 

is rare but could be retrieved from the original 

source.

HGRIND represents the result of a Hardgrove 

grindability test on the sample.

OTHER indicates by Y = yes or N = no whether 

other types of tests were reported in the analysis. 

Results of these tests are not in the data file but 

could be retrieved from the data source.

BTU is the energy value of the coal reported in 

British thermal units. If the value is reported in 

other units it has been converted.

ASH: [DEFORM], [SOFT], [FLUID] indicate 

the temperature in degrees Fahrenheit at which the 

ash deforms, softens, or fluidizes. If the reported 

values were in another form, they have been 

converted.

The final 12 items are the proximate and ultimate 

analysis values. All items are reported in percent to 

one decimal place.

ENTRY OF NEW DATA

Since the creation of the initial WCOAL file from 

the U.S. Bureau of Mines data tape, data entry has 

been accomplished using a SYCOR model 340 programmable terminal. The data entry format for 

WCOAL (fig. 5) is displayed on the terminal CRT, 

and the data items are entered and checked by programs, as described below. These data-entry controls are indicated by the character or number 

immediately following the data label, which is enclosed in brackets. The SYCOR programming system reserves symbols W, X, Y, and Z to call userwriter field programs. Therefore, these symbols 

below may call different programs, according to the

TWN and RNG 

NS and EW __.

data-field name. The data fields have been arranged 

to allow all data belonging to one record to be displayed on the screen at one time. The data-entry 

format is programmed to move the cursor to each 

data field according to groups of related information. Data-entry control characters for the WCOAL 

format include:

STATE and COUNTY __5] Alphabetic data must

be entered.

PMD ___________X] The cursor skips to the

APG data item, if a 

blank or zero (0) is entered, because it is assumed that no township 

and range information 

is available if the principal meridian is unknown.

__N] A numeric entry is 

required.

__W] The value entered is 

compared with a table 

of acceptable values, 

and an error message is 

displayed if no match is 

found.

__A] The data must be alphabetic.

__W] The cursor skips to the 

next line in order to 

maintain logical data 

entry from reporting 

forms.

__W] The cursor skips intervening data fields so 

that these items may be 

entered consecutively. 

Format control then 

passes to the next entry 

on the reporting form.

__W] The cursor skips fields 

on the screen so that 

these items can be entered consecutively. 

Each of these items is 

also compared with a 

table of acceptable values in order to reduce 

data-entry errors.

QDR ____________M] An alphanumeric value may be entered.

PRV, FLD, FMN 

RGN, DST, BED

THK, OVB, REL

SYS, SER, RNK
ENTRY OF NEW DATA 13

168"

164 EXPLANATION

Regions

1 Alaska Peninsula

2 Cook Inlet-Susitna

3 Central Alaska

4 Northern Alaska

5 Southeastern Alaska

Shaded areas and x 's indicate 

known coal deposits

/c

INDEX MAP OF ALASKA

100 200 300 400 500 MILES

0 100 200 300 400 500 KILOMETRES

FIGURE 4. Coal regions of the Alaska coal province. (Modified from Barnes, 1961.)

BYR

SRC

-X] The data value is 

checked against an acceptable range of values, and an error message is printed if the 

comparison fails.

.A] Some alphanumeric 

data must be entered in 

this field.

YR

ID

.X] The cursor skips to the 

ID field, after the user 

presses the TAB/SKIP 

key.

.X] The cursor skips to the 

TON field, after the 

user press the TAB/ 

SKIP key.
14 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

TON ____________Z] The data entry will be

checked for a value with 

two decimal places. Any 

other value range will 

cause an error message 

to be printed. 

[*], [C] These symbols 

are constant field indicators which contain a 

line feed character for 

continuous transmission, because the record 

exceeds the 256-character buffer available in 

the SYCOR terminal.

Data entry to file USALYT requires a two-page 

SYCOR format shown in figure 6. Page 1 has dataentry restrictions similar to the WCOAL format. 

Page 2 data fields include the following controls:

ANIDA

ANIDN, S-TYPE

A-TYPE, VAIAREP, 

HRDGV-AGRIND, 

TRACE, OTHER. 

BTU,ASH (DBF SOF 

FLD), FREE-SWELL. 

MOISTUR, VOL-MAT, 

FIXEDC, ASH, 

HYDROGN,CARBON, 

NITROGN, OXYGEN, 

SULFUR, SULFATE, 

SULFPYR, SULFORG.

.A] Only alphabetic data 

entry is acceptable.

.N] Only numeric data can 

be entered.

A] Alphabetic data only.

N] Numeric data.

Z] The format checks for 

a numeric entry with one 

decimal place. Any other 

entry will result in an 

error message. The \ 

character indicates succeeding data fields with 

the same "Z" control.

USE OF THE UPDATE OPTION

The update software permits the user to edit 

and update data in the master file while operating 

in an interactive mode from a remote terminal. 

The following update procedures are available for 

the user to:

1. Add new records to the master file;

2. Delete existing records from the master file;

3. Sequentially review and modify records existing 

in a subfile of the master file and, 'upon completion of the review, post the subfile onto 

the master file;

4. Select, by a key, a record residing in a subfile of 

the master file, review the contents, modify

the data, and post the individual record onto 

the master file;

5. Modify the value of a given data element for all 

the records existing in a specific subfile and 

then post the contents of this subfile onto the 

master file.

To use the update system, the user must first access the host computer from his terminal. After 

the appropriate identification has been entered, the 

computer will begin a new line with the character ! 

which is the prompt for the user to type in the 

program name, PACER, followed by a carriage return. This command accesses the PACER program 

and begins execution with the message:

WELCOME TO THE USGS "PACER" VERSION 

OF THE "GRASP" RETRIEVAL SYSTEM. 

THE FOLLOWING DATA BASES ARE 

AVAILABLE:

ECOAL USGS EASTERN

SOURCES DATA 

WCOAL USGS WESTERN

SOURCES DATA 

USALYT PUBLISHED US

CAL DATA

US COAL REUS COAL RECOAL ANALYTIThe user must specify one of the above data bases 

at the prompt for a data base name, ENTER DATA 

BASE NAME. A new master file data base may be 

selected at any time during a user session by entering the word, FILE, following the prompt, 

ENTER COMMAND.

When the prompt, ENTER COMMAND, is again 

displayed on the terminal, the user may proceed 

immediately to update, by entering UPDAte, if he 

has a new data file or a subfile of the master file 

available for editing. If not, he may select a subfile of records to be edited by proceeding through 

the standard search procedure, specifying the sequence of commands CONDitions, LOGIc, and 

SEARch, each followed by the appropriate information as documented in the GRASP literature.

Assuming that the user either has a new data 

file or has generated a subfile of records which require updating, he will respond to the next ENTER 

COMMAND prompt with the entry of UPDAte. 

The message, PLEASE PRESS CARRIAGE RETURN, will then be displayed. If the user is familiar with the procedures and has knowledge of 

the code for suppressing the output of user instructions (see programmer's reference), he may enter it at this point before pressing the carriage return. If not, he will be presented with instructions 

for the updating procedure as well as special
USE OF THE UPDATE OPTION

TABLE 4. List of USALYT record variables

15

LOCATION INFORMATION 

6EOL06IC DESIGNATIONS

BIBLIOGRAPHIC INFORMATION 

RANK INFORMATION 

ANALYSIS INFORMATION

STATE

COUNTY

PMERID

TWNSHIP

NS

RANBE

EM

SECTION

AAPGPRV

COALPRV

REGION

FIELD

DISTRCT

FORMATN

BED

SYSTEM

SERIES

QUAD

SOURCE

YEAR

RANK

ANIOA 

ANIDN

SAMPTYP i

ANLYTYP I

STATE NAME

COUNTY NAME

PRINCIPAL MERIDIAN

TOWNSHIP NUMBER

DIRECTION OF TOWNSHIP (N OR S)

RANGE NUMBER

DIRECTION OF RANBE (E OR W)

SECTION NUMBER

AAPG PROVINCE NUMBER

COAL PROVINCE NAME 

COAL REGION NAME 

COAL FIELD NAME 

LOCAL AREA DESIGNATOR 

FORMATION NAME 

COAL BED NAME 

GEOLOGIC AGE! SYSTEM 

GEOLOGIC AGE! SERIES

TOPOGRAPHIC QUADRANGLE NAME

SOURCE DOCUMENT

PUBLICATION YEAR OF SOURCE DOCUMENT

fUNK OF COAL 

ANTH

SEMI ANTH 

BIT

LV BIT 

MV BIT 

HV BIT 

HV BIT A 

HV BIT B 

HV BIT C 

SUB9IT 

SUBBIT A 

SUBBIT B 

SUBBIT C 

LIGNITE

ANTHRACITE 

SEMI-ANTHRACITE 

BITUMINOUS

LOW-VOLATILE BITUMINOUS 

MEDIUM-VOLATILE BITUMINOUS 

HIGH-VOLATILE BITUMINOUS 

HIGH-VOLATILE BITUMINOUS A 

HIGH-VDLATILE BITUMINOUS B 

HIGH-VOLATILE BITUMINOUS C 

SUB-BITUMINOUS 

SUB-BITUMINOUS A 

SUB-BITUMINOUS 8 

SUB-BITUMINOUS C 

LIGNITE

REPORTED ANALYSIS IDENTIFICATION (ALPHABETIC) 

REPORTED ANALYSIS IDENTIFICATION (NUMERIC) 

SAMPLE TYPE

1 » CHANNEL

2 » RUN OF MINE

3 DRILL CORE

4 » OTHER 

ANALYSIS TYPE 1234

5 

VALREP I VALUES

TRACE 

HGRIND 

OTHER 

BTU 

ASHDEF 

ASHSOF 

ASHFLD 

FRESWEL R 

MOISTUR R 

VOLMAT R 

FIXEDC R 

ASH R

HYDROGN R 

CARBON R

NITROGN R 

OXYGEN R 

SULFUR R 

SULFATE R 

SULFPYR R 

SULFORG R

AS RECEIVED 

AIR DRIED 

MOISTURE FREE 

MOISTURE AND ASH FREE 

OTHER

REPRESENT

1 SINGLE SAMPLE

2 AVERAGE OF MORE THAN ONE SAMPLE

3 RANGE OF SAMPLE VALUES

4 OTHER

SAMPLE ANALYZED FOR TRACE ELEMENTS(Y»YES N»NO>

HAROGROVE GRINDABILITY INDEX

RESULTS OF OTHER TESTS SHOWN ON ANALYSIS

BTU VALUE

ASH DEFORMATION TEMPERATURE IN FAHRENHEIT

ASH SOFTENING TEMPERATURE IN FAHRENHEIT

ASH FLUID TEMPERATURE 'N FAHRENHEIT

FREE-SWELLING INDEX

MOISTURE VALUE IN PERCENT

VOLATILE MATTER VALUE IN PERCENT

FIXED CARBON VALUE IN PERCENT

ASH VALUE IN PERCENT

HYDROGEN VALUE IN PERCENT

CARBON VALUE IN PERCENT

NITROGEN VALUE IN PERCENT

OXYGEN VALUE IN PERCENT

TOTAL SULFUR VALUE IN PERCENT

SULFATE VALUE IN PERCENT

PYRITIC SULFUR IN PERCENT

ORGANIC SULFUR IN PERCENT
16 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

instructions for any of the five procedures he may 

select. If the user does not enter the instructionsuppression code, the following message will be 

displayed:

THIS IS "UPDATE"

IT IS DESIGNED TO PERMIT THE USER TO 

ADD RECORDS TO OR DELETE RECORDS 

FROM THE MASTER FILE, OR TO CHANGE 

RECORDS OR PORTIONS OF RECORDS IN A 

SUBFILE OF THE MASTER FILE AND TO 

POST THESE CHANGES ONTO THE MASTER 

FILE.

THE FIVE PROCEDURES USED TO UPDATE 

THE MASTER FILE ARE:

1. THE ADDITION OF NEW RECORDS ALREADY WRITTEN INTO A TEMPORARY 

FILE. UNLIKE THE OTHER UPDATE PROCEDURES WHICH OPERATE ON RECORDS 

IN THE MASTER FILE FORMAT, THIS 

PROCEDURE OPERATES ON RAW DATA 

RECORDS AND CONVERTS THESE RECORDS TO THE MASTER FILE FORMAT FOR 

INSERTION INTO THE MASTER FILE.

2. THE DELETION, BY KEY, OF RECORDS 

ALREADY EXISTING IN THE MASTER 

FILE.

3. THE SEQUENTIAL REVISION OF RECORDS FROM A SELECTED SUBFILE (I.E. 

SELECTED THROUGH A LOGICAL 

SEARCH) FROM THE MASTER FILE. THIS 

SUBFILE MAY THEN BE POSTED ONTO 

THE MASTER FILE AFTER THE DESIRED 

REVISONS ARE COMPLETED.

4. THE SELECTION, BY KEY, OF ANY RECORD BELONGING TO THE SUBFILE FOR 

REVISION OF ANY SELECTED DATA ELEMENT. THE DATA MANAGER HAS THE 

OPTION OF POSTING THE SELECTED 

RECORD ONTO THE MASTER FILE OR 

LEAVING IT, AS REVISED, IN THE SUBFILE FOR FURTHER REVISION.

5. THE BATCH REVISION OF A GIVEN DATA 

ELEMENT WHICH WILL BE THE SAME 

VALUE FOR ALL RECORDS IN THE SELECTED SUBFILE.

WHEN REVISION HAS BEEN COMPLETED 

ON ANY SELECTED SUBFILE, THE USER 

MAY THEN ELECT TO POST THE REVISED 

SUBFILE ONTO THE MASTER FILE, OR SAVE 

THE SUBFILE FOR REVIEW AND POSSIBLE 

FURTHER REVISION BY ANY OF THE 2-5 UPDATE PROCEDURES. RECORDS DELETED 

FROM THE MASTER FILE ARE SAVED IN 

THE "SAVDEL" (SAVE DELETION) FILE FOR 

FUTURE RECOVERY IF THERE SHOULD 

ARISE A NEED TO RECONSTITUTE THESE 

RECORDS.

An output display of each record reviewed is provided automatically for the deletion procedure, the 

sequential revision procedure, and the keyed revision procedure. The display of each record for 

correct data is optional when adding new records, 

but need not be used because dictionary nonmatches 

will be displayed to the data manager at the time 

of record entry. No display is associated with the 

batch revision because normally this revision will 

be made to a larger number of records, and such 

a display would inhibit the speed of the batch revision. If a display is desired following the batch 

revision, the data manager can choose to omit posting the revised subfile to the master file. He may 

then select the sequential or the keyed revision procedure to review the record and perhaps further 

update the subfile before posting it onto the master 

file.

The output display for the editing of records is 

formatted so that the data-element positions are 

similar to those positions in the SYCOR formats 

for data input, as discussed in the section on entry 

of new data. The example below is the formatted display which is used for the interactive edit and update procedures of PACER when used to operate 

on records from the WCOAL file:

* * * * * * * * *

STATE: 

PMERID:

COALPRV:

FIELD:

FORMATN:

SYSTEM: 

SERIES:

WYOMING COUNTY: CAMPBELL

6 TWNSHIP: 58 NS: N RANGE: 76 EW: W SECTION: 0 AAGPRV: 0

NO DATA ENTERED REGION

SPOTTED HORSE DISTRICT

FORT UNION BED:

NO DATA ENTERED QUAD

NO DATA ENTERED SOURCE:

NO DATA ENTERED 

NO DATA ENTERED 

CANYON

THICKNS: 4

OVRBRDN: 3

RELIABL: 2

RANK: SUBBIT ID: 56005005 . . . KEY:

USGS BULL 1050 YEAR: 

KEY: 13159 TONNAGE:

BYEAR: ** 

1957

11.80

* * * * * * * * *
USE OF THE UPDATE OPTION 

The display of records from the USALYT file is shown in the following example:

17

* * * * * *

STATE :

PMERID :

COALPRV:

FIELD :

FORMATN :

SYSTEM:

SERIES:

RANK:

TRACE :

NORTH DAKOTA

5 TWNSHIP: 121 NS: N

N GREAT PLAINS

NO DATA ENTERED

FORT UNION

TERTIARY

PALEOCENE

LIGNITE ANID: NO

]

N HGRIND: 0

COUNTY: ADAMS 

RANGE: 95 EW: W SECTION: 10 AAPGPRV: 395

REGION: FORT UNION

DISTRICT: NO DATA ENTERED

BED: NO DATA ENTERED

QUAD: NO DATA ENTERED

SOURCE: NDU DIV MIN CIRC 8 YEAR: 1934

10316 SAMPTYP:! ALYTYP: 1 VALREP: 1 

	OTHER TESTS: N

BTU: 6820 ASH: (DEFORM) 0 (SOFT) 0 (FLUID) 2280 FRESWEL: 0.

MOISTUR 

35.6

OXYGEN 

0.

VOLMAT 

29.6

SULFUR 

2.7

FIXEDC 

26.9

SULFATE 

0.

ASH 

0

HYDROGN 

0

CARBON

0

SULFPYR 

0.

SULFORG 

0.

NITROGN 

0

KEY: 

529

* * * * * * * * * *

Procedure 1 is selected for the addition of new 

records to the master file. Before this procedure 

can be used, a file of new data must be entered 

into the host computer system. Although there are 

many ways to create a file of new data, the method 

used predominantly will be to enter the data records 

onto a tape cassette through the SYCOR terminal 

and then to use the terminal to transmit these records to the host computer.

The file containing the new data is structured so 

that each record is an unformatted, but fixed length, 

string of characters (including blanks). This character string must be translated through a format to 

obtain the internal machine language values from 

the numerical data and to determine whether there 

is a dictionary match for the alphanumeric data. If 

a match is found, the numerical pointer to that dictionary entry is determined. If there is no dictionary entry match for the given item of alphanumeric data, the user is given the option of adding 

that data value to the dictionary or of correcting 

the data input (that is, a spelling error) so that 

it will match an existing dictionary entry.

After the user has completed the translation 

phase for the new data, he may elect either to post 

the translated file directly to the master file or to 

save it for further editing and revision by means of 

procedures 3 through 5 before posting it to the 

master file.

UPDATE PROCEDURE 1

Selection of update procedure 1 will produce the 

following message on the user terminal:

THE ADD RECORD PROCEDURE IS DESIGNED TO READ A RAW DATA INPUT FILE 

AND CONVERT THE RECORDS TO THE RECORD STRUCTURE THAT IS COMPATIBLE WITH 

THE MASTER FILE OF "PACER," CHECKING 

FOR CORRECT DICTIONARY ENTRIES, AND 

PROMPTING THE DATA MANAGER TO REQUEST ADDITION OF THE NONMATCHING 

DICTIONARY ENTRIES TO THE DICTIONARY 

LIST OR TO CORRECT THE INPUT ENTRY SO 

THAT IT MATCHES A VALUE ALREADY IN 

THE DICTIONARY LIST.

IF THE INPUT FILE DOES NOT CONTAIN 

RAW DATA, THE DATA MANAGER CAN EXIT 

THIS REVISION PROCEDURE TO SELECT A 

DIFFERENT PROCEDURE (3-5) BY ENTERING "QUIT," WHEN PROMPTED FOR A FILE 

NAME.

If the appropriate instruction-suppression code 

has previously been entered, this message will also 

be suppressed. Next, the user will be prompted 

with NAME OF RAW DATA INPUT FILE. The 

response to this prompt must be either the name 

of the newly created raw-data file or the word 

QUIT which will terminate execution of the current update procedure and will permit the user to
18 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

Ml

to

1_1 1 I

1-1 r-i

O 

O

£

I

1 id
USE OP THE UPDATE OPTION 19

Tol

to

Ul

VI

E-t

s

<m

P

I

0

U

1CO

2 fe

TO

II

V)

MHUJ
20 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

select an alternative procedure or return to the 

search and retrieval operation. If the name of the 

raw-data file is properly entered, the user will then 

be prompted for the NAME OF TRANSLATED 

FILE. This name is selected at the user's discretion, 

and care must be taken to ensure that it does not 

coincide with the name of another file already 

existing on that user account number.

Next, the user will be asked if he wishes to have 

the contents of every input record, as corrected for 

any dictionary mismatch, displayed on the terminal. 

A response of YES will display every record, and a 

response of NO will suppress the display. If an 

entry on the record does not match the existing entries in that dictionary, the message, THERE IS 

NO DICTIONARY MATCH FOR DATA NAME 

is displayed, followed by the name of that data 

element, the message ALPHANUMERIC DATA, 

and the displayed data value. The user is prompted 

with DO YOU WISH TO ENTER THIS DATA IN 

THE DICTIONARY? "YES" OR "NO." A YES 

will place that data value in its dictionary, and 

subsequent records containing that data value will 

obtain a dictionary match. If the response is NO, 

the user is prompted with the message, ENTER 

DATA VALUE FOR DATA NAME, in order to 

correct the data value, followed by the data name 

and the message, DATA VALUE. The newly entered data value is again tested for a dictionary 

match, and if found, the record translation procedure continues. If the new data value does not 

have a dictionary match, the user is again queried 

to determine whether he intends to enter that data 

value in the dictionary, or if he wishes to re-enter 

the data value. This cycle will continue until a dictionary entry exists that will match that data 

value.

When all the new data records have been translated, the following message will be displayed:

THE INPUT FILE IS NOW READY FOR POSTING ONTO THE MASTER FILE. IF YOU WISH 

TO MAKE FURTHER CHANGES, TO THIS FILE 

BEFORE IT IS POSTED, SELECT THE SEQUENTIAL, BATCH OR KEYED REVISION 

PROCEDURE AND SPECIFY THE NAME OF 

THIS FILE.

FILE "TEST" HAS BEEN REVISED.

DO YOU WISH TO WRITE THIS FILE ONTO

THE MASTER FILE? "YES" OR "NO":

where TEST, in this case, is the name of the translated file. If the response is NO, the file is saved, 

and the prompt, UPDATE PROCEDURE (1-5), is

again displayed. If the response is YES, the translated file is added to the master file and the user is 

queried with, DO YOU WISH TO SAVE THIS 

FILE? "YES" OR "NO." A YES will save the 

translated file, where a NO will cause the file to be 

dropped. Finally, the message:

UPDATE OPERATIONS HAVE BEEN COMPLETED. IF YOU WISH TO CONTINUE WITH 

THE UPDATE PROCEDURE, ENTER THE 

NUMBER (1-5). ENTERING A "0" FOR THE 

PROCEDURE PROMPT OR "QUIT" FOR THE 

FILE PROMPT WILL RETURN CONTROL TO 

THE SEARCH AND RETRIEVAL PORTION OF 

"PACER."

is displayed followed by the prompt, UPDATE 

PROCEDURE (1-5), to permit further update operations (1-5), or to return to search and retrieval 

(0).

UPDATE PROCEDURE 2

Update procedure 2 is the deletion procedure, 

which is accomplished by specifying the record key 

of records from the master file. The prompt, DATA 

FILE TO BE REVISED, will be for a file that has 

already been selected by a prior logical search for 

records that are to be deleted from the master file. 

If the instruction-suppression code has not been 

set previously, the following message will be displayed on the terminal:

THIS IS THE MASTER FILE RECORD DELETION PROCEDURE. WHEN PROMPTED, THE 

DATA MANAGER WILL SPECIFY THE KEY 

NUMBER OF THE RECORD TO BE DELETED. 

THE DELETED RECORD WILL BE WRITTEN, 

FOR PRESERVATION, ONTO THE "ESAVE," 

"WSAVE," OR "SAVUSA" FILE. THEN, THE 

DATA ELEMENTS IN THE MASTER FILE 

WILL BE BLANKED, AND A NEW IDENTIFICATION NUMBER WILL BE WRITTEN ONTO 

THE MASTER FILE. THIS NUMBER WILL BE 

ENCODED TO CONTAIN THE DATE OF DELETION AND THE IDENTIFICATION NUMBER OF THE DATA MANAGER RESPONSIBLE 

FOR EXECUTING THE DELETION. IN ADDITION, A DELETION MESSAGE WILL BE SUPERIMPOSED OVER SEVERAL OF THE DATA 

FIELDS TO NOTE TO THE USER THAT THAT 

KEY NUMBER NO LONGER HAS A VALID 

RECORD IN THE MASTER FILE.

WHEN THE DATA MANAGER HAS CONCLUDED THE DELETION PROCEDURE,
USE OP THE UPDATE OPTION 21

ENTRY OF A "-1" AT THE PROMPT FOR 

"KEY" WILL END THE PROCESS.

It is presumed that the user has determined, by 

examination of the selected file, which record keys 

will be in the deletion process. He will enter the 

key number following the prompt, KEY JNUMBER OF RECORD TO BE DELETED. This will

cause the data elements to be blanked out in that 

record of the master file having the specified key 

number. A deletion message is inserted in the REGION, DISTRCT, and BED data fields along with 

a coded ID number giving the year, month, and day 

of deletion as well as the data manager identification, as in the following example:

STATE: 

PMERID:

COALPRV:

FIELD:

FORMATN:

SYSTEM: 

SERIES:

RANK:

** TWNSHIP: *** NS:

* * * * * * * * * *

COUNTY: 

RANGE: *** EW: SECTION: ** AAPGRV: ***

REGION: ** RECORD DELETED. . . ** THICKNS : *

DISTRICT: ** SEE "ID" FOR DATE ** OVRBRDN : *

BED: ** AND MANAGER CODE. RELIABL : *

QUAD: 

SOURCE:

ID: 75090299 ... KEY: 13158

BYEAR 

YEAR: ***

TONNAGE: .00

* * * * * * * * * *

For example, the date of deletion is 75 (year), 09 

(month), and 02 (date), and 99 is the data manager identification. The corresponding record in the 

selected subfile is eliminated entirely. This prevents 

that record from being posted onto the master file 

again after the subfile has been subsequently subjected to any of the other (3-5) updating procedures. To terminate the deletion procedure, a negative entry, such as -1, following the prompt, KEY 

NUMBER OF RECORD TO BE DELETED, will 

permit the data manager either to select another 

update procedure or to return to the search and 

retrieval activity of PACER.

UPDATE PROCEDURE 3

Update procedure 3 is designed for the sequential 

review and revision of records belonging to a subfile selected from the master file. After the sequential revision has been completed, the data manager 

may elect to post the subfile back onto the master 

file or to save the subfile for further update operations.

If the user has not previously entered the instruction-suppression code, the first message displayed 

will be the following- instructions: 

RECORDS FROM THE DESIGNATED SUBFILE 

WILL BE PRESENTED SEQUENTIALLY FOR 

REVIEW AND UPDATE. AFTER ALL RECORDS HAVE BEEN EXAMINED BY THE REVIEWER, HE MAY THEN ELECT TO POST 

THE RECORDS IN THIS SUBFILE ONTO THE 

MASTER FILE.

WHENEVER YOU WISH TO LEAVE A SELECTED DATA ELEMENT UNCHANGED, ENTER AN ASTERISK, *, FOLLOWED BY A CARRIAGE RETURN.

IF YOU WISH TO PROCEED TO THE NEXT 

RECORD IN THE FILE, ENTER THE CHARACTERS "NEXT" FOLLOWING THE PROMPT: 

"NAME OF DATA ELEMENT TO BE 

CHANGED." THE "NEXT" COMMAND WILL 

LEAVE THAT RECORD IN ITS ORIGINAL, UNREVISED STATE AND THE NEXT RECORD 

WILL BE DISPLAYED, IN SEQUENCE, FROM 

THE SUBFILE. IF AT ANY TIME YOU DO NOT 

WISH TO REVIEW THE REMAINDER OF THE 

FILE, ENTER "QUIT."

Following this message will be a display of the 

first record in the subfile, as shown in an earlier 

example. This display will be followed by the 

prompt, NAME OF DATA ELEMENT TO BE 

CHANGED. The data manager may either enter a 

valid data-element name or specify the command 

NEXT or QUIT. If a proper data-element name 

has been entered, the next prompt will be either, 

ENTER VALUE, if it is a whole number, ENTER 

DECIMAL VALUE, if it is decimal data, or ENTER DATA, if the value is an alphanumeric value. 

At this point, the data value may be left unchanged 

by entering an asterisk, *, for the alphanumeric 

data, or an asterisk enclosed by apostrophes, '*', for 

the integer and decimal data. If the value is alphanumeric, a search is made to determine whether 

the data entry matches an already existing dictionary entry. If there is a matching dictionary entry, 

or if the proper type of numerical data has been 

entered, the data manager will be prompted with,
22 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

DO YOU WISH TO CHANGE ANY MORE DATA 

ELEMENTS BELONGING TO THIS RECORD? 

ENTER "YES" OR "NO." A response of NO will 

cause all preceding changes to that record to be 

posted back onto the subfile. A response of YES 

will again display the prompt, NAME OF DATA 

ELEMENT TO BE CHANGED. The user can then 

select another data element to revise, or he may enter NEXT or QUIT. The NEXT command nullifies 

all data changes made to that record and proceeds 

to display the next record from the subfile. The 

QUIT command presents the user with the option 

of posting the subfile onto the master file or leaving the subfile available for further activity.

If the alphanumeric input does not match a dictionary entry, the message, THERE IS NO DICTIONARY MATCH FOR DATA NAME, is displayed, followed by the name of the data element, 

and the prompt, DO YOU WISH TO ENTER THIS 

DATA IN THE DICTIONARY? "YES" OR "NO." 

An entry of YES will make that alphanumeric 

value a permanent dictionary entry and then query 

for further data changes to the record. A NO entry 

will bring up the prompt, NAME OF DATA ELEMENT TO BE CHANGED, giving the data manager the opportunity to re-enter the correct alphanumeric value for that data element, or to select 

a different data-element name for data revision.

After all records in the subfile have been reviewed or after QUIT has been entered in response 

to the prompt, NAME OF DATA ELEMENT TO 

BE CHANGED, the prompt, FILE "(subfile 

name)" HAS BEEN REVISED. DO YOU WISH 

TO WRITE THIS FILE ONTO THE MASTER 

FILE? "YES" OR "NO" will appear. A response 

of NO returns control for selection of another update procedure. A response of YES posts the subfile onto the master file, following with the prompt, 

DO YOU WISH TO SAVE THIS FILE? "YES" 

or "NO." If NO, the subfile is dropped; if YES, the 

subfile is saved for further use. In either case, the 

message:

UPDATE OPERATIONS HAVE BEEN COMPLETED.

IF YOU WISH TO CONTINUE WITH THE UPDATE PROCEDURE ENTER THE NUMBER 

(1-5). ENTERING A "0" FOR THE PROCEDURE PROMPT OR "QUIT" FOR THE FILE 

PROMPT WILL RETURN CONTROL TO THE 

SEARCH AND RETRIEVAL PORTION OF 

"PACER."

is printed followed by the prompt, UPDATE PROCEDURE (1-5), for selection of further update operations.

UPDATE PROCEDURE 4

Update procedure 4 is designed to permit the 

user to access a given record from a previously selected subfile by means of the record key number. 

The data contained in that record is displayed in 

the same format as illustrated earlier. If the instruction-suppression code has not been set, the following instructions will precede the first prompt, 

KEY.

RECORDS FROM THE DESIGNATED SUBFILE 

WILL BE PRESENTED, AS SPECIFIED BY 

KEY NUMBER, FOR REVIEW AND UPDATE. 

AFTER THE REVIEWER HAS EXAMINED THE 

CONTENTS OF THE RECORD OF INTEREST, 

HE MAY ELECT TO POST THAT RECORD 

ONTO THE MASTER FILE.

REGARDLESS OF WHETHER OR NOT THE 

RECORD IS POSTED TO THE MASTER FILE, 

IT WILL REMAIN, AS REVISED, IN THE SUBFILE.

TO ACCESS THE DESIRED RECORD, RESPOND TO THE PROMPT "KEY" BY ENTERING THE RECORD'S KEY NUMBER. . . . ENTERING A "-1" WILL CONCLUDE THE KEYED 

ACCESS PROCEDURE.

IF YOU WISH TO GO ON TO ANOTHER RECORD IN THE FILE, ENTER THE CHARACTERS "NEXT" FOLLOWING THE PROMPT: 

"NAME OF DATA ELEMENT TO BE 

CHANGED." THE "NEXT" COMMAND WILL 

LEAVE THAT RECORD IN ITS ORIGINAL, UNREVISED STATE AND PROMPT FOR THE 

NEXT RECORD KEY.

WHENEVER YOU WISH TO LEAVE A SELECTED DATA ELEMENT UNCHANGED, ENTER AN ASTERISK, *.

After the key number has been specified for the 

KEY prompt, the selected record is then displayed, 

followed by the prompt, NAME OF DATA ELEMENT TO BE CHANGED. The data modification 

procedure for this record is identical with the sequential revision procedure (update procedure number 3). The NEXT and the QUIT commands are 

also used in the same context as in the sequential 

revision procedure. The asterisk response again is 

used to leave the data fields unchanged.

After revision of the record has been completed, 

the prompt, DO YOU WISH TO POST THIS RECORD TO THE MASTER FILE? "YES" OR "NO," 

is displayed. If the response is YES, it is posted to 

the master file as well as to the subfile. If the response is NO, it is posted to the subfile only. After
USE OF THE UPDATE OPTION 23

the keyed revision is concluded, the data manager 

can, by means of procedure 3 or 5, make further 

corrections to the subfile and then post the entire 

subfile onto the master file.

The next prompt after the one for posting the 

record onto the master file is, DO YOU WANT TO 

REVIEW ANY MORE RECORDS? "YES" OR 

"NO." A response of YES will produce the prompt, 

KEY, whereas a response of NO concludes the 

keyed update procedure and returns the prompt, 

UPDATE PROCEDURE (1-5). Entry of a negative integer value following the KEY prompt will 

also conclude the keyed update procedure.

UPDATE PROCEDURE 5

Update procedure 5 is the batch revision procedure. It is used to change all subfile records to the 

same specified data value for a selected data element. If the instruction-suppression code has not 

been set, the following message will be displayed:

THIS IS THE BATCH UPDATE PROCEDURE. 

GIVEN A SPECIFIED DATA ELEMENT NAME 

AND A SPECIFIED DATA ELEMENT VALUE, 

THIS PROCEDURE CHANGES ALL RECORDS 

IN THE GIVEN SUBFILE TO THE DATA 

VALUE SPECIFIED FOR THAT DATA ELEMENT NAME.

THE BATCH EDIT/REVISION PROCEDURE 

CAN BE TERMINATED BY ENTERING "QUIT" 

WHEN A PROMPT FOR THE NAME OF THE 

DATA ELEMENT IS ENCOUNTERED.

This message will be followed by the prompt, 

NAME OF DATA ELEMENT TO BE CHANGED. 

The user will respond to this prompt and the ones 

that follow for the data values in the same manner 

as when using update procedures 3 and 4.

Because of the mass record revision capability of 

this updating procedure, the batch procedure does 

not produce a display of any of the records changed. 

If it is desired to review any records in this subfile before posting them onto the master file, the 

sequential or the keyed revision procedure may be 

selected after the batch revision process has been 

concluded. To review records with the sequential 

revision procedure, enter NEXT following the 

prompt, NAME OF DATA ELEMENT TO BE 

CHANGED, and the next record from the subfile 

will be displayed. Entering QUIT will conclude the 

review. If the keyed revision procedure is selected 

for review, enter the record key number following 

the prompt, KEY. If the key number is unknown, 

enter the value 1. The keyed read accesses the first

record with a key greater than or equal to 1. To 

access the next record in the subfile enter NEXT 

following the prompt, NAME OF DATA ELEMENT TO BE CHANGED, and then a key value 

exceeding by one the key value of the previous 

record. This will access the record in the subfile 

with the next higher key. A continuation of this 

process will have the same effect as a sequential review. The user can terminate this procedure at any 

time, by entering a negative key value for the key 

prompt, or QUIT in place of NEXT for the dataelement name.

After the update and posting of a subfile onto 

the master file, the data manager can conclude the 

update process by entering a 0 (zero) when 

prompted with UPDATE PROCEDURE (1-5). At 

this point, the prompt, ENTER COMMAND, will 

be displayed, and the user may respond with any 

one of the standard PACER commands (see table 

1). It is also possible at this point to select another 

subfile to be used for the editing and correcting of 

the master file.

If several corrected subfiles have been saved for 

future posting to the master file, care must be taken 

to ensure that if any of the subfiles contain overlapping records, they will be posted in proper sequence to avoid negating previously posted record 

corrections.

USE OF TABULAR SUMMARY OPTION

Data may be retrieved from either USALYT or 

WCOAL in a predefined tabular output form on a 

wide carriage terminal (135 characters per line, or 

more) by entering the command TABLE. A data file 

retrieved from WCOAL will be listed showing tonnage of coal in various thickness categories by rank, 

coal bed, and overburden. Because the width of 

paper is a limiting factor and because of the natural 

break in thickness categories for varying ranks of 

coal, two summary tables are automatically printed, 

if required by the data, for thickness categories 

given in inches or feet.

The user is prompted to enter the data file to be 

printed and a description of the area searched to be 

printed as a title. As each data record is read in, it 

is checked for THICKNS equal to "unclassified" or 

"classified by zone," or RELIABL equal to "unclassified." If any of these conditions are true, the tonnage 

is added to the appropriate one of three subtotals, 

and the record is skipped. The other data records are 

then written to one of two files, depending upon 

whether THICKNS is in feet or inches.
24 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

After all records are read, the inches file is sorted 

by county, rank, coal bed, overburden, thickness, and 

reliability. A table is printed in the form shown in 

figure 8, new lines of subtotals being printed at every 

change in overburden, bed, rank, or county. A line 

showing the totals for all thickness columns is 

printed at the end of the table. If no data are reported in inches, or after the first end of file, the 

program reads, sorts, and prints the table for 

THICKNS reported in feet, also shown in figure 8.

Upon reaching an end of file for the second, or for 

the only data file, a total line is printed for all tables 

shown. If any input records have been skipped because of THICKNS or RELIABL conditions, a message is printed showing the total tonnage omitted, 

followed by the tonnage of coal excluded by each 

THICKNS or RELIABL condition. A final total tonnage for the area under consideration is then printed.

When a file of analytical data has been retrieved 

from USALYT, entering the command TABLE from 

a wide carriage terminal (135 characters per line, or 

more) will produce a tabular output as shown in 

figure 9. The user is prompted to enter the name of 

the data file to be printed and to enter a description 

of the area searched, which is to be printed in the 

title. The input data file is sorted by county, rank, 

and coal bed. Data records are read and a subtotal 

computed until a change in coal bed, rank, or county 

occurs. A separate counter is kept for each variable 

because a number of incomplete records are anticipated. The data are then averaged and printed according to the format shown in figure 8.

EXAMPLE OF INTERACTIVE SESSION

The questions and requests in figures 7, 8, and 9 

provide examples of actual use of the USGS National 

Coal Resources Data System. Inputs required and 

prompts and responses by the PACER system utilized in Phase I studies are illustrated. 

Questions:

1. What is the total tonnage of bituminous and 

subbituminous coal in T5-6N, R89-90W of 

the Yampa coal field in Colorado ?

2. What coal chemical analyses are available in 

this area, and what are the average sulfur, 

ash, and Btu values?

Requests:

1. Tabulate the tonnage of coal in this area by 

county, rank, coal bed, and thickness of coal 

bed and overburden.

2. Tabulate the chemical analyses of the coal in 

this area.

PROGRAMMER'S REFERENCE

This section includes two topics:

1. Modifications to the GRASP system which are 

required in order to provide updating and editing capabilities in PACER;

2. New programs which constitute the updating 

and editing capabilities of PACER, called by 

the UPDATE command.

The user should note that PACER is presently operational on the Computer Science Corp. (INFONET) timesharing UNIVAC 1108 system in El 

Segundo, Calif. Some INFONET-dependent programs have been used with the PACER subroutines, 

and are, therefore, not transferrable to other computers. Similar or equivalent programs must be 

available or written for PACER to operate in its 

present form. The INFONET-dependent programs 

are noted at the end of discussion for each PACER 

subroutine in appendix C.

MODIFICATIONS TO GRASP

As discussed earlier, PACER is a modified version 

of the GRASP search and retrieval program. The 

modifications to the search and retrieval system are 

minor and involve the tailoring of GETREC, the 

input and output subroutine, to obtain greater operating efficiency with the particular file structures of 

WCOAL, ECOAL, and USALYT.

Because of the needed capability for editing and 

updating these three master files, they were created 

as keyed record files. This permits the random access 

of records for editing and updating. In addition, very 

few of the data fields in an NCRDS master record 

contain blank information; instead, they contain integer data or integer pointers for alphanumeric data 

contained in the dictionaries. Little is to be gained in 

terms of storage by packing these records. However, 

a significant proportion of CPU time is saved by 

storing them in the unpacked mode. Thus, the 

PACER version of GRASP is structured to handle 

keyed and unpacked master file records, but all other 

major features of GRASP are retained. The GRASP 

documentation, therefore, can be utilized as a user's 

guide for the search and retrieval operation of 

PACER.

The principal distinction between PACER and 

GRASP is the addition of considerable software programming to permit user updating and editing of
PROGRAMMER'S REFERENCE 25

JPACER

WELCOME TO THE USGS "PACER 11 VERSION OF THE "GRASP" RETRIEVAL SYSTEM.

THE FOLLOWING DATA BASES ARE AVAILABLE:

ECOAL - USGS EASTERN US COAL RESOURCES DATA

WCOAL - USGS WESTERN US COAL RESOURCES DATA

USAI.YT - PUBLISHED US COAL ANALYTICAL DATA

THE USER *UST SPECIFY CNF OF THE ABOVE DATA RASES FOLLOWING THE PROMPT.

A CHANGE CF DATA BASES CAN) BE MADE AT ANY TP>£ BY ENTERING THE WORD "FILE" 

FOLLOWING THE PROMPT TO "ENTER COMMAND."

ENTER DATA BASE NA**E: *COAL

ENTER

A. STATE EGi COLORADO

FU FIELD EG YAMPA

C. TWNSHIP HE b,6

D. NS EQ Ni

E. RANGE HE 89»90

F. E* EQ w

G.

ENTER CCMVAND: LOGIC

ENTER LCGIC: A*8*C*0*E*F

ENTER CCMf'ANnJ SEARCH

ENTER INPUT FILE NAf>£: WCOAL

FNTFR OUTPUT FILE NAM£j RYAMPA

ALL 15S72 RECORDS OF wCOAL SEARCHED.

1?5 RECORDS FOUND WHICH SATISFY THE REQUEST. 

THEY HAVE BEEN STORED IN RYA!"PA 

SRU'S: 1A0.6

ENTER CCVh'ANDs FUNC

ENTER NflME OF FILE: HYAMPA

FUNCTIONS AVAILABLE AT THIS TINiE ARE: 

MEAN FIT

FIGURE 7. Example of an interactive session using PACER.
26 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

ENTER FUNCTION NAMES AND CORRESPONDING ARGUMENTS,

! MEAN TONNAGE

2.

MEAN STATISTICS FOR TONNAGE WITH 125 ITEM(S),

MIN« .24 MAX* 570.34 MEAN* 31.24 ROOT MEAN SQ.*6.40E+03 

SUM* 3904.83 SUM OF SQUARES* V.996+005 

STO. DEV»» 73.983 VARIANCE* 5464,6

ENTER COMMANDS COND

A. RANK BE BIT, HV BIT c 

B. RANK BE SUBBIT, SUBBIT c 

c.

ENTER COMMAND! LOGIC 

ENTER LOGICI A

ENTER COMMANDI SEARCH

ENTER INPUT FILE NAMES RYAMPA

ENTER OUTPUT FILE NAMEl BITYAM

ALL 125 RECORDS OF RYAMPA SEARCHED,

7T RECORDS FOUND WHICH SATISFY THE REQUEST. 

THEY HAVf BEEN STORED IN BITYAM 

SRU«Stl,4

ENTER COMMANDS FUNC

ENTER NAME OF FILES BITYAM

FUNCTIONS AVAILABLE AT THIS TIME ARES 

MEAN FIT

ENTER FypCTlQN NAMES AND CORRESPONDING ARGUMENTS, 

2!

MEAN STATISTICS FOR TONNAGE WITH 77 ITEMS(S).

MIN* .30 MAX* 570,34 MEAN* 35,31 ROOT MEAN SQ,« 7.48E+03 

SUM* 2718,72 SUM OF SQUARES* 5.762+005 

STD, DEV.* 79,490 VARIANCE* 6318,7

ENTER COMMANDS LOGIC 

ENTER LOGICS B

FIGURE 7. Example of an interactive session using PACER Continued
PROGRAMMER'S REFERENCE 27

ENTER COMMANDS SEARCH

ENTER INPUT FILE NAMEI RYAMPA

ENTER OUTPUT FILE NAMtt SUBYAM

ALL 125 RECORDS OF RYAMPA SEARCHED.

40 RECORDS FOUND WHICH SATISFY THE REQUEST, 

THEY HAVE BEEN STORED IN SUBYAM

SRU«SU.3

ENTER COMMANDS FUNC

ENTER NAME OF FILES SUBYAM

FUNCTIONS AVAILABLE AT THIS TIME ARES 

MEAN FIT

ENTER FUNCTION NAMES AND CORRESPONDING ARGUMENTS.

1. MEAN TONNAGE

2.

MEAN STATISTICS FOR TONNAGE WITH 48 ITEMCS),

MIN* .24 MAX* 448t49 MEAN* 24.71 ROOT MEAN SQ.« 4.65E+03 

SUM- 1186.11 SUM OF SQUARES* 2.234*005 

STO, DEV.* 64.257 VARIANCE* 4129.0

SRU'SlT.l

ENTER COMMANDS FILE

ENTER DATA BASE NAME! USALYT

ENTER COMMAND S CO*K>

A. STATE EQ COLORADO

B. 

C. 

D. 

E. 

F. 

G.

FIELD EQ YAMPA 

TWNSHIP BE 5*6 

NS EQ N

RANGt BE 89,90 

EW EQ W

ENTER COMMANDS 

ENTER LOGICS

LOGIC 

A*8*C*D»E*F

ENTER COMMANDS SEARCH

ENTER INPUT FILE NAMES USALYT

ENTER OUTPUT FILE NAMES AYAMPA

ALL 666 RECORDS OF USALYT SEARCHED.

62 RECORDS FOUND WHICH SATISFY THE REQUEST, 

THEY HAVE BEEN STORED IN AYAMPA

FIGURE 7. Exam .ile of an interactive session usir ' PA^ER '"01 .'..
28 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SRU'SS7.1

ENTER COMMANDS CONO

A* RANK BE BIT,HV BIT C

B. RANK BE SUBBlTfSUBBIT C

C.

ENTER COMMAND: LOGIC 

ENTER LOGICI A

ENTER COMMANOI SEARCH

ENTER INPUT FILE NAMEI AYAMPA

ENTER OUTPUT FILE NAME I ABTYAM

ALL 62 RECORDS OF AYAMPA SEARCHED.

50 RECORDS FOUND WHICH SATISFY THE REQUEST, 

THEY HAVE BEEN STORED IN ABTYAM

SRU»SH.2

ENTER COMMAND) FUNC

ENTER NAME OF FILE* ABTYAM

FUNCTIONS AVAILABLE AT THIS TIME ARES 

MEAN FIT

ENTER FUNCTION NAMES AND CORRESPONDING ARGUMENTS.

1. MEAN SULFURt ASH, BTU

2.

MEAN STATISTICS FOR SULFUR WITH 50 ITEM(S),

MIN* .30 MAX* 3.60 MEAN* .71 ROOT MEAN SQ.* .00 

SUM* 35.50 SUM OF SQUARES* 39.9 

STD. DEV.* ,54782 VARIANCE* .30010

MEAN STATISTICS FOR ASH WITH 50 ITEM(S).

MIN* 2.70 MAX* 26.90 MEAN* 0.11 ROOT MEAN SQ,« 85. 

SUM* 405.60 SUM OF SQUARES* 4.257*003 

STD. DEV.* 4.4410 VARIANCE* 19.722

MEAN STATISTICS FOR BTU WITH 50 ITEM(S).

MIN* 8390.00 MAX* 11920.00 MEAN* 11080,20 ROOT MEAN SQ.«1.23E*08 

SUM* 554010.00 SUM OF SQUARES* 6.156*009 

STD. DEV.* 603.16 VARIANCE* 3.63798E*05

ENTER COMMANDS LOGIC 

ENTER LOGICS B

FIGURE 7. Example of an interactive session using PACER Continued
PROGRAMMER'S REFERENCE 29

ENTER COMMAND! SEARCH

ENTER INPUT FILE NAME: AYAMPA

ENTER OUTPUT FILE NAMEI ASBYAM

ALL 6z RECORDS or AYAMPA SEARCHED. r^w *? *ECOROS POUND WHICH SATISFY THE REQUEST.

THEY HAVE BEEN STORED IN ASBYAM 

SRU'Sl.7

ENTER COMMAND! FUNC

ENTER NAME OF FILE I ASBYAM

FUNCTIONS AVAILABLE AT THIS TIME ARE* 

MEAN FIT

MEAN STATISTICS FOR SULFUR WITH 12 ITEM(S).

SnU! *2°, MAX* l * 20 MCAN* « 63 ROOT MEAN SQ.* .46 

SUM* 7.60 SUM OF SQUARES* 5.58

STD. DEV** .26400 VARIANCE* 6.96970E»02

MEAN STATISTICS FOR ASH WITH 12 ITEM<S).

MIN« 3,20 MAx« 7,SO MEAN- 4 f 64 ROOT MEAN SQ.* 23. 

SUM* 55.70 SUM OF SQUARES* 273. 

STD. DEV** 1.1357 VARIANCE* 1.2S99

MEAN STATISTICS FOR BTU WITH 12 ITEM(S)r

SnU! 9I!2;SX nUAX* ^l 290 *^ MEAN* 10564.17 ROOT MEAN SQ.* 1.12E*08

SUM* 126770,00 SUM OF SQUARES* 1.341*009

STO. DEV»* 433.75 VARIANCE* 1.88136E*05

FIGURE 7. Example of an interactive session using PACER Continued
30 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

>- I

l/> O>

Jj X)

O «

UJ t

I- .n

a. ~

t/j

UJ "X.

UJ <

_> i

»-. u

u.

oo

<t (VI

»-

< O 

O o.

u. o a -3

Ul 

T 3

< UJ

z r o

x ac ui <

ui o- uj

_j u v>

X < 

<I X < 

h- < UJ

z a 

u <

a * u. 2 o < o

Z >- UJ 

T Z

o a. <

032

XXX

UJ UJ UJ o- o- o2 2 Z

UI UI UJ

1^

I/I zo

0-

0-XoX

</)

u. o

</>zo

ol-1J

ol Xz

ol

 *~

u

IIHHHHHH

II

IIHHHH

IIH

IIHHHHH

II

IIH

IIUHHHHHHHHHHHHHHHHHHHHH

IIHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

IIHHHHHHHHHHHHHHH

IIHHHHHHHHHHHHHHHHHHnHHH

H HHH

>»XO

(9

UJ t4( U

>.

CD»

VI

UI uK"J0

V)

UI XJ^

t o

t_n

V}

UJ Xuz

ol

^*

V)

UI uXoo

UI Xa

UI

TC. X

UI

u. z

0»

0»

en

UI Xu2

ol

^»a

UI ^u

Ot 0z

ol 0z^a

UI

02

(A^

UI Xi^X

_J

4(

t O

t»

(V *X

UI ^oM^1

00

(VI

3DM|^

*+J4

^BO^M

 *X

UI ^o

(V-*1

00M

00

(VI^^

-1^^O^

(VI ^X

UI ^o

(V^1

00

(V

00

IV1^

ol z

UI oK^

CD

OK

UIUI

eo>o

-1ou

HHH

IIH

IIHHHH

IIHHHHHHHHH

IIHHHHHHHHHH

IIHHHHHHHH

IIHHHHHHHHHHHHHHHHHHHHHHHHHHHHnHHHHHHHHHHHHHHHHHHHHHHHnnH*HHHHHHHHHHnH

IInHHHHnnHNNNNNN

N NN

II

^23OU^^

U.

u. oX

00 

00n

o o

00 

00

in000o

CO

<o

in0o

<o 

<o

in

o o0

o o

ol

0 

CD

<O » 00 in oi oi

-o n oo in * oi

in »

(VI

o -* o 

o mo

o ^-o 

o mo

ol

o o o

o o o

m oi oi

<O (*) CO in * oi

in -*

(V

o * o 

o no

<o 

o ro

0 (*) 0

ol

0 00

o o o

0 O 0

ol o> (V

0 0 ol a

o tr

0 

CD

<O (*)

00 3D

ol ol 

O 4) oi m

9> r-

 « ol

NO

in o

0 0

00 00

ol ol

n iol ol

0 rr- n

Ot Ol

h0

mo

0 0 

0 0 

0 0

ol IV

O h

in in

33

in in

CO

o o

0 0

0 0

in in

00

in in

00o0

o o

o 

o oo

UI oM

a u.

in <o o in

ol ol

o o 

o o

0 0 

0 0

o tn

00 <J>

O'O

o o

m <o 

o in

CO 0

O'O 

O'O

0 0 

0 0

in <o 

o in

<o a*

ol ol

O O 

0 0 

0 0

0 o«

a.

0 Xo

u. 

u.

Sc?

» (VI 

0 *>

O 00 

00 (VI

o» in

 * ol

(V 0

0 0 

0 0

oo

oo

0 9. 

» M

Oi\O

0 00 

00 IV

-* o

Ot

(V 0

0 0 

0 0 

0 0

77O ol

oMo

(VI <0

O ol 

N. (VI

 » 0

m o

-* -o

0 0 

0 0

o o 

o a

IV <O

o»IV

O 0>

r- IV

 4>>0

<o o>

 * o 

m o

 4> <O 9> nn

0 0

O 0

o o

77O ol

oMX

0 0

 * -«

00 0

olOO

-* 00

in o

f-- O

 * *

-O <J> 

(V (VI

m oi

0 0

0 0

o o 

o o

0 0

0 0

00

-* ol

00 0

ol 

ol 00

-* 00

mo 

h> o

IV IV

o o 

o o

00

77Ool

-o -* o

OD m oi

^ QD ^

ol 

ol O O

O'-* U> ^ m ^

f) 00 0>

O'O O

010 -*

o o o 

o o o

o o o 

o o o

00 O

O'O O

oo m oi

O> 00 <O

ol

<O 0 O 

ol O O

0-* »

r* n hm oo »

O'O 0

00 *

oo o

OO 0

o o o

olftl ol 1 1 1

O ol O

OC UI 

UI O

* o 

o «

) -1 »

0|

/* 

f^^

ol

N.

h«.

o o

o o

ol ^

r- 

>-

ol

rrr-00

0 0o0

0 0

o o

o 

o 

o ni

0)

ol

(VI

N. *mmol in

4> 

39

O 

hol

39

(V

ol hhN.

 ^

t-

^- ^. 00

o in

in 

oo

in

<c

00

o hol 

00

IV<o

-1 «

H- 0

»- 

y-z0u

zu

H- oX
PROGRAMMER'S REFERENCE 31

en

CO

(VI

0

-o

ft 

0

o

(VI

ft 

0

o

o 

o

c

o

00

(VI

<0

ft

o 

o

m

(M

ft 

0

o

7

o 

o

o

Ul 

00

(VI

M

(VI -*

(VI

o 

o

o

0

0 

0

o 

o

o

0

(VI * 

(VI

0 

0

o

0

o 

fll

ft

u

o en

in **> ft fi

in in 

<o o

-* (VI ft ft

O 3)

o tn

ft 

in o

»- 0

0 0

o o

OIO 

OiO

0 0

o o

O (*) -* -*

m m ft ft

<0 o

* (VI 

ft ft

0 00

o ro

ft

in o

l»- 0

o o 

1 1

O ft

0

0 -*

ft

r- * 

ft ft

co a> ft

en o

30 0

O D 

O A

O O

o o

OiO

OiO

0 0

o o

0 -» 

0 ft

ft

ft ft

oo a> ft

ro o 

oo o

0 0

o o

Ul

*

M

(VI

0

o

0 

0

0

o

0

o

o

0

(M

h-

(M

0 

0

o

0

o 

ft

o 

o

N

U.

<e o

>n fi f^ ftft

N en

(VI CO

(VI -O

<e co

* »-

r- N.

ft

o-o

OiO

in *-

(VI (M

-* (VI

in (vi

-0

00 O 

-O 0

-* 0

in

"*ifr 1*)

(VI ft

O 0

a

0» 

<0- >

infm en

(M 00

h- m

OiO 

0 0

o o 

 * «!

o

IM

o in

 * CO

(VI *

^^ (*l

ft *

 * * 

0 -»

CO 0

in »

(VI *

(VI 0

(vi en 

 o «

M en

o tn 

o o

(VI

9 n 

o a

in

M 

0 0

0 0

oo

0 0

 * CO

(M (*) 

Qk 00

04*)

00 t*

men ft ft

out

(VI*

(VI 0 

<0<0

(vim

oo

Oft 

Ul

o

IM

« 0

 * en

0 0

h- o 

(VI O

^ <n

CO 0

-* 0

0 0

 * 0 tw-O

(VI

o o 

o o

O 9 

0 9

o o

O'O 

00

<O 0

"*jfr (*)

00

h- O

f- en

00 O

< > 0

O 0 

O 0

<4>0

h- o

S?

O 0

tn

o

 t

in

o

0

o

0 

0

0 

0

o 

o

o

o 

o

in

0

o

o

0

o

0

o

o 

Ul

o 

o

> -m

o

(VI

o 

<n

ft

M

O 

O

o

0

0

en

ft

0

en

ft

(VI

o

0

o 

o

o 

o

o

0

o

o

0

o

o 

o

en 

m

 o-*

(VI

(VI

en

o ft

o

50

-0

en 

en

M

(M

en

CO

(VI

o 

o

m

<o 

o

00

<0 

!* 

h0

h>

<o

 +

00

ft 

<O

J

1-

COUNTY T(

H * 1

N r^ i

H K

N -n M

H » M 

H CO M 

H f« M 

H M 

N 1 

H v0 M 

H * II

H f- M 

H fi M 

N <£ H 

H ft M 

H 1

H n i

H « M

H fi H

H in H

H ft H 

H II 

H H 

H N 

H tf> H 

H -0 *

H * H 

H M H 

H ft H 

H H 

N H 

H H 

H 0 H 

H f- H

H f- H 

H ft H 

H -* H 

H H 

H H 

H II

H CO II

H * N 

0 H 

* H

II

CO II

 H 

(VI H

fi II

M 

H 

H 

0 H 

0 H

M

O

-*

ft

<o

(VI 

(M

<o

00

m<o

(VI

J

1-

H * N f>- 

H N -n

H 9 

H CO 

H f« 

H 

II 

H v0 

H <* 

H 

H fH fi 

N & 

H ft 

H 

H

H n

H 

H - 

H in

H ft 

H 

H 

H 

H tf> 

H -O 

H 

H -* 

H M 

H ft 

H 

N 

H 

H 0 

H fH 

H fH ft 

H -* 

H 

H 

H

H CO 

H 

H *

0 

 *

CO

(VI fl

0 

0 

-*

o

^. 

-*

ft

«

<o

 

(VI

ft 

(M

ft

<o h>

 

00

m<o 

(VI

J

1-

H

II

II

II 

*

1

1

H

H 

H 

H 

H 

II 

H 

H 

1

1 0 

1 0

1 O

M -1

| ^

1 fi 

M U.

M 

M < 

M CL

M Z 

H < 

H X 

H » 

II X 

1 O 

1 d* II 1

II O> 

H SO H cr

it »

II Z

* o * 1

it m it i- ii

II H 

* 

1 <

i etc * < * * ce

» 0

u.

Ul

o 

ce

o

Ul

ce

0 

0

u.

o

ce

z 

z

(A

1 

1

 1 

(A

Z 

0 1-

f- 1

X 1 

0 1

z

(A

U.

0

(A 

O

_J 

_l 

ft

Z

z

H 

H 

H

H

H > 

H ac.

H 0 

H O 

H UJ 

H »- 

H < 

1 0

1 > 

H CO 

H 

N » 

H (A 

H UJ 

1 0

 3 

O 

(A 

UJ

X

-1

0

1-

1 UJ 

* Ul 

1 U. i 

«

II (A 

* Ul 

* U 

* X 

* 3 

1 3 

1 <A 

* UJ * ce * * o

1 UJ 

1 X 

1 X 

Ul

u.

z

fl

1-

Ul 

UJ

u. 

o

Ul 1- 

u

ft

0

o 

o

Ul

ce

(A 

Ul

1oz

_J 

<

f0 Ho fl

ac.

UJ

> 

0

o

ft

1

m

i

m

(VI

_j 

< t 

o

H1

0 

ft 1

ce

UJ

>

0

i

0 1

ft 

1

m i

i i 

i 

m i 

i i i 

i 

m i 

 i

M 1

-1 

< 1- 

O

1-

o

fl

or

Ul 

0

0

tn

in 

i

in

(VI

z

Ul

o 

ac

O ID uia

ID Ul 

JO

o 

u

H 

H

H 

H 

H 

H 

H 

H 

H 

H 

H 

II 

H 

1

1 

1

1 

«

II 

* 

* 

* 

1 

1 

1 

* 

* 

* 

1 

1 1 >-

1 Z

1 0 

1 0

1

1 1

1

u. 

u.

0

^ f- CO

O vO (VI

in (*> * 

000 

000

0-03)

f- CD *

m tn

O O (*) 

09*

m

o o o 

o o o

O 9 O

o o o

o o o 

o o o

000 

000

fw ^ 00 

O vO (VI

N- CO O

m en *

O 0 0 

000

h> h» m 0 <O CO

r- ao * 

in m

OOP)

o o >

in

o o o

o o o

0 0 O 

ft ft ft 1 1 1

0 O 0

1- 

oo X z a

CO 

CA

O

o

0 

0

0

o

0 

9

0 

O

0

o

0

o

9 

0

0 

0

0 

O

O 

0

o 

o

0

o 

o 

(M1

ft

ce

(VI

M

o 

o

(VI

M

o 

o

o 

o

o

0

0 

0

o 

o

(VI

(VI

0

o

(VI

(VI

o 

o

o

0

o 

ft

1

0

u 

tn

1

eS g

p2

1

100

2
32 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

m vO (M

( > »^ h»

 * * n

^ «n

O 00 O

o * o

«

t-4

0 'VI (VI

o co r»

in tn

«n « o 

n » 3

 * -^

»- 

OOO 

OOO

OOO 

OOO

000

OOO 

000

(*) «O (VI

n *+ *~

-* * in ^ m

0 00 0

o * o

<o

r-t 

0 (VI (VI

o ao r»

in in

 i

«n « o 

n ao o

* -*

»- 

OOO

OOO

1 1 1

OOO

a. ac

3 O

o

tr tr

(9 UJ

a. 

z a.

(/> t- O

ino>

 

o

(VI

00*

<0

i-4

J)

3>

 « 

(VI

i-4

(VI

«

o 

«

0

o

o 

o

0

o 

o

ino>

o

(VI

00 *

vO

»-«

in

00

 * 

(VI

*H

(VI 

vO

O 

«

N

<

COUNTY TO!

AINOO:

t3

o 

tr

ooo (\i <o o <o (vi » oo ( > <*i «vi o rm 01 -* -« <o r- (vi (vi ao » *<*> + in 

«o - -* <o ^ <o (M <n " " oo

oo o oo oo o o o o o o o 

oo o oo oo o o o o o o o

(\l

 

h»o (vi 4>>o> (*).(vi - oo oo o o » K. h-o in 4> o (vi in (vi ( > o in « »*

«o +Ok*o^(vio>oO'* <o m in » in ^ in (M m

 10 o oo mo oo o in <n CM * o /» o O' oo o »'O M o m -« a> M o

*o * o m oo >* (vi oo

r+ r+ r-t r-t (VI

(MO O OO O(\l O O O O O O O

* o o o 4> o rvj o o o o o o o

» (VI <O (M 

<VI -* ^. IM

OO O O 3 O 3 O O O O O O O 

OO O O 3 O O O O OO OOO

(VI

 » 0 0 0« 0 (XI 0000000

» <O CM 

<VI ^ (VI

oo o oo oo o o o o o o o 

oo o oo oo o o o o o o o

-CO (M -CO tOO O> 00 «*) «*) (M O K.

<n * -^ r- w flo o ^ n -» tn

( ) * £ £<*) r-« »^00 

C3 O O O'O OOO OOO OOO

oo o oo oo o o o o o o o

mo (M -CO (*IO r-« 00 00 O O O h- «*io r+ mo oo in (Vi «*) o in " " 

h-*Ok^o>oO'* <oin (vi * m in -^ m

»- o o oo no oo o in <*) rvj " o 

mo o ooo o> o (\i o o - o> (vi o

<O tO(») OD'^OJOO

^t ^ ^ ,-i (\|

oo o oo oo o o o o o o o

oo o oo oo o o o o o o o

1 1 1 1 1 1 1 1 1 1 1 III

O t O Or* O ^ O O O O O O O

-i <r

UJ O

DC

<r oc

O UJ

>- o a. 

»- z a. DD ^ _iz z oo.acr</>3o

CD

3

(/)

<0

M

r*

m

o 

o

(VI

r*

en 

«n

r~ 

a « 

m-^

(n

»

*

(VI

0

*

r*

O 

0

(VI

»-«

(VI

00 

(VI

r*

o 

o

(VI 

(VI

(VI ^. ( >

0 

0

»

0

»

h> 

(VI

(n

»- 

<n

»

N

<

O

>-

>- 

>- 

Z 

3 

O 

O

»-« -* 

 *

>^

^ 

00-* 

00 

(VI

«

»-«

(VI (nin

<niw

(n 

mr* 

*

(VI

o *

r*

O 

O

(VI

»-«

(VI

00 

(VI

»-«

o 

o

h-

»-«

-* 

^. 

m

00*

4> 

»-«

* 

O

«n

Oi >*i

in^.

«n 

in

N

<

O

>-

in

 - 

« 

o 

<o

(VI

* 

»

m-* 

<o

 

so

< )

00

4>

0

« 

00^.

(VI

 * 

»

^ 

in 

<n

m

00

vO>^ *

1-4

»-« 

* 

 

O 

0

r*

(VI

a 

IT 

O 

(VI

r* 

»-«

»

(VI 

(VI

r* 

0

^ 

(VI

in

o -* 

00

h> 

(VI

N

<

O

>-

O

< 

ae 

o

i i

ao m 

<o «

« * 

» o

(VI 0

r+ m

0

» 

o

00 -1 

 O UJ

< -« 

« u.

»

(VI <

-i a.

z 

«c

~ V

m »

Z B 

O 0 

N O 

1

00 00 

K 

O * 

~ UJ Z 

3 -« « 

UJ U. 1 

O «- IT 3 a> i- _l M

0 < N 

Z -J 

 I O <

UJ i- N or

0 < 

Z M 

-(/) QC

O «/> Z U.

O *

z <o uj 

z o«-> 5 

o iu r <

 «GD - Z

o

_l 

< 

> 

o

»~

1

a. - 

o _> >- 3
ENTER COMMAND: TABLE

trvTflH UP TO 6 CHARACTER NAME OF DATA FILE. TO BE PRINTED: ANAYAM

ENTtK NAME OF AREA SEARCHEO (UP TO 28 CHARACTERS): Tb-6N»Rtt9-90W»YAMPA FIELD«CO

AVERAGE ANALYSES OF COAL IN T5-6N»R89-90*»YAMPA FIELD*CO

RANK

COAL BED

BIT 

ABOVE H 

BELOW H 

F ZONE 

H ZONE 

LOWER GR

COUNTY AVERAGE

SUBBIT 

MOORE 

UNCORREL

COUNTY AVERAGE

BIT 

B 

BELOW B 

BELOW G 

BELOW H 

C 

D 

F ZONE 

G ZONE 

H ZONE 

LOWER GR

COUNTY AVERAGE

SUBBIT

L 

UNCORREL

COUNTY AVERAGE

PROXIMATE ANALYSIS (PERCENT) 

MOISTUR VOL MAT FIXED C ASH

9.7 

9.7 

10.0 

10.9 

9.2

9.8

12.4 

15.5

15.1

11.2 

10.3 

10.0 

11.9 

9.8 

9.9 

9.6 

10.1 

11.2 

9.3

10.3

16.9 

17.1

17.1

36.3 

36.8 

34.9 

37.2 

36.5

36.3

34.1 

33.8

33.9

35.8 

34.9 

36.1 

37.2 

35.6 

35.3 

31.0 

35.5 

35.9 

34.4

35.3

32.2 

32.9

32.7

44.1 

45.9 

46.6 

48.3 

43.9

45.5

48.0 

46.0

46.3

50.3 

49.3 

40.0 

47.7 

50.5 

47.3 

42.5 

45.4 

46.5 

49.6

46.5

45.5 

45.8

45.7

MOFFAT

9.9 

7.6 

8.8 

3.7 

10.4

8.5

5.5

4.6

4.7

ROUTT

2.7 

5.6 

13.9 

3.3

4.1 

7.5 

47.0 

9.0 

6.4 

6.8

8.0

5.4 

4.1

4.4

ULTIMATE ANALYSIS (PERCENT) 

HYDROGN CARBON NITROGN OXYGEN

COUN 1 Y

5.7 

5.6 

5.5 

5.8 

5.4

5.6

5.5 

5.9

5.8

COUNTY

5.8 

5.7 

5.3 

5.8 

5.7 

5.8 

5.1 

5.5 

5.7 

5.6

5.6

0. 

5.7

5.7

61. J 

62.0 

62. Ci 

65.6 

62.2

62. t

62. J 

62.?

62.6

68. <i 

66.1 

57.6 

65.4 

68.4 

64.3 

56. / 

62. b 

63. J 

66.0

63.4

0. 

62.6

62.6

1.4 

1.2 

1.3 

1.3 

1.4

1.3

1.3 

1.6

1.5

.3 

.5 

.2 

.4 

.3 

.4 

.2 

.2 

.4 

.4

1.3

0. 

1.6

1.6

21.2 

22.1 

20.6 

23.2

19.4

20.8

24. S> 

25.3

25.1

21. b 

20. b 

21.2 

23. / 

20.6 

20.4

19. b

21.3 

22.6 

19.6

21.2

0. 

13.8

13.8

SULFUR BTU 

(PERCENT)

.5 

.6 

1.7 

.5 

1.2

1.1

.5 

.7

.7

.5 

.6 

.8 

.5 

.5 

.6 

.6 

.6 

.5 

.7

.6

.4 

.5

.5

10770 

11130 

11033 

11570 

11076

11126

11110 

10654

10711

11790 

11580 

10100 

11400 

11920 

11370

10904 

11040 

1155b

11063

10360 

10240

10270

SWMS:

FIGURE 9. Example of a tabular summary of coal analyses.
34 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

ENTER COMMANDI QUIT

THE FOLLOWING FILES HAVE BEEN CREATED DURING THIS SESSION*

1 RYAMPA

2 BITYAM

3 SUBYAM

4 AYAMPA

5 ABTYAM

6 ASBYAM

DO YOU WISH TO SAVE ANY OF THEM? 

(ENTER Y FOR YES OR NO FOR NO) Y 

ENTER A LIST OF NUMBERS CORRESPONDING TO 

THOSE FILES YOU WISH TO SAVE (IE. l-3t5) 

1*4

STOP 

SRU»Sl8.5

I OFF 

StfU«S 

GOOC RYE

ELAPSED TIME: 00*49:54

FIGURE 9. Example of tabular summary of coal analyses Continued

the WCOAL, ECOAL, and USALYT master files. 

Although the updating software was designed to be 

as general as possible, certain peculiarities in each of 

the NCRDS master files make it necessary to add 

some unique, file-dependent programming steps. Addition of new master files to the PACER system will 

necessitate some additional software changes. The 

parts of the software logic where such changes must 

be made will be discussed more fully in the section 

describing the update software.

There are also some minor modifications to several 

of the GRASP routines used by PACER. These 

changes were implemented to adapt PACER better 

to the requirements of the National Coal Resources 

Data System. Certain of these changes were made 

for cosmetic purposes in the presentation of the 

data output. Listing of the modified GRASP subroutines appears in appendix B. These changes include modification of subroutine COLPNT, the data 

output routine that prints selected data-element 

values from a selected file in columnar form. The 

GRASP version permits the variable decimal selection of fixed-point real fields, based on tests for the 

number of significant digits in the real value. Because the number of significant digits for all real 

data, currently existing or contemplated in the 

NCRDS, is suitable for constant field output with

two significant decimal digits (F8.2), the column 

print (COLPNT) logic was modified so that the 

decimal points for the real data values would be 

alined vertically in the output.

Subroutine MEAN was modified to ensure agreement between the total tonnages as output from 

MEAN and the actual total tonnages for a large 

number of records from a retrieval subfile. Before 

modification, discrepancies were caused by the summation of these tonnages in a single-precision register. The resultant summation of single-precision 

"noise" for several thousand records reduced the 

accuracy of tonnage totals to three or four significant digits. By making the appropriate variables 

(SUMX and SUMXS) double-precision quantities, 

this "noise" was removed, and the tonnage totals for 

a large number of records now have the same degree 

of precision as the tonnage entries on the individual 

records.

As previously mentioned, GETREC, the input and 

output subroutine for reading and writing records 

in the master-file formats, has been modified to permit the use of keyed master-file records. Keyed master-file records are essential for the development of 

an efficient editing and updating software package 

to be appended to the original GRASP system.

A recent modification of GRASP (since publica-
PROGRAMMER'S REFERENCE 35

tion by Bowen and Botbol, 1975), permitting the 

merging of records from two subfiles having identical record structure, has also been implemented in 

the PACER version. This subroutine is called 

MERGE.

A final modification was made to the GRASP main 

program, DRIVER, to permit the user to specify 

UPDAte, TABLe, and MERGe as three additional 

commands now available with PACER. The GRASP 

subroutines containing these modifications are listed 

in appendix B. All other GRASP subroutines are 

used by PACED as they exist in their original form 

on the host computer system.

UPDATE PROGRAMS OF PACER

Exercise of the UPDAte option of PACER requires programming logic heretofore unavailable 

with the GRASP program software. This section 

will outline the overall flow of subroutine activities 

and summarize the functional logic inherent in each 

subroutine. Special note will be made of the datadependent as well as the machine-dependent peculiarities in case the user wishes to modify these 

routines to operate on other data sets or has a need 

to transfer this software to computer systems other 

than the UNIVAC 1108-based INFONET system for 

which these routines were designed.

Figure 10 provides an outline of the flow of subroutine activities throughout the data-editing and 

updating process. Subroutine REVISE is the controlling subroutine that is called from the main program DRIVER when the UPDAte command is specified. Many of the overall housekeeping tasks are 

performed through this subroutine: tasks such as 

selection of the desired update procedure, specification of the subfile to be updated, opening files in the 

update mode, and posting the updated subfile onto 

the master file. Any of the five updating subroutines, 

ADDREC, DELREC, SEQREV, KEYREV, and 

BATCH may be selected while under the control of 

REVISE.

Subroutine ADDREC processes the new datainput files, using subroutine MATCH to check the 

dictionaries for matches to the alphanumeric data 

entries and prompting the data manager to either 

correct the data entries for the mismatches or to 

request that the mismatched data be added as an 

entry in the appropriate dictionary through subroutine ADDICT. If all data items on the raw data record are satisfactory, the record is rewritten in the 

master-file record format, integer dictionary pointers replacing the alphanumeric entries. This secondary data file is saved for future posting onto the master file at some other time when control is again 

returned to REVISE. Two data-dependent subroutines are currently available for reading the new 

data-input file and for formatting the data to permit the proper assignment of the different data 

strings to each of the data elements. These subroutines are called REDUSA, to read data for the 

USALYT file, and REDUSC, to read data for the 

WCOAL and ECOAL files. There are also two datadependent subroutines which, at the option of the 

user, can be used to put out corrected data in a 

format comparable to the input formats used with 

the SYCOR data-entry device. These subroutines are 

OUTUSA to display USALYT records and OUTUSC 

to display WCOAL and ECOAL records.

Subroutine DELREC is used to delete records 

from the master file. It uses one of the data-dependent output routines, OUTUSA or OUTUSC, to produce a hard-copy listing of each record that has been 

deleted before eliminating that record from the 

master file.

Subroutine SEQREV selects, in sequence, each 

record from the update subfile. Subroutine MODIFY 

displays each record by calling either subroutine 

OUTUSA or OUTUSC and then selects the required 

dictionary data values by passing the integer dictionary pointers to subroutine SCANDC which performs the dictionary lookup for the appropriate alphanumeric data string. If the data manager wishes 

to change an alphanumeric data value, subroutine 

MATCH is called to compare the new data value 

with existing dictionary entries. If a match is found, 

the new dictionary pointer replaces the old pointer 

in the record. If there is no match, but the data manager wishes to have the alphanumeric data added as 

a dictionary entry, subroutine ADDICT is then 

called to perform this task.

Subroutine KEYREV selects records by key number from the update subfile. After the record has 

been selected, subroutine MODIFY is called, and the 

data-update process proceeds in the same manner as 

described for the SEQREV routine.

The BATCH subroutine performs batch datavalue entry for all records in a given subfile. This 

procedure utilizes subroutine MATCH to locate the 

dictionary entry, if it exists, which matches the input alphanumeric data value. If there is no dictionary match, the alphanumeric data entry may be 

added to the dictionary through subroutine 

ADDICT.

The individual subroutine logic is summarized in
36 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

FIGURE 10. Subroutine activity flow.

appendix C, and particular attention is directed to 

those peculiarities which (1) make the logic dependent upon a specific record data structure, or (2) 

make the logic dependent on a specific computer system. The READ parameters END, ERR, KEY, and 

PROMPT are not discussed in the subroutine descriptions found in appendix C. However, it should 

be noted that these parameters are nonstandard and 

not necessarily available on all hardware systems. 

The program listings that accompany the discussion 

are commented on, together with a brief description of the subroutine logic and a definition of variables important to that subroutine.

REFERENCES CITED

Barnes, F. F., 1961, Coal fields of the United States Sheet 

2, Alaska: Washington, D.C., U.S. Geol. Survey, scale 

1:5,000,000.

Bowen, R. W., and Botbol, J. M., 1975, The Geologic Retrieval and Synopsis Program (GRASP): U.S. Geol. Survey Prof. Paper 966, 87 p.

Calkins, J. A., Kays, Olaf, and Keefer, E. K., 1973, CRIB 

The Mineral Resources Data Bank of the U.S. Geological 

Survey: U.S. Geol. Survey Circ. 681, 39 p.

Meyer, R. F., 1970, Geologic provinces code map for computer 

use: Am. Assoc. Petroleum Geologists Bull., v. 54, no. 7, 

p. 1301-1305.

Sippl, C. J., and Sippl, C. P., 1974, Computer dictionary: 

Indianapolis, Ind., Howard W. Sams & Co., 488 p.

Trumbull, J. V. A., 1960, Coal fields of the United StatesSheet 1: Washington, D.C., U.S. Geol. Survey, scale 

1:5,000,000.

U.S. Bureau of Land Management, 1973, Manual of instructions for the survey of the public lands of the United 

States: U.S. Bur. Land Management Tech. Bull. 6, 382 p.

U.S. Bureau of the Budget, 1965, Automatic data processing 

glossary Washington, D.C., U.S. Govt. Printing Office, 

62 p.

U.S. National Bureau of Standards, 1973, Counties and county 

equivalents of the States of the United States: U.S. Bur. 

Standards, Federal Inf. Processing Standards (FIPS) 

Pub. 6-2, 35 p.
APPENDICES

APPENDIX A. NAMES USED WITH NCRDS FILES

APPENDIX B. PROGRAM LISTINGS OF MODIFIED GRASP ROUTINES 

APPENDIX C. PROGRAM LISTINGS OF PACER SUBROUTINES
38 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

APPENDIX A, NAMES USED WITH NCRDS FILES

A.I. List of meridian codes in the PMERID file 

with names.

01 1st Principal

39 1st Scioto River

02 2d Principal

40 2d Scioto River

03 3d Principal

41 3d Scioto River

04 4th Principal

05 5th Principal

06 6th Principal

07 Black Hills

08 Boise

09 Chickasaw

10 Choctaw

11 Cimarron

12 Copper River

42 Ellicott's Line

13 Fairbanks

14 Gila and Salt River

36 Great Miami River

15 Humboldt

16 Huntsville

17 Indian

44 Kateel River

18 Louisiana

19 Michigan

20 Montana Principal

21 Mount Diablo

37 Muskingum River

22 Navajo

23 New Mexico

35 Ohio

38 Ohio River

26 Salt Lake

27 San Bernardino

28 Seward

24 St., Helena

25 St. Stephens

29 Tallahassee

43 Twelve Mile Square

30 Uintah Special

45 Umiat

31 Ute

32 Washington

33 Willamette

34 Wind River

96 Principal meridian and base line

	unknown 

99 Various principal meridians and base

	lines
APPENDIX A 39 

A.2. List of names in the REGION dictionary

ALASKA PENINSULA 

APPALACHIAN 

ATLANTIC COAST 

BIGHORN BASIN 

BLACK HILLS 

CENTRAL ALASKA 

COOK INLET-SUSITNA 

DENVER

EASTERN

FORT UNION

GREEN RIVER

HAMS FORK

MISSISSIPPI

NORTH CENTRAL

NORTHERN

NORTHERN ALASKA

PENNSYLVANIA ANTHRACITE

POWDER RIVER

RATON MESA

RHODE ISLAND META-ANTH

SAN JUAN RIVER 

SOUTHtASTERN ALASKA 

SOUTHWESTERN 

SOUTHWESTERN UTAH

TEXAS

TERTIARY LAKE BEDS

UINTA

WESTERN 

WIND RIVER
40 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

A.3. List of names in the FIELD dictionary

ALADDIN

ALKALAI 8UTTE

ALTON

ARKANSAS VALLEY

BARBER

BASIN

BAYFIELO

BISTI AREA

BLACK MESA

BOOK CLIFFS

BOULDER WELD

BP COSTELLO CREEK

8RIGGSDALE

BROAD PASS

BROKEN ARROW D

BUFFALO l)£ SMET

BUICK MATHESON 

C IOWA 

CAMBRIA 

CANNONBALL RV 

CANON CITY 

CARBONDALE 

CART JOR DELMUE 

CAVE HILLS 

CEDAR MTN 

CENTER POWDER 

CENTRAL REGION 

CENTRALIA CH 

CERRILLOS 

CHACO CANYON A 

CHECOTAH 

COALVILLE 

COASTAL PLAIN 

COLLINSVILLE 0 

COLORADO SP6S

coos BAY

CORTE/

CRESTtD BUTTE 

CROWNPT CANYN A 

DANFORTH HILLS 

DATIL MOUNTAIN 

DEER CREEK 

DRY CHEYENNE 

DURANGO

EAGLE PASS DIST 

EAST CENTRAL 

EAST CENTRAL RG 

EATON

EMERY 

EVANSTON 

FAIRFAX M 

FOOTHILLS

FRUITLAND AREA

6ALLUP

GARLAND

6EBO

GILLETTE

6LENROCK

GRAND HOGBACK

GRAND MESA F

GRASS CREEK

GREAT DIVIDE B

GREEN RIVER D

GREYS RIVER

HANNA

HARMONY

HENRY MOUNTAINS

HORStSHOE CREEK

HOWE WILBURTON

HUDSON

ISABELFIRESTEEL

JACKSON HOLE

JARVIS CREEK

KAIPAROWITS

KELSO CASTLE R

KEMMERER

KENAI

KINDIT BASIN

KOLOB

LA VENTANA A

LABARGE RIDGE

LEHIGH DISTRICT

LEXINGTON RG

LIGHTNING CREEK

LITTLE POWDER R 

LITTLE SNAKE R 

LOS PINOS RIVER 

LOST CREEK

LOST SPRINGS

LOWER WHITE RIV

LTTL MISSOURI R

MA CHICKALOON R

MA WISHBONE H

MCALESTER DIST

MCDOUGAL

MEETEETSE

MELMONT

MENDOTA REGION

MORTON

MT PLEASANT

MUDDY CREEK

MUSKOGEE DIST

N CENTRAL

NA COLVILLE R
APPENDIX A 41

A.3. List of names in the FIELD dictionary Continued

NA CRWN BF C 8T 

NA IKPIKPUK R 

NA KOKOLIK R 

NA KU6RUA R 

NA KUK R 

NA KUKPOWRUK R 

NA MEADE R 

NA UTUKOK R 

NAVAJO AREA 

NEWCASTLE GR 

NEWCOMb AREA 

NIBLOCK

NN CALIF CREEK 

NN HEALY CREEK 

NN LJ6 CREEK 

NN REX CREEK 

NN SAVAGE R 

NN TATLANIKA

NN MOOD R 

NORTH PARK 

NORTHEASTERN 

NORTHEASTERN RG 

NORTHERN OKLA 

NORTHWESTERN RG 

NUCLA NATURITA 

OKMULGEE DIST 

OREGON BASIN 

PAGOSA JUNCTION 

PAGOSA SPRINGS 

PILOT BUTTE 

PINEOALE 

PORTER DISTRICT 

POWDER R OIST 

POWDER RIVER

PUMPKIN BUTTE 

RAMAH FONOIS 

RATON 

RENTON 

ROCK CREEK 

HOCK SPRINGS

ROSLYN

S MNT TAYLOR A 

SALINA CANYON 

SALLISAW DIST 

SAN CARLOS DIST 

SAN JUAN RIVER 

SAN MATEO AREA 

SANTO TOMAS

SC IOWA 

SCRAN!ON 

SE IOWA 

SEGO

SHERIDAN 

SIERRA 8LANCA 

SILVER TIP 

SKAGIT COUNTY 

SKULL CREEK 

SLIM BUTTES 

SOMERSET 

SOUTH CENTRALRG 

SOUTH PARK 

SOUTHEASTERN 

SOUTHERN OKLA 

SPIKETON 

SPOTTtD HORSE 

STANDING ROCK A 

STAR LAKE AREA 

STERLING 

STIGLERDISTKICT 

STONEVILLE 

SU BELUGA R 

SU CAPPS 6LAC D 

SU CHUITNA R 

SU SW OF TYONEK

SU YENTNA R

SUMMIT CREEK

SUNDANCE

SUSSEX

SW IOWA

TABBY MOUNTAIN

TABLt MOUNTAIN

TANEUM

TAYLOR

TIGER MTN

TIJEVAS

TONGUE MESA

TRINIDAD

UNA DEL GATO

UNCORKELATEO

VERNAL

W IOWA

WALES

WASATCH PLATEAU

WELLINGTON

WEST CENTRAL RG

WESTERN REGION

WHATCOM COUNTY

WILKESON

YAMPA

ZUNI AREA

BEULAH ZAP

NEW SALEM

NOONAiM

SENTINEL BUTTE
42 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

A.4. List of district names in the DISTRCT dictionary

ANTHRACITE HI06E

8AYFIELD-YELLOW JACKET

BELUGA LAKE

BRIGGSDALE (AREA)

BROAD PASS

BUICK-MATHESON (AREA)

CALIFORNIA CREEK

CAPPS GLACIER

CHICKALOON

CHUITNA RIVER

COLVILLE RIVER

CORTEZ (AREA)

CORWIN BLUFF-CAPE BEAUFT

COSTELLO CREEK

EAGLE-CIRCLE

EAGLE PASS

EAGLE SPRING (AREA)

EATON (AREA)

FOOTHILLS

HEALY CREEK

HOMER 

KENAI

KOBUK RIVER 

KOKOLIK-UTOKOK RIVERS 

KOOTZNAHOO INLET 

KOYUKUK RIVER 

KUK-KUGRUA RIVERS 

KUKPOWRUK RIVER 

KUSKOKWIM 

LIGNITt CREEK 

LITTLt SUSITNA

MEAOE-IKPIKPUK RIVERS

MESA VERDE (AREA)

NORTH CENTRAL

PA60SA JUNCTION

RAMAH-FONDIS (AREA)

RAMPART

RED MESA (AREA)

REX CREEK

RUBY-ANVIK

SAN CARLOS

SANTO THOMAS

SAVAGE RIVER

SCRANTON

SEWARD PENINSULA

SKWENTNA RIVER

TATLANIKA CREEK

TERLINGUA

TYONEK

UNALAKLEET 

WELLINGTON (AREA) 

WISHBONE HILL 

WOOD RIVER 

YENTNA RIVER
APPENDIX A 

A.5. List of formation names in the FORMATN dictionary 1

43

ADAVILLE 

AGUJA

BANDERA SHALE 

BLACKHAWK

BOGGY

CHANULER

CHEROKEE

CHICKALOON

COALEDO

COALMONT

COWLITI

CHUCKANUT

DAKOTA

DAKOTA SS

DENVER

DOMENGINE

DOUGLAS

EAGLE ss

EMERY SS 

EVANSTON 

PERRON SS 

FORT UNION 

FRONTER ADAVLLE 

FRONTIER 

FRUITLAND

FTLO MNE DAKSS 

FTUNION HELLCRK 

FTUNION WASATCH

GARNER

GRAFORD

HARTSHORNE SS

HELL CREEK

ILES

ILES WILLIAMSFK

ILSWILFKLNCFTUN

JACKSONGROUP

KANSAS CITY

KENAI

KNIGHT

LABETTE SHALE

LAKOTA SS

LARAMIE

LNCE FTUN WSTCH

LONE

LOWER CHEROKEE

MARMATON 

MCALESTER 

MENEFEE 

MESA MEET 

MESA WASATCH 

MESA MEET FTUN 

MESA VERDE 

MESAVERDE 

MESAVERDE GROUP 

MESAVERDE HANNA 

MESVDE FRONTIER 

MILLSAP LAKE 

MOUNT SELMAN 

NORTH HORN 

OLMOS

PALO PINTO 

PERMIAN AGE 

PRICE RIVER 

PRINCE CREEK 

PUEBLO

PUGET GROUP 

RATON

ROSLYN 

SAVANNA 

SEVERY SHALE 

SEMINOLE 

SENORA

SIGMILE CANYON 

SKOOKUMCHUCK 

STRAIGHT CLIFFS 

TEMBLER

THRIFTY

TOREVA 

TOUTLE

TROPIC DAKOTA 

UNCORRELATED 

UPPER CHEROKEE 

VERMEJO

VERMEJO RATON 

WABAUNSEE

WASATCH

WEPO

WILCOG GROUP

WILLIAMS FORK

LANCE

1 The stoatigraphic nomenclature used in this report is from many sources and may not necessarily follow U.S. Geological Survey usage.
44 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS 

A.6. List of names in the BED dictionary x

A

A BD

A RATON

AB

ABBOTT

ABC

ALFREDA

ALLEN

ALVEY COAL ZONE

ANCHOR

ANDENSON

ANOBASWF

APACHt

ARVADA

B

B BO

8 RATON

BAGLEY

BALD KNOLL COAL ZONE

BALLARD COAL ZONE

BASWF

BD 1

BO 10

BO 2

BD 3

BD 4

BD 5

BD 9

80 GROUP

BEAR CANYON

BEAR CANYON NO 6

BEAR RIVER

BEAVER HILL

8ECKWITH

BED 1

BED 2

BED 3

BED 4

BED 5

BED A

BED ABOVE CAMERON

BED ABOVE HEALY

BED ABOVE WALTERS

BED BELOW HEALY

BED BELOW MURRAY

BED BELOW SCHUMAN

BED BELOW UCROSS

BED D

BED E

BED H

BED J

BELLINGHAM NUMBER 1

BELLINGHAM NUMBER Z

BELOW RIACH

BELOW RIACH DOUBLE

BERWIND

BEVIER

BEVIER WHEELER

BIG

BIG BEN

BIG DIRTY

BIG ELK

BLACK BEAR 

BLACK CARBON 

BLACKSMITH 

BLEVINS GROUP 

BLIND CANYON 

BLUE CANYON 

BLUE MOUND 

BOB WRIGHT

BOISE

BONCARBO

BRIDGEPORT

BROOKS

BROOKSIDE

BROWN BEAR

BULL CREEK

BUNKER HILL

BURNT

C

C BO

CAMEO

CAMERON

CANDLAND

CANYON

CAPRON

CARBON

CARBON BAHNE NO i

CARBON BAHNE NO 2

CARBON BAHNE NO 3

CARBONADO NUMBER 5

CARBONADO NUMBER 8

1 The stratipraphic nomenclature used in this report is from t many sources and may not necessarily follow U.S. Geological Survey usage.
APPENDIX A 

A.6. List of names in the BED dictionary 1 Continued

45

CARBONERA

CAR60NERO 

CASS

CASTLE6ATE A

CAVANAL

CAVANAUGH NUMBER 2

CEDAR CREEK NO 1

CEDAR CREEK NO 2

CEDAR CREEK NO 3

CEDAR MTN NO 1

CEDAR MTN NO 2

CHANDLER

CHAFFIN

CHARLESTON 

CHERRY CREEK 

CHESTERFIELD 

CHRISTENSEN ZONE

CIRUELA

CLIFFLAND

COAL NO 1

COAL NO 3

COAL NO 3

COAL NO 4

COAL NO 5

COAL NO 6

COAL NO 7

COAL NO 8

COKEDALE

COLUMBUS

COMO

COLBORN

COTTONWOOD

CROCKER

CRQWEBURG

D

D AND F

D BD

DALE NUMBER 4

DALE NUMBER 7

DALTON

DAMSON

DE

DELAGUA NO 1

OIETI NO I

DISCOVERY

DOLLY VARDEN

DRY CHEEK

DURHAM NUMBER 2

DUTCH

E

E 30

EIGHT FOOT

ELK NUMBER 1

ELK NUMBER 2

ELMO

EMERY COAL ZONE

EMPIRE

ERAM

EUREKA

F

F BD

FELIX

FERRON COAL ZONE

FF 1

FF 10

FF 11

FF 12

FF 13

FF 14

FF 15

FF 16

FF 17

FF 18

FF 19

FF 2

FF 20

FF 21

FF 22

FF 23

FF 24

FF 3

FF 4

FF 5

FF 6

FF 7

FF 8

FF 9

FF GROUP

FIRESTEEL

FISH CREEK

'The stratferaphic nomenclature used in this report is from.many sources and may not necessarily follow U.S. Geological Survey usage.
46 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS 

A.6. List of names in the BED dictionary 1 Continued

FLEMING

FLORESTA

FRANKLIN NUMBER 10

FRAZIER

FREDERICK

FRONTIER BED 1

FRONTIER BED 2

FRONTIER 8EO 3

FRONTIER BED 4

FRONTIER COAL ZONE

FULTON NUMBER 12

6

GEM

GILSON

GLACIER

GOFF 1

GOFF 10

GOFF 11

GOFF 12

GOFF 13

GOFF 14

GOFF 15

GOFF 16

GOFF 17

GOFF 18

GOFF 19

GOFF 2

GOFF 20

GOFF 21

GOFF 22

GOFF 3

GOFF 4

GOFF 5

GOFF 6

GOFF 7

GOFF 8

GOFF 9

GOLDEN GLOW

GREEN NUMBER 7

HARRIS

NARTSHORNE

HASTIE

HASTIE PLUS

HASTINGS

HEALY

HENDtRSON COAL ZONE

HENDERSON ZONE

HENRYfcTTA

HIAWATHA

ivit

JEFF HILL

JOHN HENRY MEMBER

JONES

K BED

KEBLER NO 2

KENILWORTH

KEYSTONE

KUMMER NUMBER 0

KUMMER NUMBER 1

KUMMER NUMBER 4

L BED

LADD NUMBER 2

LADD NUMBER 3

LADD NUMBER 4

LADDSDALE

LAKE WHATCOM

LANDSBURG NO 1

LAY SECTION

LEAVELL

LENNOX

LENOX

LEXINGTON

LION CANYON 1

LION CANYON 10

LION CANYON 11

LION CANYON 12

LION CANYON 13

LION CANYON 14

LION CANYON 15

LION CANYON 16

LION CANYON 17

LION CANYON is

LION CANYON 19 

LION CANYON 2 

LION CANYON 20 

LION CANYON 21 

LION CANYON 22 

LION CANYON 23 

LION CANYON 24 

LION CANYON 3 

LION CANYON 4 

LION CANYON 5

1 The stratigraphic nomenclature used in this report is from ( many sources and may not necessarily follow U.S. Geological Survey usage.
APPENDIX A 

A.6. List of names in the BED dictionary 1 Continued

47

LION CANYON 6

LION CANYON 7

LION CANYON 8

LION CANYON 9

LION CANYON A

LION CANYON B

LION CANYON C

LION CANYON D

LITTLE DIRTY

LONSOALE

LOW CARBONERA

LOW GKOUP A BED

LOW GROUP B BED

LOW GROUP C BED

LOW GROUP D BED

LOW GROUP E BED

LOW HOLGATE

LOWER

LOWER ALAMO

LOWER BUNKER HILL

LOWER CAMERON

LOWER COAL FORD COAL

LOWER COAL ZONE

LOWER CULVER ZONE

LOWER DIRTY

LOWER GROUP

LOWER HARTSHORNE

LOWER LUDLOW

LOWER MEMBER

LOWER MEMBER RATON

LOWER MESAVERDE

LOWER MYSTIC

LOWER PIEDMONT

LOWER ROBINSON

LOWER RUGBY

LOWER SOPRIS

LOWER STARKVILLE

LOWER SUNNYSIDE

LOWER THOMPSON

LOWER WITTEVILLE

LOWER ZONE ORD AREA

LOWTHIRWF

LUCAS CREEK

MAJESTIC

MAMMOTH

MANBECK

MARTINEI

MAY CREEK

MC ALESTER

MCKAY

MCNEILL

MESAVtRDE COAL ZONE

MEXICAN CREEK

MENDOU

MID CARBONERA

MID GROUP F ZONE

MID GROUP G ZONE

MID GROUP H ZONE

MID GROUP J BED

MID HOLGATE

MIDDLE

MIDDLE GROUP

MIDDLE MEMBER

MIDDLE MEMBER RATON

MIDDLE MESAVERDE

MIDWF

MINtRAL

MITCHELL MINE

MONAHAN

MONTERVILLE

MONUMENT PEAK

MORGAN NUMBER 7

MORLEY

MORRIS

MUDDY NO 1

MUDDY NO 2

MUDDY NOS 1 AND 2

MULBERRY

MULDOON

MULKY

MURRAY

MUTUAL

MYSTIC

N BED

NEW LAKE HOUNGS NO 2

NEW ROUSE

NEWCASTLE

NEWENHAM

NISQUALLY

NO 1

1 The stratigraphic nomenclature used in this report is from many sources and may not necessarily follow U.S. Geological Survey usage.
48 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS 

A.6. List of names in the BED dictionary 1 Continued

NO 1 BED

NO 2

NO 2 BED

NO 3

NO 3 AND 4

NO 3 BED

NAVY NUMBER 4

NAVY NUMBER 6

NO 4

NO 5

NO 6

NO 7

NODAWAY

NONAC

NUMBER 1

NUMBER 2

NUMBER 3

NUMBER 4

NUMBER 5

NUMBER 6

NUMBER 10

NUMBER li

NUMBER 12

NUMBER 2 5

NUMBER 4 5

NUMBER 7

NUMBER 6

0 BED

OCCIDENTAL

OCCIDENTAL NO 1

OCCIDENTAL NO 2

OCCIDENTAL NO 3

OCCIDENTAL NO 6

OCCIDENTAL NO 14

OCEAN WAVE

OTTAWA

P BED

PALISADE

PARIS

PENITENTIARY

PIEDMONT

PLACITA

PLANT NUMBER 6 

PLANT NUMBER 7 

POCAHONTAS

PRETTY

PRIMERO

PROGRESSIVE

PRYOR

U BED

R BED

RADIANT

RAINBOW

RAPSON

RAVENSDALE NO 3

RAVENSDALE NO 4

RAVENSDALE NO 5

RAVENSDALE NO 9

RED ASH

REES COAL ZONE

RIACH

RIDER

ROCK CANYON 

ROCKVALE

ROLAND

ROSLYN NUMBER 5

ROWE

ROYAL GORGE

RYAN NUMBER 1

S BED

SAN PEDRO

SANTO TOMAS

SCHUMAN

SCOTT

SECOR

SENIOR

SHOO FLY

SIBLEY

SILVER LAKE

SIX FOOT

SLIDE HOLLO*

SMIRL COAL ZONE

SMITH

SMOKY HOLLOW MEMBER

SNELL

SOPRIS

SPRINGBROOK

STIGLER

STRAIGHT CLIFFS ZONE

SUDDUTH

1 The stratigraphic nomenclature used in this report is from many sources and may not necessarily follow U.S. Geological Survey usage.
APPENDIX A

A.6. List of names in the BED dictionary 1 Continued

49

SUMMIT 

SUNBEAM 

SUNDAY CREEK 

SUNNYSIDE 

SUNStT NUMBER 1 

SUNSET NUMBER 2 

SUNSET NUMBER 7

TANK

TAHLOR MINE

FEBO

THAYER

THOMAS

THURBER

THREE PINES

TYSON

TIMAR

TM GROUP

TONO NUMBER 1

TONO NUMBER 2

TOPWF

TROPIC OAK INTERVAL

UCROSS

ULM NO 2

UNCORRELATED

UP CARBONERA

UP HOLGATE

UPPER

UPPER ALAMO 

UPPER AND LOWER 

UPPER BEAR CANYON 

UPPER BUNKER HILL 

UPPER CAMERON 

UPPER CULVER ZONE 

UPPER HARTSHORNE 

UPPER HIAWATHA

UPPER IVIE 

UPPER LUDLOW 

UPPER MEMBER 

UPPER MEMBER RATON 

UPPER MESAVERDE 

UPPER PART 

UPPER ROBINSON

UPPER RUGBY 

UPPER STARKVILLE 

UPPER SUNNYSIDE

UPPER THOMPSON

VICTORY

MADGE

WALKER

WALL

WALSEN

WALTERS

WASATCH

WATTIS

WEIR PITTS8URG

WHEELER

WHITEBREAST

WILEY

WILKLSON NUMBER 1 

WILKESON NUMBER 2 

WILKESON NUMBER 3 

WILKESON NUMBER < 

WILKESON NUMBER t> 

WILKESON NUMBER 7 

WILLIAMSBURG 

WINCHESTER 

WOLF CREEK 

WRIGHT NUMBER 8 

BEULAH ZAP

COTEAU

DUNN CENTER

FRYBURG

HANKS

HAYNES

HARMON

MANHAVEN

MIDDLE WILLISTON

NOONAN

SCRANTON

MEDORA

T-CROSS

UPPER WILLISTON 

WILLISTON

*ILTON

1 The stratigraphic nomenclature used in this report is from many sources and may not necessarily follow U.S. Geological Survey usage.
50 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS 

A.7. List of quadrangle names in the QUAD dictionary

ACORD LAKES NE QD

ACORD LAKES NW QD

ACORD LAKES SE QD

ACORD LAKES SW QD

ALTON

BALD KNOLL 

BRYCE POINT 

CAINEVILLE 

CANAAN CR QD 

CARCASS CANYON QD 

CASTLt DALE NE QD 

CASTLE DALE NW QD 

CASTLE DALE SW QD 

CASTLEGATE KHUNE QDS 

CASTLEGATE MATTS SUMMIT QDS 

CEDAR MOUNTAIN 

CLIFF RIDGE QD

COAL CR TO ORDERVILLE CANYON 

COAL CREEK 

COALVILLE QD 

COLLET TOP QD 

COW FLAT 

CURRANT CR 

DAVE CANYON QD 

DEATH RIDGE QD 

DONKEY FLAT QD 

DRY FORK VERNAL NW QDS 

EAST OF NAVAJO QD

EMERY EAST 

EMERY THREE NE 

EMERY THREE NW 

EMERY THREE SE 

EMERY THREE SW 

FACTORY 8UTTE NW 

FERRON CANYON QD 

FLAGSTAFF PEAK QD 

FLOY CANYON SE SW 

GRIFFIN POINT QD

6UNSIGHT BUTTE NE

GUNSIGHT BUTTE NW

HENRIEVILLE QD

HIAWATHA NE QD

HIAWATHA NW QD

HIAWATHA SE QD

HIAWATHA SW QD

KOLOB PK ORDERVILLE CANYON N

LAKE MOUNTAIN QD

LOST CREEK

MESA BUTTE

MOUNT ELLEN NW SW

MOUNT PENNELL NW NE

MT PLEASANT HUNTINGTON RES

NAPLES QD

NEEDLt EYE POINT QD

NIPPLE BUTTE NE

NIPPLE BUTTE SE

NOTOM NE SE

ORDERVILLE CANYON NE

ORDERVILLE CANYON SE

ORDERVILLE NE SE

ORDERVILLE SW

PAGE RANCH STODDARD MOUNTAl

PARIA NW

PETES COVE QD

PINE LAKE QD

RAINBOW POINT 

HASBERRY KNOLL 

RASMUSSEN HOLLOW QD 

ROCK CREEK 

SALINA CANYON 

SCOFIELD NE QD 

SCOFIELD NW QD 

SCOFIELD SE QD 

SCOFIELD SW QD 

SEEP FLAT 

SEGO CANYON SE 

SEGO CANYON SW

SHIP MOUNTAIN POINT QD

SKUTUMPAH CREEK PODUNK CREEK

SLICK ROCK BENCH-BUTLER VALL

SNAKE JOHN REEF QD

SOLDIER SUMMIT SE UD

STEINAKER RES VERNAL NE QUS

STERLING

SUNNYSIDE NW QD

SUNNYSIDE SE QD

SUNNYSIDE SW QD

TABBY MTN

TABIONA QD

TROPIC CANYON QD

UPPER VALLEY QO

WAGON »OG MESA NE CAVE POINT

WALES

WELLINGTON MINNIE MAUD w QD 

WELLNGTN NE MINNIE MAUD CR E 

WESTWATER CR N 

WOODSIDE NE QD 

WOODSIDE SE QD
APPENDIX A

A.8. List of publications in SOURCE dictionary

51

ALTON OPEN FILE REPT 

ARIZONA BOM BULL 182 

BOOK CLIFFS OPENFILE 

HULL 70 S6S KANSAS 

BVILLE STRIP REPT

CUAL RESERVES OF «A 

COAL RESOURCES IOKA 

COALVILLE TABBY SEGO 

EMERY OPEN FILE REPT 

HENERY MTN COAL FIELD 

IDAHO MC6EOL PHAM 92 

KAIPAROWITS OPENFILE 

KOLOB HARMONY FIELDS 

LANDIS OPEN HLE

MIN fc, HOH RES OF ARI 

MISSOURI GS RI N048 

NMBMMR MEMOIR 2b 

OKLA GS T8L 4i) TO 58 

SEVIER GOOSE LOST OF 

TEX B ECON GEO RI SO 

THE COMPASS SIGGAMEP 

USGS BULL 1042 J 

USGS BULL 1042 0

USGS BULL 1050 

USGS BULL 1051 

USGS BULL 1072 C 

USGS BULL 1072 G

USGS BULL 1072P 

USGS BULL 1078 

USGS BULL 12420 

USGS BULL 9828 

USGS BULLETIN 1242B 

USGS CIRCULAR 159 

USGS CIRCULAR 226 

USGS CIRCULAR 53 

USGS CIRCULAR 81 

USGS CIRCULAR 89 

USGS MAP C 20 

USGS MAP C 26 

USGS MAP C 4 

USGS MAP OM 109 

USGS MAP OM 138 

USGS MAP OM 149 

UTAH MONO SERIES 1 

UTAH MONO SERIES 2 

VERNAL OPEN FILE RPT 

WASATCH OPENFILE RPT 

NDGS BULL 4- 

NDU DIV MIN CIRC 2 

NOU DIV MIN CIRC 5 

NDU DIV MIN CIRC 8 

NDU DIV MIN CIRC 11

USBM IECH PAPER 700
52 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS 

APPENDIX B, PROGRAM LISTINGS OF MODIFIED GRASP ROUTINES

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

SUBROUTINE HELP(WORDS) 

INTEGER WORDSU3) 

REAL»8 T£XT(H,13) 

DATA TEXT/%

'- INITIA',»TES THE ','REQUEST ','FOR RETR','IEVAL

,'0 BE ENT','ERED IN »,'THE FORM',': NAME R','EL

'- INITIA',»TES THE ','REQUEST »,'FOR A LO»,'GICAL

,« TO BE E','NTER£D','USING LO','GICAL OP»

«- INITIA','TES THE ','SEARCH 0»,'F A FILE',

,'IOUSLY E'»'NTER£D»,'CONDITIO','NS AND L'

'- ALLOWS',' THE USE*,'R TO LIS» 'T SELECT',

T»*

VALUE'** 

EX»,'PK£SSION»*

WILL»»»BE ASKED 

USE«»»H TO SEL»

t» FOR) 

t£CT OR

 ENTERlNi,fG I

BASLD U','PON PREV* 

<VARIA»* 

DATA B'* 

IN R»,'EbPONSE »*

ED VALUEi»»S 

t A HLE.«»% 

HANGt TH»t»E

,'BLE NAME»,»S 

»- ALLOWS',' THE

,'ASE TO B','E

 - TERMIN','ATES THE',' SYSTEM.

,'TO A PRU','MPt WILL'»'ALSO STO','P THE SY»,'S»£M.' 

»- UStD T','0 PRINT','ITEM NAM','ES» THEI','R TYPti*','

'NITIONS','IN A'»'SELECTED',» SET OF','GROUPS,' * 

«- USED T','0 OBTAIN',' THE ABO»,'VE COMMA','ND DfcFlN','ITIONS,»»*

DEFI»t%

'- LISTS','THE FILE't'S WHICH','HAVE BEE','N USED A'»'S WELL A»,%

-S THE CO','NDITIONS','AND LOGI','C ENTERE',»D.»»* 

»- PRINTS',' ALL ITE','MS PRESE'»'NT FOR E»,'ACH K£CO','RU IN A'f*

'SELECTED',' FILE.»t'WAITS AF','TER EACH',' N LINES',% 

- PROVID'»'ES FOR T',»Ht: COMPU',' TATION O't'F FUNCTI',%

ONS ON I','TEMS IN','A DATA','SET <OR','FILE).'f*

- COMBIN'»'ES THE C','ONTENTS »,'OF SEVER',»AL StLEC»,% 

TED SUBF','ILES INT','0 A ','SINGLE Si,'USFILE. »,%

- PERMIT','S THE SE«,'LECTION »,'OF SPECI','ALLY SOR',% 

TED AND »,'FORMATTE','ED ','TABULAR »,'OUTPUT D',% 

ISPLAYS.'/

PRINT 501,(WORDS(J),(TEXT(I,J),1=1,11)tJ=l,13) 

501 FORMATCOTHE COMMANDS WHICH MAY BE ISSUED »,% 

'(AND THEIR MEANING) ARE LISTED BELOW8'///% 

CO',A4,8A8/7X,3A8))

PRINT 1001

1001 FORMATC UPDA- PERMITS THE ADDITION, THE DELETION, OR THE'% 

' MODIFICATION OF RECORDS'/' OR PORTIONS OF RECOHOS'% 

' BELONGING TO THE MASTER FILE.'//) 

RETURN 

END
	APPENDIX B 53

4100 SUBROUTINE COLPNT(NPAGE**)

4101 DOUBLE PRECISION DSLNK*AREA»LINE(20)tNAMEStLA8EL»%

4102 VNAMES(20)»BUFFER(15»20)»FMT(3)»FMlS(8)tONAME

4103 LOGICAL DISK

4104 COMMON NAMES*ITYPE»PNTS*10IM

4105 COMMON /EXPRNS/ POLISH*ICODE»LPS

4106 INTEGER PNTS(400)*BLANK»TANK»USED(20)

4107 DIMENSION ITYPE(400)»8IT£M(15*25)tITEMS(20)»LASTDX<15*20)»*

4108 IREC(400)>REC(400) NAMES(400) TANK(30)»LA8EL(25)tLIST(25)**

4109 POLISH(15f8HICODE(15.8)*LPS(8)*EQUATE(5)

4110 EQUIVALENCE (REC(1)*JRECU M*(IVAL.VAL)>(TANK(1)>AREA)

4111 DATA NDICT»NBIN*NFILE/9»9»11/*BLANK*OBLNK/' »* '/

4112 DATA FMTtFMTS/'( * > *»F8.6»*«F8.5»>»Ftt.4»»%

4113 F8.3» > »F8.2«t«F8.1»»«F«fO'>'lPE8,l»/

4114 DATA EQUATE/'EQUA»*»TE 1»»»5»»2*» /

4115 INTEGER SPACEO187)

4116 COMMON /SCRTCH/ SPACE

4117 EQUIVALENCE (SPACEU)*8UFFER) 9 (SPACE(601)»LASTDX)t*

4118 (SPACE(901)tBITEM)>(EQUATE(4)tONAME)

4119 KOUNT=0

4120 DO 1 K=l,20

4121 USED(K)sO

4122 DO 1 I=l»15

4123 1 LASTDX(I*K)=-999999

4124 46 PRINT 50

4125 50 FORMAT(« ITEMS MAY 8E PRESENTED IN A SORTED ORDtR.M

4126 READ(5.51,PROMPT*»ENTER 1 FOR A SORT* 0 OTHERWISE.: '*END=995)%

4127 ISORT

4128 bl FORMAT(Il)

4129 PRINT 53

4130 5^ FORMATS THIS LIST CAN BE DIRECTED T0»/*

4131 YOUR TERMINAL OR TO A SYSTEM DISK. 1 /*

4132 t ENTER 1 FOR FORMATTED DISK ONLN OTHERWISE ENTEH 0»)

4133 REAO(5>51fEND=995) I

4134 DISK=I.NE.O

4135 IF(.NOT.DISK) GO TO 49

4136 IFUSOKT.NE.l) GO TO 48

4137 PRINT 47

4138 47 FORMAT( GRASP IS UNABLE TO SORT OUTPUT *%

4139 'DIRECTED TO A DISK. REENTER YOUR CHOICE.')

4140 GO TO 46

4141 48 READ(5*54tPROMPTs'ENTiiR NAME OF DISK FILES *%

4142 END=995) ONAME

4143 54 FORMATU6)

4144 CALL OBEY<EQUATE*5)

4145 49 CALL VLIST (VNAMES* ITEMS*NUM»S,990 )

4146 IF(NUM.EQ.O) GO TO 995

4147 NUM=MINO(NUM*20)

4148 CALL OBEY(»USAGEtCOPYi,3)

4149 IF(ISORT.EQ.O) GO TO 52

4150 ISORT=1

4151 CALL RSZ(8*NUM)

4152 CALL KEYC(l»8*NUMi7tl)
54 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

4153 b2 IF(DISK) 60 TO 900

4154 HKINT 44» (VNAMESU) »I = 1»NUM)

4155 44 FORMAT(//1X»20A10)

4156 900 IFUSORT.LT.2) CALL 6ETREC(IREC?&999)

4157 IFUSORT.EQ.l) GO TO 2

4158 IF(DISK) GO TO 8

4159 KOUNT=KOUNT+1

4160 IF(KOUNT.LE.NPAGE) GO TO 8

4161 KOUNT*0

4162 CALL PAUSE (6,999)

4163 PRINT 44»(VNAMES(I)»I=1»NUM)

4164 8 IFUSORT.NE.2) GO TO 2

4165 CALL SRTRET(LINEtL)

4166 IF(L,EQ.O) GO TO 998

4167 GO TO bOl

4168 2 DO 800 JJ=ltNUM

4169 AREA=DBLNK

4170 II=ITEMS(JJ)

4171 IFCII.6T.O) GO TO 9

4172 II=-II

4173 VAL=EVAL(IREC»ICODt(l»II) t POLISH (1» 11) »LPS(II) »&80U)

4174 GO TO 20

4175 9 IVAL=IRECUI)

4176 IFUVAL.EQ.BLANK) 60 TO 800

4177 KIND=ITYPE(II)

4178 IF(KINQ.LT.IO) GO TO 7

4179 KIND=KINO-10

4180 GO TO 28

4181 7 GO TO UO,20,28f40)»KIND

4182 10 ENCODE(AREAtll) IVAL

4183 GO TO 800

4184 20 IF(VAL.EQ.O.) GO TO 22

4185 AsALOG10(A8S(VAL))

4186 IF(A.G£,5,) 60 TO 23

4187 IFU.LE.-4,) GO TO 23

4188 22 LK=5

4189 GO TO 24

4190 23 LK=8

4191 24 FMT(2)=FMTS(LK)

4192 ENCODE(AREA»FMT) VAL

4193 GO TO 800

4194 28 IFtUSEO(JJ),EQ,0) GO TO 30

4195 00 29 K=ltl5

4196 IFdVAL ,£Q, LASTOX (K» JJ) ) 60 TO 27

4197 29 CONTINUE

4198 GO TO 30

4199 27 AREA=8UFFER(KtJJ)

4200 GO TO 800

4201 30 IKEY=10000*KIND+IVAL

4202 READ(NDICTtKEY=IKEY) J,(TANK(I)»1=1»J)

4203 USED(JJ)-MOO(USED(JJ)»15)*1

4204 NUSED=USED(JJ)

4205 BUFFER(NUSEDfJJ)=AHEA

4206 LASTDX(NUSED»JJ)=IVAL
	APPENDIX B 55

4207 GO TO 800

4208 40 READ(NBIN»KEY=II) K»Mt(LABEL(J>»(BITEM(ItJ)tIsltK)tJ«l»M)

4209 CALL BLIST(LIST,NUMStJVAL)

4210 AREA*LABEL(LIST(1))

4211 800 LINE(JJ)=AREA

4212 IF(ISOKT.NE.l) 60 TO 801

4213 CALL SRTREL(LINE»8*NUM)

4214 GO TO 900

4215 801 IF(.NOT.DISK) GO TO 802

4216 WRITE(15.5) (LINE(JJ)tJJ=1»NUM)

4217 GO TO 900

4218 802 PRINT 5»(LINE(JJ)tJJ=1tNUM)

4219 GO TO 900

4220 999 REWIND NDICT

4221 IFUSORT.NE.U GO TO 998

4222 ISORT=2

4223 GO TO 900

4224 998 CALL OBEY(tUSAGE»CHANGEit3)

4225 IF(DISK) REWIND 15

4226 995 REWIND NFILE

4227 RETURN

4228 990 REWIND NFILE

4229 REWIND NDICT

4230 RETURN 1

4231 5 FORMAT(lXt20A10)

4232 11 FORMATU8)

4233 END
56 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

3800 SUBROUTINE MEAN

3801 COMMON NAMES*ITYPEtIPTStIDIM

3802 COMMON /FTNCOM/ TAGS*IRECtARGStNARGStIFTNtNFTN

3803 DIMENSION ARGb(6t5)tNARGS<5)tIFTN(5)tITYPE(400)tIPIS<400)**

3804 IR£C<400)tNSUM(S)tVMAX(5)»VMIN(b)

3805 DOUBLE PRECISION NAMES(400)tTAGS<bt5)tSUMX(5)tSUMXb(5)

3806 INTEGER AR6S

3807 EQUIVALENCE (IVALtVAL)

3808 DATA IBLNK/' /

3809 %

3810 ENTRY MEANI(J)

3811 K=NARGS(J)

3812 DO 11 I=ltK

3813 SUMX<I)=0.

3814 VMAX(I)=-1.E30

3815 NSUM(I)=0

3816 VMIN(I)=1.E30

3817 11 SUMXS(I)=0,

3818 RETURN

3819 %

3820 ENTRY MEANS(J)

3821 K=NARGS(J)

3822 DO 21 I=ltK

3823 IVAL*IREC(ARGS<I+1»J))

3824 IF(IVAL.EQ.IBLNK) GO TO 21

3825 NSUM(I)=NSUM(I)+1

3826 VALUE=IVAL

3827 IF(ITYPE(ARGS<I+1»J)).EQ.2) VALUE=VAL

3828 IF(VALUE.LT.VMIN(I)> VMIN(I)=VALUE

3829 IF(VALUE.GT.VMAXd) ) VMAX (I) sVALUE

3830 SUMX(I)=SUMX(I)*VALUE

3831 SUMXS(I)=SUMXS(I)*VALUE*VALUE

3832 21 CONTINUE

3833 RETURN

3834 %

3835 ENTRY MEANO(J)

3836 K=NARGS(J)

3837 DO 40 I=ltK

3838 IF(NSUMd) .EU.O) GO TO 33

3839 PRINT 31tTAGS(I»J)tNSUM(I)

3840 31 FORMAT(/« MEAN STATISTICS FOR tA8t WITHttI6t ITEM(S).')

3841 AMEAN*SUMX (I) /NSUM(I)

3842 RMS=SUMXS(I)/NSUM(I)

3843 IF(ITYPE(ARGS(I*ltJ)).EQ.2) 60 TO 32

3844 MIN=VMIN(I)

3845 MAX=VMAX(I)

3846 PRINT 35»MlNtMAX»AMEANtRMStSUMX(I)tSUMXS(I)

3847 GO TO 34

3848 33 PRINT 36tTA6S(ItJ)

3849 36 FORMAT(/« NO VALUES PRESENT FOR »tA8)

3850 GO TO 40

3851 32 PRINT 35»VMIN(I)tVMAX(I)tAMEANtRMStSUMX(I)tSUMXb(I)

3852 35 FQRMATC MlN=»»F9.2»» MAX=ttF9.2t t MEANst f F9.£t%
	APPENDIX B 57

3853 « ROOT MEAN SQ.=»t1PG9.2/*

3854 SUM=»fOPF12.2f SUM OF SQUARES*' f 1PG12.^i

3655 34 IFCNSUMU) ,LE»1> 60 TO 40

3856 V=(SUMXS(I)-SUMX(I)*SUMX(I)/NSUM(!))/(NSUM(I)-1)

3857 SD=0.

3858 IFCV.GT.O,) SO=SQRT(V)

3859 PRINT 37 f SDtV

3860 37 FORMATC STD. DEV,st 9 lPG13.5t VARIANCE*'t613.5)

3861 40 CONTINUE

3862 RETURN

3863 END
58 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

1800 SUBROUTINE START

1801 COMMON /FILNAM/ MASTERfMASK»DEFTN»DFILEtNUMFtIPACK

1802 DOUBLE PRECISION MASTER(10)tMASK(10)»DEpTN(10)*DFILE<10)

1803 COMMON NAMES*ITYPEtIPTS>IDIM»VNAMES

1804 DOUBLE PRECISION NAMES(400)tVNAMES<4QO)*CQNTNT<5)

1805 DIMENSION ITYPE(400)»IPTS(400>tIPACK(10)

1806 IDIM=400

1807 CALL OBEYCEQUATE 8 FlLES't4)

1808 NUMF=1

1809 PRINT 1

1810 1 FORMAT(» WELCOME TO THE USGS "PACER" VERSION OF fHE'%

1811 i "GRASP" RETRIEVAL SYSTEM.'/' THE FOLLOWING DATA BASES'%

1812 ' ARE AVAILABLE*')

1813 10 READ(8tlltEND=20) MASTER(NUMF)tCONTNT»MASK(NUMF)»DEFTN(NUMF)»%

1814 DFILE(NUMF)»IPACK(NUMF)

1815 11 FQRMATU6»lX»5A8,3(lXfA6),I4)

1816 PRINT 12»MASTER(NUMF)tCONTNT

1817 12 FORMAT(/1X»A7»»<- ^SAa)

1818 NUMF=NUMF+1

1819 GO TO 10

1820 20 NUMF=NUMF-1

1821 REWIND 8

1822 PRINT 2

1823 2 FORMAT(/ THE USER MUST SPECIFY ONE OF THE ABOVE DATA BASESt %

1824 t FOLLOWING THE PROMPT. // A CHANGE OF DATA BASfcS CAN Bt MADE'*

1825 AT ANY TIME BY ENTERING THE WORD "FILE 11 '/' FOLLOWING THE' *

1826 ' PROMPT TO "ENTER COMMAND." 1 /)

1827 CALL FILE($20)

1828 RETURN

1829 END
	APPENDIX B 59

100 INTEGEK *ORDS<13) »COMAND»NAMEPT(26)»RCODE(26)tIVAL(26)»POLISH(60)

101 REAL»8 NAMES(400)»IFILES(20)»OFILES(20)»DFAULTtFILtID

102 COMMON NAMES»ITYPE»IPTS»IDIM

103 DIMENSION ITYPE(400)tIPTS(400)tIMAGE(4)

104 DATA DFAULT/»MASTER»/tMIfME/«UPDA'/

105 DATA WORDS/'COND*t»LObI 'SEAR'»«LIST«tiFILE*»»QUII*t'NAME't%

106 tHELP 1 »'REV!'9 'DUMP' »'FUNC' » 'MERG' » »TABL'/

107 NFILES=0

108 LPS=0

109 CALL OBEYCFORM WIDTH:80'»4)

110 CALL START

111 2 PRINT 801

112 801 FORMAT(//)

113 READ(5»l»END=999tPROMPTs'ENTER COMMAND: ) IMAGE

114 1 FORMAT(4A1)

115 ENCODE<COMAND»1) IMAGE

116 DO 6 1=1.11

117 IF(COMAND.EQ.WORDSU)) GO TO 7

118 6 CONTINUE

119 IF(COMAND.EQ.MINE) GO TO 800

120 PRINT 3tCOMAND

121 3 FORMAT(1X,A4»» ILLEGAL COMMAND. ENTER HELP IF YOU WISH TO SEE»»%

122 t THE LEGAL COMMANDS.'/)

123 GO TO 2

124 1 GO TO (5»10»15»6lO»400»999t700t500t450»55G»300t8iOi820),1

125 5 CALL READER(NAMEPT»RCODE»IVAL»NREXP»S,999)

126 GO TO 2

127 10 CALL PPARSE<POLISH»LPS»NREXP»&999)

128 GO TO 2

129 15 CALL RETRVE(IFILEStOFILEStNFIL£StPQLISH»LPS»NAMEPT»RCODfc:fIVAL%

130 tNREXP»UO»S,999)

131 GO TO 2

132 300 FILEID=DFAULT

133 IF(NFILES.GT.O) FILEID=OFILES(NFILES)

134 CALL FTNC<FILEIO»&999)

135 GO TO 2

136 400 CALL FILEU2)

137 GO TO 2

138 450 CALL CONDS(NREXP»LPS)

139 IF(NFILES.GT.O) GO TO 410

140 PRINT 409

141 409 FORMAT( NO FILES HAVE BEEN USED AT THIS TIME. 1 )

142 GO TO 2

143 410 PRINT 401t<IFILES(I>»OFILESU)»I*l»NFILES>

144 401 FQRMATP INPUT? OUTPUT : / (2X» A8»2Xt A«/) )

145 GO TO 2

146 500 CALL HELP(WORDS)

147 GO TO 2

148 550 CALL DUMPIT

149 GO TO 2

150 700 CALL NAME(&999)

151 GO TO 2

152 610 CALL LIST<&999)
60 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

153 60 TO 2

154 800 CALL REVISE(&999)

155 60 TO 2

156 810 CALL MERSE

157 60 TO 2

158 820 CALL TABLE

159 60 TO 2

160 999 CALL QUIT (OFILES.NFILES)

161 STOP

162 END
APPENDIX C 61

APPENDIX C, PROGRAM LISTINGS OF 

PACER SUBROUTINES

SUBROUTINE REVISE

Subroutine REVISE is the controlling subroutine 

for the five available updating procedures, and a 

listing may be found following this discussion. This 

subroutine initializes the needed control parameters, 

calls the updating subroutines, and posts the updated subfile onto the master file upon conclusion of 

the update procedure.

The unlabeled COMMON statement (line number 

153) is used to transmit the data values for ITYPE, 

VLIST, NELEM, and FILENM (as defined in the 

listing) from the original GRASP program logic for 

use by the updating subroutines. The remaining 

parameters in this unlabeled COMMON are not used 

by any of the updating subroutines and are, therefore, treated simply as dummy variables.

The labeled COMMON statement, LOG (line 154) 

is used to transmit data between the updating subroutines. The variables in this statement are defined 

in the first part of listing except for MONTH, IDAY, 

and IYEAR which come from the INFONET subroutine MMDDYY (line 208) for obtaining the date 

of execution from the computer clock.

The DATA statements (lines 155-159) are used to 

initialize data values for QQ, NO, IYES, DROP, 

QUIT, Kl, and K2. The array QQ is used to store 

part of the alphanumeric data string for the dynamic assignment of the update subfile to file number 21. The data values for IYES and NO are used 

for alphanumeric comparisons of user responses to 

computer prompts. The alphanumeric initialization 

of DROP is used for the dynamic release of a previously assigned file. The data for QUIT is used for 

comparison with the alphanumeric quit command. 

The data for arrays Kl and K2 are used to denote 

the maximum number of computer words reserved 

for each of the data elements. Array Kl is substituted into array KWORD when the WCOAL and 

ECOAL master files are being Used, and array K2 is 

placed into KWORD for the USALYT master file. If 

another master file is added to the PACER system, 

it must have an appropriate array defining the number of computer words reserved for each data element available for substitution into KWORD.

The instruction-suppression code is input (line 

160) and tested (line 162), followed by the output 

of the instructions (lines 163-198), if not suppressed by the code.

The input master-file name is tested against the 

available selection of master files (lines 200-202) to 

select the corresponding value of KDIC. After the 

value of KDIC is selected, the corresponding array 

defining the file structure is loaded into KWORD. 

Again, if new master files are added, the FORTRAN 

code must be modified to permit the definition of 

another KDIC value as well as to permit the transfer 

of the related file-structure word-length array into 

KWORD. The value of KDIC is also used for a keyed 

read of the dictionary file (line 207) to obtain the 

total number of records, MAXREC, residing in the 

master file.

Subroutine MMDDYY (line 208) is a subroutine 

in the INFONET library which is used to read the 

month, day, and year from the computer clock. This 

is combined with the data manager identification 

number, IDM (line 210), to construct the log number, ILOG (line 212). This log number is placed into 

the master-file ID number when a record has been 

deleted, or when a record has been added to the master file with the ID field left blank.

The user is then prompted to select an update procedure, IREV (line 214), with the test for zero (line 

215) to exit from the update procedure and the test 

for the ADDREC procedure (line 216) to skip unnecessary file management. File management for 

modification of the subfile with any of update procedures 2 through 5 begins with a prompt for the 

subfile name (lines 219-220) and a test for the characters QUIT (line 221), which will cause a return 

from the REVISE subroutine. The remaining lines 

(lines 222-227) encode the file name with the rest of 

the alphanumeric string, ALFA, to equate the subfile 

name to file 21. This equivalence is performed dynamically during execution through the INFONETdependent subroutine, OBEY (line 225). The INFONET-dependent subroutine, UPDATE, is called 

(line 227) to permit keyed records to be written 

onto file 21 without disturbing the other records residing on that file. The preceding REWIND statement (line 226) is used to ensure that the file is 

properly closed before it is opened in the update 

mode.

The OBEY subroutine is called (line 228) to 

equivalence file 9 with the dictionary file, USCDIC. 

This dictionary file is used with the three existing 

master files of the NCRDS. If other dictionary files 

were to be required with the addition of other master 

files, the appropriate modifications to the source 

code would be required.

The OBEY subroutine is also used to equivalence
62 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

file 20 with the master-file name selected following 

the response to the FILE command (lines 229-231). 

This permits the record changes and additions to be 

posted to the proper master file. If new master files 

are added to the data base, a similar statement must 

be added to this part of the logic. File 20 is then rewound (line 232) so that it can be placed in the update mode without conflict with prior master-file 

activity. Subroutine UPDATE (line 233) is an INFONET-supplied subroutine which permits the writing of records onto file 20 without the destruction of 

all data previously residing on that file. If the file is 

not placed in the update mode, the write operation 

creates a new file having the same name but consisting only of those records written onto the file during 

program execution. The execution of read operations 

is also permitted on this file while it is in the update 

mode.

The selection of an update procedure (lines 234- 

238) is based on the value of IREV entered for the 

prompted read (line 214). The $100 parameter returns execution to statement 100 which initiates the 

prompt for a new update procedure, while $200 

shifts control to statement 200 which rewinds file 21.

The posting of the revised subfile onto the master 

file is accomplished by a series of prompt commands 

and write statements (lines 240-267). Subroutine 

GETKEY (lines 259 and 264) is used to obtain the 

record key for the data read from the subfile on file 

21 (lines 258 or 263). The tests for MAXREC (lines 

260 and 265) are used to update the maximum record key number so that it will be greater than or 

equal to the largest key valve for all records added 

to the master file. The next block of statements (lines 

268-271) closes the dictionary file, places it in the 

update mode, writes MAXREC onto the line with 

the same key value as KDIC, and closes the file once 

again to the read-only mode. After the subfile has 

been posted onto the master file, the master file is 

also closed by rewinding file 20 (line 273).

Of particular importance to the programmer are 

the modifications to this program which must be 

made when: (1) the program is to be adapted for 

other data bases; (2) the program is to be adapted 

to other computer systems. These changes are noted 

in this documentation to enable the programmer to 

modify these subroutines to suit his available computer system and the different data-base structures.

A change in the data bases will require the addition of an array for storing the maximum number 

of computer words reserved for each raw-data element. This data array should be similar to the arrays 

Kl and K2 (lines 158-159). The master-file index, 

KDIC, must be defined in a manner similar to that in 

lines 200-202. The logic for specifying KWORD may 

be encoded as shown in lines 203-206. A MAXREC 

value specifying the maximum record key used in 

the master file must be saved in some manner. In 

this listing, it is stored in the KDIC-valued line of 

the dictionary file, read in (line 207) for test and 

update, and then rewritten (line 270) over its original position. The master-file name must be equivalenced to device 20; this is achieved by the OBEY 

subroutine in lines 229-231.

The INFONET system-dependent subroutines 

used for dynamic file management and requiring reprogramming for other systems are OBEY, UPDATE, and MMDDYY. The OBEY subroutine (lines 

225 and 228-231) is used to equivalence the file 

names to the input-output device and to drop (line 

280) the subfile from the computer system. The system routine, UPDATE, is used to place files in the 

update mode (lines 227, 233, and 269). The 

MMDDYY subroutine is also INFONET dependent 

and is used to obtain the month, day, and year value, 

which are used by the log number. If this software 

is used with a computer system other than INFONET, the system-dependent logic must be reprogrammed to make it compatible with the new computer system.
APPENDIX C 63

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

136

139

140

141

142

143

144

145

146

147

148

149

150

151

152

SUBROUTINE REVISED)

% THIS IS SUBROUTINE "REVISE."

% IT IS DESIGNED TO ADDt DELETE* OR CHANGE RECOKOS

% OH PORTIONS OF RECORDS BELONGING TO THE MASTEK

% FILE.

% FILENMa THE NAME OF THE MASTER FILE.

VLIST a THE ALPHANUMERIC LIST OF THE VARIABLES

AS THEY APPEAR IN THE. MASK FILE, 

a THE VARIABLE TYPE OR THE DICTIONARY

POINTER AS LISTED IN THE MASK FILE, 

a DUMMY INPUT FILL FOR PLACING THE FILE

TO BE UPDATED INTO THE 'OBEY*"STATEMENT, 

a REFORMATTED ALPHANUMERIC STRING FOR

PLACING THE NAME OF THE FILE TO BE

UPDATED INTO CORRESPONDING »OBEY»

STATEMENT, 

a NUMBER OF DATA ELEMENTS IN ONE

MASTER RECORD, 

a AN ARRAY SPECIFYING THE MAXIMUM NUMBER OF

COMPUTER WORDS RESERVED FOR EACH RAW DATA

ELEMENT.

a THE MAXIMUM RECORD KEY VALUE FOR THE MASTER FILE, 

a INDEX TO IDENTIFY THE MASTER FILE BEING USED AND TO

LOCATE THE PROPER MAXREC VALUE FROM THE DICTIONARY

FILE.

a NUMBER OF RECORDS REVIEWED IN THE SELECTED SUBFILE, 

a DATA TO BE TRANSFERRED INTO THE »KWORU»~ARRAY FOR

USE WITH MASTER FILES "WCOAL" AND "ECOAL. 11 

a DATA TO BE TRANSFERRED INTO THE "KWORU" ARRAY FOR

USE WITH MASTER FILE »USALYT,» 

a THE INSTRUCTION SUPPRESSION CODE. AN INPUT

VALUE OF 23~wiLL SUPPRESS THE INSTRUCTION

PRINTS FROM SUBROUTINES "REVISE* 11 "ADUREC*" 

"DELREC*" "SEQREV*" "KEYREV*" AND "BA1CH."

a THE DATA MANAGER ID NUMBER (1*99).

a THE UPDATE PROCEDURE SELECTION CODE.

a THE LOG NUMBER FOR RECORDS ADDED WITHOUT AN 

ID NUMBER AND FOR RECORDS DELETED FROM 1"HE

MASTER FILE. THIS NUMBER is ASSIGNED AS THE 

NEW ID NUMBER, IT IS A CODED* EIGHT DIGIT 

NUMBER WITH THE TWO LEFTMOST DIGITS DtSlGNATING 

THE YEAR* THE NEXT TWO DIGITS DESIGNAIING THE 

MONTHt AND THE NEXT PAIR OF DIGITS DESIGNATING 

THE DAY OF RECORD CHANGE* WITH THE FINAL PAIR 

OF DIGITS DENOTING THE DATA MANAGER RtSPONSIBLE 

FOR THE ADDITION OR THE DELETION OF THOSE 

RECORDS,

QQ<5)

KWORD(400) 

IDATA(400) 

K2(50) 

FILENM* VLISTC400)

ITYPE

QQ

ALFA

NELEM

KWORD

MAXREC

KDIC

NREC 

Kl

K2 

IRITE

IDM

IREV

ILOG

DIMENSION 

DIMENSION 

DIMENSION 

DIMENSION

ALFA(5)t 

ITYPE(400)t 

DROP<4>» 

KKSOJt

DOUBLE PRECISION
64 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

COMMON NAMEO(SOO)tITYPEtPAD(401)tVLISTtNELEMtFILENM 

COMMON /LOG/ MONTHtiDAYtIYEARtILOGtMAXRECtKWONDtKDIC*1KITE 

DATA QQ/'EQUA'*'TE 2't'l '/* IBLANK/t */ 

DATA NOtlYES/'NO't'YtS'/ 

DATA DROP/'DROP'*3*» '/tQUIT/'QUIT'/

DATA Kl/4f6t7*lt4t6fi94t6flt4tStlf4f7tlt4f5tlt3fltl/ 

DATA K2/4t6*7*l t4t6t4t6t4t5*4»7*3»5»lt3*2t>*l/ 

R£AD(5»1020fPROMPTa'KLEASE HNfcSS CARRIAGE RETURN, t) 1RITE 

1020 FORMATU2)

IFURITE ,EQ. 23) GO TO 8 

WKITE<6»1000)

1000 FORMATC/' THIS IS "UPDATE."'/' IT IS DESIGNED TO PERMIT THE'% 

USER TO ADD RECORDS TO OR DELEfE RECORDS FROM THE'/ % 

MASTER FILEf OR TO CHANGE RECORDS OR PORTIONS OF RECORDS' % 

IN A SUBFILE OF THE'/' MASTER FILE AND TO POST THESfc' % 

CHANGES ONTO THE MASTER FILE.'//' THE FIVE PROCEDURtS* * 

USED TO UPDATE THE MASTER FILE ARE;'//' 1. THE ADDITION' % 

OF NEW RECORDS ALREADY WRITTEN INTO~A TEMPORARY FlLfc.' % 

UNLIKE*/' THE OTHER UPDATE PROCEDURES WHICH OPtRATE' % 

ON RECORDS IN THE MASTER FILE'/' FORMAL THIS* % 

PROCEDURE OPERATES ON RAW DATA RECORDS AND CONVERTS' % 

THESE'/' RECORDS TO THE MASTER FILE FORMAT FOR* * 

INSERTION INTO THE MASTER FILE,'//' 2. THE DELETION* BY' % 

KEYt OF RECORDS ALREADY EXISTING IN THE MASTER FILE.'/ >

WRITE(6»1003> 

1003 FORMAT( %

3, THE SEQUENTIAL REVISION OF RECORDS FROM A SELECTED' %

SUBFILE (I.E. SELECTED'/' THROUGH A LOGICAL SEAKCH)' %

FROM THE MASTER FILE. THIS SUBFILE MAY THEN BE«/' %

POSTED ONTO THE MASTER FILE AFTER THE DESlRtD REVISIONS' %

ARE COMPLETED.'//' 4. THE SELECTION* BY KEY* OF» *

ANY RECORD BELONGING TO~THE SUBFILE FOR REVISION'/' ' %

OF ANY SELECTED DATA ELEMENT. THE DATA MANAGER HAS THE' %

OPTION OF POSTING'/' THE SELECTED RECORD ONTO TH£» %

MASTER FILE OR LEAVING ITi AS REVISED* IN THE'/' ' %

SUBFILE FOR FURTHER REVISION.'//' 5. THE BATCH REVISION' %

OF A GIVEN DATA ELEMENT WHICH WILL BE THE SAME VALUt FOR' %

ALL RECORDS IN THE SELECTED SUBFILE.'//' WHEN' %

REVISION HAS BEEN COMPLETED ON ANY SELECTED SUBFILE* THE' %

USER MAY THEN'/' ELECT TO POST THE REVISED SUBFILE ONTO' %

THE MASTER FILE* OR SAVE THE SUBFILE FOR'/' KEVIEW AND' %

POSSIBLE FURTHER REVISION BY ANY OF THE 2-5 UPDATE' %

PROCEDURES.'/' RECORDS DELETED FROM THE MASIER FILE ARE' %

SAVED IN A SPECIAL "SAVE DELETION"'/' FILE FOR FUTURE' *

IF THERE SHOULD ARISE A NEED TO RECONSTITUTE' %

RECORDS.'//)

RECOVERY 

THESE'/' 

KDIC = 0 

IF(FILENM 

IFtFILENM 

IF(FILENM

.EQ. 

 EQ. 

.EQ.

 WCOAL') KDIC * 

'USALYT') KDIC 

'ECOAL') KDIC =

= 2

DO 9 I*1*NELEM 

IF(KDIC .EQ. 1) 

IF(KDIC .EQ. 3) 

IF(KDIC .EQ. 2)

KWORD(I) 

KWORDU) 

KWURD(I)

s K1U) 

K2(I)
APPENDIX C 65

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

READ(9,KEYsKDIC) MAXREC

CALL MMDDYY(MONTH*IDAYtIYEAR) 

15 CONTINUE

READ(5tl010tERR«15»PROMPTs'DATA MANAGER ID NO, (1-99): ') IDM 

1010 FORMAT(I2)

IL06 « 1000000*IYEAR « 10000»MONTH «- 100*IDAY * IDM 

100 CONTINUE

READ(5t»tPROMPT»'UPDATE PROCEDURE (1-5): ') IKEV

IFdREV ,EQ, 0) RETURN

IFdREV ,EQ, 1) 60 TO 16

DO 10 1=1.2 

10 Qttd+3) = IBLANK

READ(5tl001tPROMPT='DATA FILE TO BE REVISED: )*

QQ(4)tQQ(5)

IF(QQ(4) ,EQ, QUIT) RETURN

1001 FORMAT(2A4)

ENCODE(ALFA*1002tERN=998) QQ

1002 FORMAT(2A4,A2»2A4) 

CALL OBEY(ALFAtS) 

REWIND 21 

CALL UPDATE(21tl)

16 CALL OBEY<'EQUATE 9 uscDic»t4)

IF(K,DIC ,EQ, 1) CALL 08EYCEQUATE 20

CALL OBEY('EQUATE 20

CALL OBEY('EQUATE 20

2)

3)

IF(KDIC ,EQ, 

IF(KDIC ,EQ, 

REWIND 20 

CALL UPDATE<20,1)

WCOAL'f4>

USALYT't4)

ECOAL'»4)

ADDREC($20 0 f $1001NRECt QQ(4)t QQ(5)

DELREC(SIOO)

SEQREV(NREC)

KEYREVU100)

BATCH(S200»NREC)

REVISED, /% 

THE MASTER%

IFdREV ,EQ, 1) CALL

IFdREV ,EQ, 2) CALL

IFdREV ,EQ, 3) CALL

IFdREV ,EQ. 4) CALL

IFdREV ,EQ, 5) CALL 

200 REWIND 21

WRITE(6»1004) QQ(4)tQQ(5) 

1004 FORMAT(/' FILE "'tA4tA2f'" HAS BEEN

' DO YOU WISH TO WRIIE THIS FILE ONTO 

FILE?')

18 READ(5t1005tPROMPTsM»YES" OR "NO"J ') ITEST 

1005 FORMAT(A4)

IF((ITEST ,NE, IYES) ,ANO, (ITEST ,N£, NO)) 60 TO 18

IFdTEST .EQ, NO) 60 TO 100

% 'IDATA' IS USED AS A DUMMY VARIABLE FOR READ AND WRITE 

% OPERATIONS,

REWIND 21

WRITE(6tl007)

1007 FORMAT(/' DO YOU WANT TO POST THE ENTIRE SUBFILE?') 

19 READ(5tl005fPROMPTs'«YES" OR "NO": ') ITEST

IFUITESf ,NE, IYEST ,AND, (ITEST ,NE, NO)) 60 TO 19

IFdTEST ,EQ, IYES) 60 TO 21

00 20 I=ltNREC

READ(21) (IDATA(K)tK=ltNELEM)

CALL 6ETKEY(21tNKEY)

IF(NKEY ,6T, MAXREC) MAXREC * NKEY
66 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

261 20 WRITE(20?KEY*NK£Y) <IDATA(K)tK=l»NELEM)

262 60 TO 22

263 21 READ(2ltEND*22> <IOATA(K)tK«ltNELEM)

264 CALL 6ETKEY(21tNKEY)

265 IFtNKEY .GT. MAXREO MAXREC « NKEY

266 WRlTE(20tKEYsNKEY) (IDATA(K)tKsltNELEM)

267 GO TO 21

268 22 REWIND 9

269 CALL UPDATE (9tU

270 WRITE(9tKEYsKDlC) MAXREC

271 REWIND 9

272 WRITE(6tl009)

273 REWIND 20

274 1009 FORMAT*/' DO YOU WISH TO SAVE THIS FILE?')

275 25 R£AD(5tl005tPROMPTa«"YES" OR "NQ"J «) ITEST

276 IFUITEST .NE. IYES) .AND. (ITEST ,NE. NO)) GO TO 25

277 DROP(3) = QQ(4)

278 DNOP(4) * QQ(5)

279 REWIND 21

280 IFdTEST .EQ. NO) CALL 08EY(DROPt4)

281 GO TO 500

282 998 WRITE(6tl006)

283 1006 FORHAT(/« NAME OF FILE HAS BEEN IMPROPERLY ENTERED.')

284 GO TO 100

285 500 WRITE(6tl008)

286 1008 FORMAT(/» UPDATE OPERATIONS HAVE BEEN COMPLETED. /%

287 IF YOU WISH TO CONTINUE WITH THE UPDATE PROCEDURES %

288 ENTER THE NUMBER (1-5).t/i ENTERING A "0" FOR THE' %

289 ' PROCEDURE PROMPT OR "QUIT" FOR THE FILE PROMPT WILL'/ %

290 « RETURN CONTROL TO THE SEARCH AND RETRIEVAL PORTION OF' %

291 « "PACER."'/)

292 GO TO 100

293 END
APPENDIX C 67

SUBROUTINE ADDREC

Subroutine ADDREC is designed to read an unkeyed raw-data file, search the dictionaries for 

matching alphanumeric entries, prompt the user to 

add the nonmatching terms to the dictionary, convert the alphanumeric data values to master-file dictionary pointers, and write onto a second file a 

keyed, PACER-compatible record which is suitable 

for posting onto the master file. A listing of subroutine ADDREC appears at the end of the discussion. 

The subroutine listing contains a brief description 

(lines 102-107) followed by a definition list of the 

major variables (lines 109-167). The unlabeled 

COMMON and the LOG COMMON (lines 175-176) 

are the same as in subroutine REVISE. The QQIN 

array is used to equivalence the raw-data file to file 

31 whereas the QQOUT array is used to equivalence 

file 21 to the translated subfile that will then be 

posted onto the master file. The alphanumeric data 

strings, IBLANK, QBLANK, YES, XNO, and QUIT, 

are used for comparison of prompted user responses 

at various decision points throughout the logic. The 

NOD AT A array is used for entering the alphanumeric string NO DATA ENTERED into those 

alphanumeric data fields for which no data value 

exists.

If the value of IRITE was entered as any value 

other than 23 (line 182), the instruction message 

will be printed (lines 183-194). Then, the user is 

prompted to specify the name of his raw-data file 

(lines 195-196). If the characters QUIT were entered, the record addition procedure will be terminated and after the message (lines 307-312) is 

printed, file 31 is rewound and control is returned to 

REVISE (lines 313-314). The user is then prompted 

to specify the name of the translated file (lines 198- 

199). This file is transferred back to subroutine 

REVISE and becomes the subfile, which is then 

posted onto the master file. The file name is stored 

in variables QQ1 and QQ2 (lines 201-202) for this 

purpose. Again, if the characters, QUIT, were entered for the file name (line 200), the record addition procedure is terminated.

The QQIN and QQOUT arrays are then encoded 

into the ALFIN and ALFOUT arrays (lines 203- 

205) for use by the OBEY subroutine to equivalence 

the file names to the appropriate unit numbers. The 

key register, KEYR, is then set equal to the maximum record key value, MAXREC, in the master file. 

The key register is then incremented by 1 for each 

translated record which is posted onto the master 

file. Thus, all new record additions will be added to

the end of the master file. The total number of computer words per record, KWT, is determined by summing over all the KWORD values for the given number of data elements, NELEM, belonging to that 

master file (lines 209-211). This value of KWT is 

transmitted to the formatted output routines (lines 

299-304) to provide the length of the total raw-data 

string.

The user response to the prompting statements 

(lines 212-215) establishes the alphanumeric value 

for REVIZ which is tested for a YES value before 

each individual record is displayed. A test is made 

to ensure that the only alphanumeric value entered 

is either a YES or a NO (line 216); otherwise, the 

user is again prompted for a YES or NO response.

The counter for the number of records reviewed, 

NREC, is then initialized to zero (line 217), as is 

the counter for number of computer words required 

for the first through the I-th data elements, 

NWORDS (line 218). Program control returns to 

statement 100 each time a new record is to be read 

from the raw-data file. The reading of each record 

from the raw-data file is accomplished by a specially 

formatted subroutine selected by testing the value 

of KDIC (lines 219-221). Following the successful 

reading of the next record from the raw-data file 

(that is, if the EOF mark has not been encountered 

by the read operation), the value of NREC is incremented by 1 (line 222).

The logic to translate the raw-data record into a 

record compatible with a PACER master file is contained in the DO loop extending to statement 99 

(lines 223-295). The DO loop index ranges from 1 

to the number of data elements, NELEM. The number of computer words required to store the data 

string for the first "I" data elements is obtained by 

incrementing NWORDS by the number of words, 

KWORD, reserved for the data string of the I-th 

data element (line 224). Next the data type value, 

ITYPE, is tested (line 225) to determine whether 

the data element is an integer number, real number, 

or an alphanumeric string. If the data is integer, a 

transfer is made to statement 10; if it is real, a 

transfer is made to statement 20; and if it is alphanumeric, a transfer is made to statement 30.

At statement 10, the integer value of the raw data 

is simply transferred from the raw-data-array element, NSTRNG, to the I-th position in the masterrecord array, IMAGE (line 229). In the present application, the LOG value is substituted into the ID 

position of the master-record array, if no value has 

previously been entered (lines 230-235). Then,
68 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

transfer is made (line 236) to the end of the DO 

loop, where the value of I is incremented by 1, and 

the procedure is repeated for the next data element 

of the record.

At statement 20, the real value of the data is transferred from the data-array element, STRING, to the 

I-th position in the master-record array, QIMAGE 

(line 240), program control then jumping (line 241) 

to the end of the DO loop. It should be noted at this 

point that the arrays, IMAGE and QIMAGE, are 

equivalenced, as are the arrays, NSTRNG and 

STRING, although in each case one array is typed 

as integer and the other array is typed as real. The 

equivalencing of these arrays permits data to be 

read from or written to a data file through the use 

of only one of the equivalenced arrays.

Beginning at statement 30, the alphanumeric data 

string is matched to a dictionary entry, and an integer value, which indexes or "points" to that diction element, is placed in the I-th data position of the 

IMAGE array. The number of computer words required for the I-th data element is stored in KEND 

(line 250), the number of computer words required 

for the preceding I-th data elements is stored in 

KBEGIN (line 251), and the value of KP1 is defined to be one greater than KBEGIN (line 252). 

Special logic has been inserted (lines 252-254) to 

replace blank alphanumeric data in elements 5 and 

7 with a dash. Then, all seven words of the NAME 

array are blanked -(lines 255-256), and the first LT 

nonblank values of the NSTRING array are counted 

and substituted into the NAME array (lines 257- 

260). If the number of nonblank words, LT, is 

greater than zero, the logic jumps to statement 54 

(line 261); otherwise, it inserts the alphanumeric 

data, NO DATA ENTERED, into the NAME array 

and also into the NSTRNG array (lines 262-266).

The ITYPE value for alphanumeric data is the 

dictionary number of the I-th data element plus 10. 

Therefore, the dictionary number, NDIC, can be 

found by subtracting 10 from ITYPE. This value, 

the alphanumeric string in array, NAME, and the 

length of that string, LT, are each placed into the 

calling sequence of subroutine MATCH (line 268) 

which searches for a matching dictionary entry and 

the record key, MKEY, for that entry. If a new entry made from the terminal contains only blank 

data, control will be returned to statement 995. If a 

dictionary match is found, the pointer to this entry 

is translated into the I-th element of the IMAGE 

array (line 269), and control is passed (line 270) to 

the end of the DO loop to recycle and process the 

next data element.

If there is no dictionary match, control is transferred to statement 994, where a message is displayed on the terminal asking the user if he wants 

the alphanumeric string entered into the dictionary. 

Checks are made to ensure that the response is 

either YES or NO (lines 271-278). If the response 

is YES, the number of entries, NUM (returned from 

subroutine MATCH), contained in that dictionary 

category is increased by 1 (line 279). Then subroutine ADDICT is called (line 280) to write the entry 

into the dictionary and to update the value of NUM 

stored at the beginning of that dictionary category.

The value of NUM is also stored in the I-th position of IMAGE as the new dictionary pointer (line 

281), and control is again transferred to the end of 

the DO loop (line 282).

If the user does not wish to have the nonmatching 

alphanumeric data entered into the dictionary, he is 

then prompted to re-enter the alphanumeric string 

(lines 283-288). The alphanumeric string is also 

transferred into NSTRING (lines 289-290), and 

control is transferred (line 291) to statement 50, 

where the matching procedure is executed once more.

If, in subroutine MATCH, it is determined that 

the data string is blank, a message is written (linea 

292 and 293), and control is transferred (line 294) 

to statement 60 for re-entry of the data (line 283).

Once the DO loop has been completed, the input 

value of the record key, KEYP, is tested to see if it 

has been entered (line 296). If it has not, KEYR, 

which was initialized as the value of MAXREC, is 

incremented by 1. Next, KEYA is set equal to KEYR 

(line 297). If KEYP is greater than zero, KEYA is 

instead set to the value of KEYP (line 298). This is 

to ensure that, if the records to be added were once 

a part of the master file and the record key is known, 

then they would be written into the same keyed 

location.

If a display of each record has been requested, 

these records will be output through a specially formatted subroutine which is dependent upon the data 

structure (lines 299-304).

Finally, the translated record is written onto unit 

21 (line 305), and control is transferred (line 306) 

to statement 100 to continue with the processing of 

the next record in the raw-data file.

When all records have been processed, a message 

is displayed stating that the file is ready for posting 

(lines 307-312). The raw-data file is rewound (line 

313), and control is returned to REVISE (line 314).

The ADDREC logic that is data-base dependent 

appears in: lines 219-222, where a particular input
APPENDIX C 69

routine is selected based upon a specific index in the 

master file; lines 230-235, where the log number is 

substituted for blank data of the ID number in the 

given master-file record; lines 253-254, where dashes 

are substituted for blank entry of the directions for 

township and range in all master files; and lines 

299-304, where the special output display subroutines are dependent upon the data structure of each 

of the master files.

The INFONET-dependent OBEY subroutine is 

used twice in ADDREC. The first time (line 206) it 

is used to equivalence the raw-data file name to unit 

31, and the second time (line 207) to equivalence the 

translated output file to unit 21.

100 SUBROUTINE ADDREC<*.**NRtC?QQl?QQ2>

101 %

102 % SUBROUTINE "ADDREC" IS DESIGNED TO REA,D AN UNKEYED? DATA

103 % FILE* SEARCH THE DICTIONARIES TO ENSURE CORRECT ALPHANUMERIC

104 % INPUT* CHANGE THE ALPHANUMERIC DATA VALUES TO DICTIONARY

105 % POINTERS AS USED IN "PACER?" AND WRITE A KEYED? "PACER"

106 % COMPATIBLE RECORD SUITABLE FOR POSTING ONTO THE MASTER

107 % FILE.

108 %

109 % NELEM a NUMBER OF DATA ELEMENTS IN A MASTER KECORD.

110 % VLIST a DATA ELEMENT NAMES AS THEY APPEAR IN THE

111 % DEFINITION AND MASK FILES,

112 * ITYPE a TYPE DESIGNATION OF THE DATA ELEMENTS AS

113 % LISTED IN THE MASK FILE.

114 % ITYPE a 1.,,INTEGER TYPE DATA

115 % ITYPE a 2,..REAL TYPE DATA

116 % ITYPE > 10...DATA CONSISTS OF A DICTIONARY

117 % POINTER TO REFERENCE A LOOKUP IN THE

118 % (ITYPE - 10)TH DICTIONARY.

119 % NREC a NUMBER OF RECORDS REVIEWED IN THE SELECTED SUBFILE.

120 % KOIC a INDEX TO IDENTIFY THE MASTER FILE BEING USED AND TO

121 % LOCATE THE PROPER MAXREC VALUE FROM THE DICTIONARY

122 % FILE.

123 % IMAGE a INTEGER REPRESENTATION OF MASTER DATA

124 % ELEMENTS? INCLUDING INTEGER DATA AND

125 % DICTIONARY POINTERS.

126 % QIMAGE a REAL REPRESENTATION OF MASTER DATA ELEMENTS

127 % THROUGH EQUIVALENCE WITH IMAGE.*

128 % NSTRNG a INTEGER REPRESENTATION OF T HE DATA STRING FOK

129 % ALL DATA ELEMENTS (INTEGER & ALPHANUMERIC)

130 % BELONGING TO A MASTER RECORD.

131 % STRING a REAL REPRESbNTATION (THROUGH EQUIVALENCE

132 % STATEMENT) OF THE DATA STRING FOR ALL REAL133 % VALUED DATA ELEMENTS BELONGING TO A

134 % MASTER RECORD.

135 * NAME a ARRAY (UP TO 7 COMPUTER WORDS) OF NEW ALPHA136 % NUMERIC DATA FOR COMPARISON WITH EXISTING

137 % DICTIONARY ENTRIES TO 1) DETERMINE UICT138 % IONAHY POINTER OR 2) TO DETERMINE THAT A

139 % DICTIONARY ENTRY DOES NOT EXIST FOR \ HE

140 % GIVEN DICTIONARY CATEGORY,

141 * LT a NUMBER OF WORDS (LESS THAN OR EQUAL 10 7)

142 % NEEDED TO STORE THE ALPHANUMERIC ENTKY IN

143 % "NAME."

144 % KWORD a AN ARRAY SPECIFYING THE MAXIMUM NUMBtR OF

145 % COMPUTER WORDS RESERVED FOR EACH RAW DATA

146 % ELEMENT.

147 % NWORDS a THE TOTAL MAXIMUM NUMBER OF COMPUTER WORDS

148 % NEEDED TO STORE RAW DATA FOR THE 1ST THROUGH

149 * THE I-TH DATA ELEMENTS.

150 % KBEGIN a THE TQtAL MAXIMUM NUMBER OF WORDS NEEDED TO

151 % STORE RAW DATA FOR THE 1ST THROUGH THE

152 % (i-DTH DATA ELEMENTS.
70 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

153

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

1009

KEND « THE MAXIMUM NUMBER OF WORDS NEEDED TU STORE 

THE I-TH DATA ELEMENT, THIS UNSUBSCKIPTED 

VARIABLE IS EQUIVALENT TO KWORD(I), 

NDIC * DICTIONARY CATEGORY REFERENCE NUMBER, 

NUM r TOTAL NUMBER OF DICTIONARY ENTRIES IN THE

"NDIC" DICTIONARY CATEGORY, 

MAXREC = MAXIMUM RECORD KEY IN THE MASTER FILE, 

KEYR = KEY NUMBER FOR RECORDS TO BE ADDED FOLLOWING

THE LAST RECORD ("MAXREC") IN THE MAbTER FILt, 

KWT = TOTAL OF ALL "NELEM" "KWORD"S, 

ALFIN =* DUMMY ARRAY TO DESIGNATE INPUT FILE NAME, 

ALFOUT = DUMMY ARRAY TO DESIGNATE NAME OF TRANSLATED 

FILE TO 8E POSTED TO THE MASTER FILE.

QQIN = DUMMY ARRAY TO BE ENCODED INTO "ALFIN," 

QQOUT = DUMMY ARRAY TO BE ENCODED INTO "ALFOUT,"

DIMENSION 

ITYPE(400)t 

KWORDUOO) t 

ALFIN(5)» 

QQOUT(5)f

IMAGE(400)t 

QIMAGE(400)t 

NAME(7)t 

ALFOUt(5)t 

NODATA(4)

PRECISION

NSTRNGUOO) t 

STRING(400)t 

VLIST(400)t 

QQIN(5)t

VLIST

»t»21 /

TO READ A*

1

DOUBLE

COMMON NAMED(800)tITYPEtPAD(401)tVLlSTtNELEM

COMMON /LOG/ MONTHtIDAYtlYEARtILOGtMAXRECtKWOHDfKDICtIRITE

EQUIVALENCE (IMAGEtQIMAGE)f(NSTRNGtSTRING)

DATA IBLANKtQBLANK»YEStXNO/» *t* t* YES*t»NO*/

DATA QQIN/*EQUA*t*Tt *t*31 */*QQOUT/*EQUA*t*Tt

DATA QUIT/*QUIT*/

DATA NODATA/*NO o*t*ATA *t*ENTE*t*RED /

IFdRITE ,EQ, 23) GO TO 1

WRlTE(6tl009)

FORMAT(/» THE ADD RECORD PROCEDURE IS DESIGNED

RAW DATA INPUT FILE AND CONVERT*/* THE RECOKDS TO THE* % 

RECORD STRUCTURE THAT IS COMPATIBLE WITH THE MASTER FILE*/* 

OF "PACERt" CHECKING FOR CORRECT DICTIONARY ENTRIESt AND* % 

PROMPTING THE DATA*/* MANAGER TO REQUEST ADDITION OK THE* % 

NONMATCHING DICTIONARY ENTRIES TO THE*/* DICTIONARY LIST* % 

OR TO CORRECT THE INPUT ENTRY SO THAT IT MATCHES A VALUE*/* 

ALREADY IN THE DICTIONARY LIST,*//* IF THE INPUT FILE DOES** 

NOT CONTAIN RAW DA?Af THE DATA MANAGER CAN E.XIT THIb*/ * 

REVISION PROCEDURE TO SELECT A DIFFERENT PROCEDURE (3-5)* * 

BY ENTERING "QUITt"*/* WHEN PROMPTED FOR A FILE NAMfc.,*// )

READ(5tl002tPHOMPTs*NAME OF RAW DATA INPUT* 

FILE: *) QQIN(4)tQQINCS)

IF(QQIN(4) ,EQ, QUIT) GO TO 999

READ(5fl002tPROMPTs*NAME OF TRANSLATED FILE*

POSTING TO MASTER FILE: ) QoouTmtQQouT(5)

IF(QQOUT(4) ,EQ. QUIT) GO TO 999 

QQ1 « QQOUT(4) 

QQ2 = QQOUT(5) 

FORMAT(A4t2A3fA4tA2) 

ENCODEULFINt !003tERR=998) QQIN 

ENCODE(ALFOUTf1003t£RRs998) QQOUT 

CALL OBEY(ALFlNt4)

FOR

1003
APPENDIX C 71

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

246

249

250

251

252

253

254

255

256

257

258

259

260

CALL OBEY(ALFOUT*4)

KEYR a MAXREC

KWT a 0

00 2 lal.NELEM 

2 KWT a KWT * KWORD(I)

WRITE(6»1011) 

1011 FORMAT(/« DO YOU WISH TO DISPLAY EACH RECORD IN THE «*

"INPUT FILE ON THE TERMINAL? 1 ) 

b READ(5tl001*PROMPTat»'YES" OR "N0"« «) REVIZ

IF((REVIZ .NE. YES) .AND. (REVIZ .NE. XNO)) 60 TO 5

NREC a 0 

100 NWORDS a 0

IF(KDIC .EQ. 1) CALL REDUSC(NSTRNG»STRING»KEYP,$999)

IF(KDIC .EQ. 2) CALL REDUSA(NSTRNG*STRING»KEYP f $999)

IF(KDIC .EQ. 3) CALL REDUSC(NSTRNG.SfRINGtKEYPf$999)

NREC a NREC + 1

DO 99 Ial,NELEM

NWORDS a NWORDS * KWORDU)

IF(ITYPEU) - 2) 10*20.30

% LOAD INTEGER DATA INTO THE "PACER" RECORD FORMAT.

10 IMAGE(I) a NSTRNG(NWORDS) 

IF (KDIC .NE. 1) GO TO 15 

IF(I .EQ. 26 .AND. IMAGE(26) .EQ. 0) IMAGE(26) a n_ 0G

15 IF(KDIC .NE. 2) GO TO 16

IF(I .EQ. 23 .AND. IMAGE(23) .EQ. 0) IMAGE(23) * ILOG

16 IF(KDIC .NE. 3) GO "0 99

IF(I .EQ. 26 .AND. IMAGE(2b) .EQ* 0) IMAGE(26) a ILOG 

GO TO 99

% LOAO REAL DATA INTO THE "PACER" RECORD FORMAT.

20 QIMAGE(I) a STRING(NWORDS) 

GO TO 99

% CHECK ALPHANUMERIC ENTRIES FOR DICTIONARY CONSISTENCY.

% IF ENTRY DOES NOT APPEAR IN THE DICTIONARY...CHECK WITH

% THE DATA MANAGER TO DETERMINE IF IT IS INTENDED THAT

% THE ENTRY BE ADDED TO THE DICTIONARY. THEN* COMPUTE

% THE DICTIONARY POINTERS AND LOAD THE DATA INTO THE

% "PACER" RECORD FORMAT.

30 KEND a KWORD(I)

KBEGIN a NWORDS * KWORO(I)

KP1 a KBEGIN * 1

IF(I .EQ. 5 .AND. NSTRNG(KPl) .EQ. IBLANK)

IF(I .EQ. 7 .AND. NSTRNG(KPl) .EQ. IBLANK)

40 DO 41 Kal.7

41 NAME(K) a IBLANK

50 LT a 0

DO 51 Kal*KEND

NAME(K) a NSTRNG(KBEGIN * K)

51 IF(NAME(K) .NE. IBLANK) LT a LT * 1

NbTRNG(KPA) a 

NbTRNG(KPA) a
72 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

261 IFJLT .ME. 0) 60 TO 54

262 DO 52 K=l»4

263 52 NAME(K) = NODATA(K)

264 LT = 4

265 DO 53 K=1»KEND

266 53 NSTRNG(KBEGIN+K) = NAME(K)

267 54 NDIC « ITYPE(I) - 10

268 CALL MATCH(NAMEfNDIC»LT»MKFYtNUM»$994t$995)

269 IMAGE(I) * MKEY - NDIC*10000

270 GO TO 99

271 994 WRITE(6f2001) VLIST(I)tNAME

272 2001 FORMAT(/ THERE IS NO DICTIONARY MATCH FOR DATA NAME; »*

273 tA7/» ALPHANUMERIC DATA: »»7A4/%

274 t DO YOU WISH TO ENTER THIS DATA IN THE DICTIONARY?t)

275 55 READ<5tl001tPROMPTs» ll YES" OR "NO"! M TEST

276 1001 FORMATCA4)

277 IF((TEST .NE. YES) .AND. (TEST .NE. XNO)) GO TO 55

278 IF(TEST .NE. YES) GO TO 60

279 NUM = NUM * 1

280 CALL ADDICT(NAMEtLTtNDICtNUM)

281 IMAGE(I) = NUM

282 GO TO 99

283 60 WRITE<6t2002) VLIST(I)

284 2002 FORMAT(/» ENTER DATA VALUE FOR DATA NAME M »tAff fll »)

285 DO 61 L=l»7

286 61 NAME(L) = IBLANK

287 READ(5«1002»PROMPTs»DATA VALUE: ) NAME

288 1002 FORMAT(7A4)

289 00 62 K=lfKEND

290 62 NSTRNG(KBEGIN*K) « NAME(K)

291 GO TO 50

292 995 *RITE(6t2003)

293 2003 FORMAT(/ BLANK DICTIONARY ENTRIES ARE NOT LEGITIMATE.')

294 GO TO 60

295 99 CONTINUE

296 IF(KEYP .LT. 1) KEYR * KEYR * 1

297 KEYA = KEYR

298 IF(KEYP .GT. 0) KEYA * KEYP

299 IF(REVIZ .EQ. tYESt ,AND* KDIC ,EQ. U %
	APPENDIX C 73

300 CALL OUTUSC(NSTRNG»STRINGtK£YA»KWT)

301 IF(REVIZ .EQ. »YES» .AND* KDIC .£Q. 2) %

302 CALL QUTUSA(NSTRNGiSTRINGtKEYAtKWT)

303 IF(REVIZ .EQ. 'YESt .AND. KDIC .EQ, 3) *

304 CALL QUTUSC(NSTRNG»STRINGtKEYA»KWT)

305 WRITE(21»KEY=K£YA) (IMAGE(I)t1=1tNELEM)

306 GU TO 100

307 999 WRITE(6»2005)

308 2005 FORMAT(/» THE INPUT FILE IS NOW READY FOR POSIING QNTO»/%

309 ' THE MASTER FILE. IF YOU WISH TO MAKE FURTHtR CHANGtSft/%

310 ' TO THIS FILE BEFORE IT IS POSTED* SELECT THE SEQUEN1lALt«/%

311 BATCHt OR KEYED REVISION PROCEDURE AND SPECIFY THE NAM£t/%

312 » OF THIS FILE.')

313 REWIND 31

314 RETURN 1

315 998 WRITE(6»1010)

316 1010 FORMAT(t NAME OF FILE HAS BEEN IMPROPERLY ENTtRED.t)

317 GO TO 1

318 END
74 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE DELREC

This subroutine is used for the deletion of the contents of a record contained in the master file. A listing of subroutine DELREC appears at the end of 

this discussion. The corresponding record in the 

reference subfile is deleted in its entirety. The position of the deleted record, however, is maintained in 

the master file. A deletion message is inserted in 3 of 

the alphanumeric data fields, and the ID number is 

replaced by a coded log number, specifying the date 

and the identification number of the data manager 

responsible for the deletion.

The COMMON statements contain the same variable names as are contained in the COMMON statements of subroutine REVISE. The DATA statement 

(line 170) initializes the variable, IBLANK, to be 

used for the testing of input. The message providing 

instructions to the user (lines 172-188) is suppressed if IRITE has been previously given the value 

of 23 (line 171).

The master-file index, KDIC, is tested (lines 108- 

194) to determine which master file will be equivalenced to file 30 and which "save" file will be equivalenced to file 33. Then, both file 30 and file 33 are 

rewound (lines 195-196) to prepare them to be 

opened in the update mode by subroutine UPDATE 

(lines 197-198).

The data manager is then prompted to provide the 

key number for the record to be deleted (lines 199- 

200). Key number, KEYR, is tested (line 201) for 

a negative value which concludes the deletion procedure by transferring execution to statement 999. 

If the value of KEYR is positive, the record with 

that key number is read from the master file (line 

202), decoded into the raw data form, and displayed 

on the output device.

The counter for the number of computer words, 

NWORDS, is set to zero (line 203), and the DO loop 

(lines 204-224) contains the logic for translating the 

master record to the raw-data form for display. The 

DO loop index ranges from 1 to the number of data 

elements, NELEM, and the ITYPE array is tested to 

determine the type of each data element.

If the data-element type is an integer, control 

passes to statement 110 (line 206) where the index, 

in terms of number of computer words, NWORDS, 

is computed for the position of that element. Then, 

the integer data is transferred from the I-th masterfile element of IMAGE into the NWORDS-th computer word of NSTRNG (line 207) with control 

passing to statement 200, the end of the DO loop.

If the data-element type is a real number, control 

passes from the ITYPE test (line 205) to statement

120 (line 209) where the NWORDS index is then 

computed for that element. Then, the real data are 

transferred from the I-th master file element of 

QIMAGE into the NWORDS position of STRING 

(line 210). Control then passes to the end of the DO 

loop for recycling to the next data-element position.

If the data-element type is alphanumeric, control 

passes from the test of ITYPE (line 205) to statement number 130, where the dictionary pointer 

value is tested for nonblank value (line 212). If it is 

blank, the word length of the alphanumeric string, 

LT, is set to zero (line 213), and the logic then 

jumps to statement 145 (line 219). If the string is 

nonblank, control passes to statement 135 (line 215), 

where subroutine SCANDC is called to return the 

value for the alphanumeric string from the dictionary entry referenced by the integer value of 

IMAGE. The dictionary category number is equal to 

the value of ITYPE minus 10.

The LT nonblank words of the alphanumeric 

string, NAME, which was returned from SCANDC, 

are then transferred into the appropriate positions 

of the NSTRNG array (lines 216 and 217). If some 

of the words at the end of the string are blank (that 

is, if LT is less than the KWORD value for that data 

element, line 218), then blanks are substituted into 

the remaining NSTRING positions reserved for that 

data element (lines 219-222). The computer word 

counter, NWORDS, is then incremented by the number of computer words reserved for the next data 

element (line 223), and the end of the DO loop is 

reached (line 224).

After the DO loop activities have been concluded 

for all NELEM data elements, the deleted record is 

displayed in the output format according to the format subroutine determined by the value of the master-file index, KDIC (lines 225-227). The deleted 

record is also written onto the "save" file on file 33.

All data elements belonging to the master-file record are then blanked out (lines 229-230), and a 

special deletion message is superimposed onto the 

master-file record (lines 231-240). Parts of the deletion message are stored in several of the different 

data-element dictionaries. These data-element positions vary according to the master-file record structure. Therefore, the master-file index, KDIC, must 

be tested (lines 232-236) to determine the dataelement positions for storage of the deletion 

message.

The blanked record containing the deletion information is then written over its original position on 

the master file (line 241), and it is deleted in its
APPENDIX C 75

entirety from the subfile on file unit 21 (line 242) by 

means of the INFONET-dependent subroutine DELETE. This deletion from the subfile prevents the 

recreation of the record should the total subfile be 

posted onto the master file at a later time.

Control is then returned (line 243) to statement 

100 for a new key number. If a negative value is 

entered to conclude the deletion procedure, a message is printed (lines 244-246), files 30 and 33 are 

rewound (lines 247-248) to remove them from the 

update mode, and control is returned to subroutine 

REVISE by the RETURN 1 statement (line 249). 

If, during the dictionary lookup (subroutine 

SCANDC), a blank alphanumeric string is encountered, a message is printed (lines 250-254), the 

master file is closed by a REWIND (line 255), and 

control is returned to subroutine REVISE (line 

256).

As in the other subroutines, INFONET-dependent 

subroutines are used to place data files in the update 

mode by first calling subroutine OBEY (lines 189- 

194) to dynamically equivalence the master file and 

the subfile to files 30 and 33, respectively, and then, 

by calling subroutine UPDATE (lines 197-198), to 

place them in the update mode. The deletion of keyed 

records from file 21 is accomplished through the use 

of subroutine DELETE (line 242). Also, certain of 

the subroutine logic is data dependent and must be 

modified to accommodate the addition of new master 

files. This logic occurs in the testing of KDIC for 

executing the subroutine OBEY calls (lines 189- 

194), the testing of KDIC for calling the outputdisplay routines (lines 225-227), and the logic for 

inserting the message onto the master record (lines 

229-240) with the associated KDIC tests for the 

different data positions.
76 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

SUBROUTINE DELREC

% THIS IS SUBROUTINE "DELREC11 (DELETE RECORD),

% IT IS DESIGNED TO DELETE INFORMATION FROM THE RECORDS OP

% THE MASTER FILE* LEAVING A COOED IDENTIFICATION NUMBER

% TO SHOW THE DATE OF DELETION AND THE IDENTIFICAUON OF

% THE DATA MANAGER RESPONSIBLE FOR EXECUTING THE DELETION.

% A DELETION MESSAGE IS ALSO SUPERIMPOSED OVER SEVERAL OF

% THE DATA FIELDS WITH THE REMAINING DATA FIELDS LEFT BLANK

% FOR STORAGE IN THE KEYED MASTER FILE.

% THE RECORD DELETED FROM THE MASTER FILE IS WRITTEN FOR

% PRESERVATION ONTO A SAVE DELETION ("ESAVEt" "WSAVE," OR

% "SAVUSA" FILE AS WELL AS PRINTED OUT IN HARD COPY ON THt

% TERMINAL OUTPUT DEVISE.

* NELEM a NUMBER OF DATA ELEMENTS IN A MASTER RECORD.

% VLIST a DATA ELEMENT NAMES AS THEY APPEAR IN THE

% DEFINITION AND MASK FILES,

% ITYPE a TYPE DESIGNATION OF THE DATA ELEMENTS AS

* LISTED IN THE MASK FILE.

% ITYPE a 1...INTEGER TYPE DATA

% ITYPE a 2...REAL TYPE DATA

% ITYPE > 10...DATA CONSISTS OF A DICTIONARY

% POINTER TO REFERENCE A LOOKUP IN THE

% (ITYPE - 10)TH DICTIONARY,

% NREC a NUMBER OF RECORDS REVIEWED IN THE SELECTED SUBFILE,

% KDIC a INDEX TO IDENTIFY THE MASTER FILE BEING USED AND TO

% LOCATE THE PROPER MAXREC VALUE FROM THE DICTIONARY

% FILE.

% IMAGE a INTEGER REPRESENTATION OF MASTER DATA

* ELEMENTS, INCLUDING INTEGER DATA AND

% DICTIONARY POINTERS,

% QIMAGE a REAL REPRESENTATION OF MASTER DATA ELEMENTS

* THROUGH EQUIVALENCE WITH «IMAGE,'

% NSTRNG a INTEGER REPHESENTAHON OF THE DATA SJRING FOK

* ALL DATA ELEMENTS (INTEGER & ALPHANUMERIC)

% BELONGING TO A MASTER RECORD.

* STRING a REAL REPRESENTATION (THROUGH EQUIVALENCE 

% STATEMENT) OF THE DATA STRING FOR ALL REAL56 VALUED DATA ELEMENIb BELONGING TO A

* MASTER RECORD.

% NAME a ARRAY (UP TO 7 COMPUTER WORDS) OF NEW ALPHA-

% NUMERIC DATA FOR COMPARISON WITH EXISTING

* DICTIONARY ENTRIES TO 1) DETERMINE DICT-

% IONARY POINTER OR 2) TO DETERMINE THAT A

% DICTIONARY ENTRY DOES NOT EXIST FOR THE

* GIVEN DICTIONARY CA'EGORY,

% LT a NUMBER OF WORDS (LESS THAN OR EQUAL 10 7)

* NEEDED TO STORE THE ALPHANUMERIC ENTKY IN

% "NAME,*'

* KWORD a AN ARRAY SPECIFYING THE MAXIMUM NUMBER OF

% COMPUTER WORDS RESERVED FON EACH RA« DATA
APPENDIX C 77

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

*

*

2001

50

ELEMENT*

NWORDS = THE TOTAL MAXIMUM NUMBER 

NEEDED TO STORE RAW DATA 

THE I-TH DATA ELEMENTS.

OF COMPUTER 

FOR THE 1ST

COMMON NAMED(800)* 

PAD(401)* 

NELEM

COMMON /LOG/ MONTH*

lYEARf 

MAXREC* 

KDIC*

DOUBLE PRECISION

DIMENSION ITYPE(400)»

IMAGE(400)* 

NSTRNG(400)* 

NAME(7) 

(IMAGE*QIMAGE)*(NSTRNG*STRING)

ITYPE* 

VLIST*

IDAY*

ILOG*

KWORD*

IRITE

VLISTUOQ)

KWORDUOO)*

QIMAGE(400)

STRIN6(400)

WORDS 

THROUGH

*

*

23) GO TO 50

EQUIVALENCE 

DATA IBLANK/' 

IFdRITE .EQ. 

WRITE(6*2001)

FORMAT(/' THIS IS THE MASTER FILE RECORD DELETION PROCDURE.' * 

WHEN PROMPTED* THE DATA'/' MANAGER WILL SPtClFY THfc KEY' * 

NUMBER OF THE RECORD TO BE DELETED. THE DELETED'/ * 

RECORD IS WRITTEN FOR PRESERVATION, ONTO THfc "ESAVE**" * 

"WSAVE*" OR "SAVUSA"'/' FILES. THEN* THE DATA ELEMENTS' * 

IN THE MASTER FILE WILL BE BLANKED* AND A NhW'/ ~ " * 

IDENTIFICATION NUMBER WILL BE WRITTEN ONTO IHE MASTtR FILE.'*

THIS NUMBER WILL'/ 1 BE ENCODED TO CONTAIN ?HE DATE~OF' * 

DELETION AND THE IDENTIFICATION NUMBER OF'/' THE DA»A' * 

MANAGER RESPONSIBLE FOR EXECUTING THE DELETION. IN' * 

ADDITION* A'/' DELETION MESSAGE WILL BE SUPERIMPOSED OVER' * 

SEVERAL OF THE DATA FIELDS TO NOTE'/' TO THk USER THAT' * 

THAT KEY NUMBER NO LONGER HAS A VALID RECORD IN THE MASTER'/* 

FILE.'//' WHEN THE DATA MANAGER HAS CONCLUDtD THE DtLETION'* 

PROCEDURE* ENTRY OF A "-I" AT'/' THE PROMPT FOR "KEY" WILL'* 

END THE PROCESS.' )

OBEYCEQUATE 30 

OBEYCEQUATE 33 

OBEYCEQUAtE 30 

OBEYCEQUATE 33 

OBEYCEQUATE 30 

OBEYCEQUATE 33

IF(KDIC 

IF(KDIC 

IF(KDIC 

IF(KDIC 

IF(KDIC 

IF(KDIC 

REWIND

.EQ. 

: .EQ. 

.EQ.

; .EQ. 

; .EQ.

! .EQ. 

30 

33

1) 

1) 

2) 

2) 

3) 

3)

CALL 

CALL 

CALL 

CALL 

CALL

CALL

WCOAL'»4)

WSAVE'»4)

USALYT'»4)

SAVUSA'»4)

ECOAL'»4)

ESAVE'.4>

REWIND

CALL UPDATE(30,1)

CALL UPDATE(33,i)

100 READ(5»*»PROMPTa'KEY NUMBER OF RECORD TO BE* 

DELETED? ') KEYR

IF(KEYR .LT. 0) GO TO 999 

READ(30»KEY=KEYR) (IMAGE(I)»I»1*NELEM) 

NWORDS » 0

DO 200 ISI*NELEM

IF(ITYPEd) - 2) 110*120*130 

110 NWORDS = NWORDS
78 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

120

130

135

140

145

150

155

200

300

305

310

999

1002

996

1010

* KWORD(I) 

QIMAGE(I)

IBLANK) GO TO 135

NSTRNG(NWORDS) * IMAGE(I)

GO TO 200

NWORDS = NWORDS

STRING(NWORDS) =

GO TO 200

IF(IMAGEd) .NE

LT = 0

GO TO 145

CALL SCANDC(I TYPE(I)-lOtIMAGE(I)tNAMEtLTt$996)

DO 140 J=ltLT

NSTRNG(J*NWORDS) = NAME(J)

IF(LT ,GE, KWORD(I)) GO TO Ib5

LAST = KWORD(I)

LTP1 = LT * 1

DO 150 J=LTPltLAST

NSTRNG(J+NWORDS) = IBLANK

NWORDS * KWORD(I) * NWORDS

CONTINUE

IF(KDIC .EQ. 1) CALL OUTUSC(NSTRNGtSTHINGfKEYKtNWORDS)

IF(KOIC .EQ. 2) CALL OUTUSA(NSTRNGtSTRlNGtKEYH,NWORDS)

IF(KDIC .EQ. 3) CALL OUTUSC(NSTRNGtSfRINGtKEYHtNWORDS)

WRlTE(33tKEY=KEYH) (IMAGE(I)

DO 300 I=1»NELEM

IMAGE(I) = IBLANK

IMAGE(11) = 2

IF(KDIC .NE. 1 .OR

IMAGE(14)

IMAGE(17)

IMAGE(26)

IF(KDIC

IMAGE(13)

IMAGE(15)

IMAGE(23)

NE

(IMAGE(I)tlsltNELEM)

KDIC ,NE. 3) GO TO 305

2

523

ILOG 

2) 60 TO 310

2

523

ILOG

CONTINUE 

WHITE(30tKEY=KEYR)

CALL DELETE<2itKeYRti) 

GO TO 100

WRITE(6tl002)

FORMAT(/« YOU HAVE ENTERED A NEGATIVE KEY VALUE TO TERMINATE'*

 THE DELETION PROCEDURE.')

REWIND 30

REWIND 33

RETURN 1

WRlTE(6tl010) KEYR

FORMAT</» ALPHANUMERIC DATA CONTAINS BLANK ENTRIES FOH' *

 RECORD KEY NUMBER: «tI8/ » RECORD HAS EITHEH ALREADY BEEN' * 

» DELETED OR BEEN INCORRECTLY ENTERED'/' SELECT PROCEDURE' *

» FOUR (KEY 

REWIND 30 

RETURN 1 

END

REVIEW) TO REVIEW AND CORRECT THIb PROBLEM.'
APPENDIX C 79

SUBROUTINE SEQREV

Subroutine SEQREV is designed to perform a sequential review of the records contained in a subfile 

of the master file. A listing of subroutine SEQREV 

appears at the end of this discussion. After each record is read in sequence, subroutine MODIFY is 

called to perform the revision of the data elements 

in the subfile and to call for display of the record. 

The option of posting the subfile to the master file 

cannot be executed until program control is returned 

to REVISE.

The COMMO'N statements (lines 122-123) contain the variables as listed in the discussion of 

REVISE. Because the first 405 words in the COMMON statement labeled LOG are not used in 

SEQREV, they have simply been lumped into an 

array called IDUMMY.

If the IRITE variable transmitted through COMMON has a value of 23, instructions for use of the 

sequential revision procedure are not displayed 

(lines 125-139). Then, the number of records reviewed, NREC, is initialized to zero (line 140), and 

the sequential reading of the subfile begins (line 

141). If an end of file is encountered during the 

read, all of the records in the subfile have been read, 

and control proceeds to statement 999 (line 144), 

which returns program control to REVISE. If a 

record has been read from the subfile, NREC is incremented by 1, and subroutine MODIFY is called. 

If the characters, QUIT, have not been entered for 

the prompt, NAME OF DATA ELEMENT TO BE 

CHANGED, program control is returned from 

MODIFY to statement 500 of subroutine SEQREV 

for the next sequential read. If QUIT has been entered, MODIFY makes a standard return to 

SEQREV, which, in turn, executes a standard return (line 144) to REVISE.
80 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

SUBROUTINE SEQREV(NREC)

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

%

THIS IS SUBROUTINE "StQREV" (SEQUENTIAL REVISION). 

IT IS DESIGNED TO READ AND DISPLAY RECORDSt IN 

SEQUENCEt FROM A SUBFILE OF THE MASfER FILE FOR THE 

REVIEW AND POSSIBLE REVISION OF EACH RECORD. WHEN 

THE ENTIRE SUBFILE HAS BEEN EXAMINED AND THE NECESSARY 

REVISIONS COMPLETEDt CONTROL WILL BE RETURNED TO 

SUBROUTINE "REVISE" WHERE THE DATA MANAGER MAY tXERCISE 

THE OPTION OF POSTING THE REVISED FILE ONTO THE MASTER 

FILE.

NREC a NUMBER OF RECORDS REVIEWED IN THE SELECTED SUBFILE. 

IMAGE = INTEGER REPRESENTATION OF MASTER DATA

ELEMENTSt INCLUDING INTEGER DATA AND

DICTIONARY POINTERS. 

QIMA6E = REAL REPRESENTATION OF MASTER DATA ELEMENTS

THROUGH EQUIVALENCE WITH IMAGE.* 

DIMENSION VLIST(400)» lTYPE(400)f *

1MAGE(400) t QIMAGEUOO) 

EQUIVALENCE <IMAGE»QIMAGE) 

DOUBLE PRECISION VLIST 

COMMON NAMED(SOO)tITYPEtPAD(401)iVLlSTtNELtM 

COMMON /LOG/ IDUMMY(405)tKDICtIRITE 

IFdRITE .EQ. 23) 60 TO 499 

WRITE(6tl001)

1001 FORMAT(//* RECORDS FROM THE DESIGNATED SUBFILt WILL Bt* % 

PRESENTED SEQUENTIALLY FOR REVIEW*/' AND UPUATE, AFTER* % 

ALL RECORDS HAVE BEEN EXAMINED BY THE REVIEWERt HE MAY* % 

THEN*/' ELECT TO POST THE RECORDS IN THIS SUBFILE ONTO THE'* 

MASTER FILE.'//' WHENEVER YOU WISH TO LEAVE'A SELECTED* % 

DATA ELEMENT UNCHANGEDf ENTER AN*/* ASTERISKt »t« ~ % 

FOLLOWED BY A CARRIAGE RETURN.'//' IF YOU WISH TO PKOCEDE»% 

TO THE NEXT RECORD IN TH£~FILE» ENTER THE CHARACTERS'/ % 

"NEXT" FOLLOWING THE PROMPT? "NAME OF DATA LLEMENT 10 BE' * 

CHANGED." THE "NEXT"'/' COMMAND WILL LEAVE'THAT RECORD* % 

IN ITS ORIGINALt UNREVlSED STATE AND THE NEXT'/' RECORD* * 

WILL BE DISPLAYEDt IN SEQUENCEt FROM THE SUBFILE. IF AT'% 

ANY TIME'/' YOU DO NOT WISH TO REVIEW THE REMAINDER OF' % 

THE FILEt ENTER "QUIT."' )

499 NNEC « 0

500 READ(2ltEND=999) <IMAGE(I)t1*1tNELEM)

NREC « NREC * 1

CALL MODIFY($500tlMAGEtQIMAGE) 

999 RETURN

END
APPENDIX C 81

SUBROUTINE KEYREV

Like SEQREV, most of the record modification is 

accomplished by a call to subroutine MODIFY. A 

listing of subroutine KEYREV appears at the end of 

this discussion. The record selection, however, is accomplished by specifying the key value for a record 

from the subfile instead of reading the records 

sequentially.

The variables in the COMMON statements (lines 

120-121) are identical with those in the SEQREV 

discussion. The DATA statement (line 122) initializes IYES and NO for testing against user entries. 

If the value of IRITE is other than 23 (line 123), 

the instruction message for the keyed revision procedure will be displayed (lines 124-140).

The number of records reviewed, NREC, is set to 

zero (line 141), and the user is prompted to enter the 

value for the record key, IKEY (line 142). Then, 

IKEY is tested for a negative value (line 143), 

which will lead to termination of the keyed revision 

procedure by a transfer to statement 999 for the 

display of a termination message giving the total 

number of records reviewed (lines 147-150).

If the IKEY value is positive, NREC is incremented by one (line 144), and the record with that

key value is read from the subfile on unit 21 (line 

145). Subroutine MODIFY is called (line 146) for 

the user interactive modification of each record referenced from the subfile. If the QUIT command has 

not been entered while under the control of MODIFY, and if modification of the record has been completed, control will be returned to statement 100, 

where the user is prompted for a YES or NO answer 

to post the record to the master file (lines 153-156). 

If the response is other than a YES or a NO, a test 

for these values (line 157) will recycle to statement 

10 until the appropriate input is entered. If the response is YES, the record is posted onto the master 

file on unit 20 (line 158).

A prompt is made for intent to review more records (lines 159-161). Again, a YES or NO response 

is required. If the test does not match a YES or a 

NO value (line 162), control is returned to statement 

20 for re-entry of the proper value. A NO value will 

terminate the keyed revision procedure and return 

to REVISE (line 163). If the value is YES, control 

(line 164) is recycled to statement 500 for the entry 

of the key of the next record to be reviewed.

No INFONET-dependent library software is used 

in this subroutine, nor is there any logic that is dependent on the structure of the master file.
82 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

123

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

SUBROUTINE KEYREVt*)

%

* 

%

%

*

%

% 

%

1001

499

500

999

1002

998

THIS IS SUBROUTINE "KEYREV" (KEYED REVISION), 

IT IS DESIGNED TO READ AND DISPLAY RECORDS* AS SPECIFIED 

BY RECORD KEY* FROM A SUBFILE OF THE MASTER FILE FOR THE 

REVIEW AND POSSIBLE REVISION OF EACH RECORD, WHEN A 

RECORD HAS BEEN REVIEWED* THE DATA MANAGER IS GIVEN

THE OPTION OF POSTING THE RECORD ONTO THE MASTER 

FILE OR LEAVING IT IN fHE SUBFILE FOR FURTHER RtVlEW,

NREC « NUMBER OF RECORDS REVIEWED IN THE SELECTED SUBFILE. 

IMAGE « INTEGER REPRESENTATION OF MASTER DATA

ELEMENTS* INCLUDING INTEGER DATA AND

DICTIONARY POINTERS, 

QIMAGE * REAL REPRESENTATION OF MASTER DATA ELEMENTS

THROUGH EQUIVALENCE WITH 'IMAGE.' 

DIMENSION VLISf(400)» ITYPE(400)* *

IMAGE<400)» QIMAGEUOO) 

EQUIVALENCE (IMAGE*QIMAGE) 

DOUBLE PRECISION VLIST 

COMMON NAMtD(BOO)»ITYPE»PAD(401)»VLIST*NELEM 

COMMON /LOG/ IDUMMY(405)*KDIC»IRITE 

DATA IYES*NO/»YES»»'NO'/ 

IFURITE ,EQ. 23) GO'TO 499

WRITE(6»1001)

FORMAT(/' RECORDS FROM THE DESIGNATED SUBFILE WILL BE' % 

PRESENTED* AS SPECIFIED BY KEY'/' NUMBER* FUR REVIEW AND' % 

UPDATE. AFTER THE REVIEWER HAS EXAMINED THE CONTENIS'/ % 

OF THE RECORD OF INTEREST* HE MAY ELECT TO HOST THAT' % 

RECORD ONTO THE MASTER'/' FILE.'//' REGARDLESS OF WHETHER'* 

THE RECORD IS POSTED TO THE MASTER FILE* IT WILL REMAIN*'/* 

AS REVISED* IN THE SUBFILE. //' TO ACCESS THE DESIRtO' * 

RECORD* RESPOND TO THE PROMPT "KEY" BY ENTERING THE'/ % 

RECORD"S KEY NUMBER, ... ENTERING A "-1" WILL CONCLUDE' % 

THE KEYED ACCESS'/' PROCEDURE.'//' IF YOU WISH TO GU ON' * 

TO ANOTHER RECORD IN THE FILE* ENTER THE CHARACTERS' * 

"NEXT"'/' FOLLOWING THE PROMPT: "NAME OF DATA ELEMENT TO' % 

BE CHANGED." THE "NEXT" COMMAND'/' WILL LEAVE THAT' % 

RECORD IN ITS ORIGINAL* UNREVISED STATE AND PROMPT KOR' % 

THE NEXT'/' RECORD KEY,'//' WHENEVER YOU WISH TO LEAVE A' % 

SELECTED DATA ELEMENT UNCHANGED* ENTER'/' AN ASTERISK* *.')

NREC s 0

READ(5»»»PROMPT='KEY: ') IKEY

IFdKEY ,LT. 0) GO TO 999

NREC = NREC * 1

R£AD(21,KEY=IKEY) (IMAGE(I)»1=1»NELEM)

CALL MODIFYJSSOO.IMAGE^QIMAGE)

WRITE(6»1002) NREC

FORMAT(/» THE KEYED ACCESS REVISION PROCEDURE HAS BEEN' %

' TERMINATED.'/' A TOTAL OF'*I4»' RECORDS HAVE BEEN' %

 REVIEWED.')

REWIND 21

RETURN i
APPENDIX C 83

153 800

154 2001

155

156 10

157

158

159

160 2002

161 20

162

163

164

165 1003

166

WRITE(6t2001)

FORMATf/« DO YOU WISH TO POST THIS RECORD TO THE MASTfcR'

 FILE?')

READ(5tl003?PROMPT=«"YES" OR "NO»J ') ITEST

IFMITEST .NE. IYES) »AND. (ITEST .NE, N0» 60 TO 10

IFUTEST ,EQ. IYES) WRITE (2U»KEY=IKEY) (IMAGE (I) t I»l tNELEM)

WRITE<6t2002)

FORMAT(/ DO YOU WANT TO REVIEW ANY MORE RECORDS?')

READ(5tl003tPROMPTa'"YES" OR "NO": ') ITEST

IF((ITEST ,NE. IYES) .AND, (ITEST ,NE. NO)) 60 TO 20

IFdTEST .EQ. NO) RETURN 1

(30 TO 500

FORMAT (A4)

END
84 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE BATCH

This subroutine is used to change all subfile records to contain a specified data value for a particular 

data element. A listing of subroutine BATCH appears at the end of this discussion. After the batch 

revisions have been entered onto the specified subfile, control is returned to subroutine REVISE, 

where the option is presented for posting the subfile 

onto the master file.

The COMMON statements (lines 163-164) contain the same variables as already described in the 

discussion of subroutine REVISE. The EQUIVALENCE statement (line 165) is used to permit 

interchangeability of the integer and the real master-record data arrays, IMAGE and QIMAGE; the 

integer- and real-data string arrays, NSTRNG and 

STRING; and the integer and real representations 

of the asterisk value, I STAR and STAR, for signaling that the input data value should be left unchanged. The DATA statements (lines 166-167) 

establish the alphanumeric data values for those 

quantities. These values ane used for the logical 

testing of user-entered input, or for the blanking of 

data.

As in all other of the updating subroutines, if the 

value 23 has been previously entered for IRITE, the 

test for this value (line 168) will cause the instruction message (lines 169-176) to be skipped.

The user is then prompted for the name of the 

data element to be changed (lines 177-179). If the 

value QUIT is entered, the test (line 180) causes the 

batch revision procedure to be terminated with a 

transfer to statement 999 for a termination message 

(lines 277-279) and a normal return to subroutine 

REVISE. If the value, QUIT, has not been entered, 

the name of the data element is checked against the 

list of data-element names to ensure that a legitimate 

name has been entered (lines 181-184). The user is 

prompted again (lines 185-187) if the name has 

been improperly entered. This check for the dataelement name also references the value of ITEM, the 

position of that data element in the master-file record. The value of ITYPE for the ITEM-th position 

is checked for the data type assigned to that particular data element (line 188).

If the value of ITYPE is equal to 1, control is 

transferred to statement 110 (line 193), where the 

user is prompted for entry of the integer data value. 

If the user enters an asterisk, the test (line 194) is 

satisfied, and control moves to statement 997, where 

a message is displayed telling the user that the data 

item is not changed (lines 273-275). Otherwise, the

input value is transferred to the appropriate position of the IMAGE array (line 195), and control is 

transferred (line 196) to statement 155 for the 

posting of this data change onto all the records in 

the subfile.

If the value of ITYPE is equal to 2, a real-data 

type, control is transferred to statement 120 (line 

201), where the user is prompted for entry of the 

decimal input. Again, if the user enters an asterisk, 

the test (line 202) is satisfied, and control is transferred to statement 997. If data other than an asterisk is entered, it is placed in the appropriate position of the QIMAGE array (line 203), and then control is transferred (line 204) to statement 155 for 

the posting of this real-data change onto all the records in the subfile.

Finally, if the ITYPE value for the ITEM-th data 

position is greater than 2, the corresponding data 

consists of an alphanumeric dictionary entry, and 

control is transferred to statement 130 (line 211). 

Here the logic is structured (lines 211-215) to find 

the first position, KSUM, and the last position, 

KSUMP1, of the raw-data array, NSTRING, for 

storage of the new alphanumeric data^element entry. 

The user is then prompted for entry of the data 

value (lines 216-217). If an asterisk has been entered (line 218), control again passes to statement 

997 for a commentary message before recycling to 

statement 60 (line 178) for selection of another data 

element to be changed.

The alphanumeric data value in NSTRING is then 

transferred into the seven-word array, NAME (lines 

219-224), for comparison with the list of dictionary 

entries. The number of the dictionary category, 

NDIC, is determined by subtracting 10 from the 

ITYPE value for the ITEM-th data element (line 

225). Then, subroutine MATCH is called (line 226) 

to search for a matching alphanumeric entry in that 

dictionary category. If a match is found, the pointer 

is computed from NDIC and the calling sequence 

variable, MKEY, and is stored in the ITEM-th position of the IMAGE array (line 227).

If there is no dictionary match, control is passed 

through the calling sequence to statement 995, where 

a message is written (lines 259-262) stating that 

there is no dictionary match for the given element 

name and the data-element value. A YES or NO response (line 263) permits the user to add the dataelement value to the dictionary. The response is 

tested (line 264) for a YES or NO entry. If any 

other data were entered, the prompt is displayed 

once again. A NO response indicates that the data 

value is unsatisfactory for dictionary entry (line
APPENDIX C 85

265), and control is transferred to statement 60 

(line 178), prompting again for the name of the data 

element to be changed.

If a YES response is given, the number of dictionary entries, NUM, is incremented by 1 (line

266). The value of NUM has been previously retrieved through the calling sequence of subroutine 

MATCH. NUM appears in the calling sequence of 

subroutine ADDICT (line 267) for computation of 

the key value pointing to the new dictionary entry. 

The value of NUM is then incremented by 1 and 

stored at the beginning of that dictionary category. 

It is also stored in the ITEM-th position of the 

IMAGE array (line 268) for posting onto the subfile, and control is transferred (line 269) to statement 155.

After the numeric data have been entered, or after 

the proper dictionary entry pointer has been determined for the alphanumeric data, the subfile is ready 

for revision. The counter for number of records is 

set to zero (line 236). The subfile is rewound (line 

237), placed in the update mode (line 238), and read 

from the beginning, one record at a time (line 239), 

with the dummy data array, IDATA. The changed 

data-element value in the IMAGE array is placed 

into the same position of the IDATA array (line 

240). The number of records, NREC, is incremented 

by 1 (line 241). The INFONET subroutine, GETKEY, is used (line 242) to obtain the key number 

associated with the last record read from the subfiles. The changed record is overwritten onto the subfile (line 243) in the same keyed position from 

which it was read. Control then is transferred (line 

244) to statement 160 to read the next record in the 

file.

When the last record has been read from the subfile, the end of file mark is encountered by the next 

attempt to read that subfile (line 239), and control 

is transferred to statement 170, where a message is 

displayed asking' the user if there are any more data 

elements to be changed. If there are more data elements to be changed, the program cycles back 

through the same logic. If, however, QUIT is entered 

for the name of the data element to be changed, control is transferred (line 180) to statement 999, where 

a termination message is written (lines 277-279), 

and a standard return (line 280) is made to subroutine REVISE.

Subroutine BATCH does not require any special 

modification whenever the structure of the master 

file changes. Two statements in the program, however, are dependent on the INFONET computer system. These are the call to the UPDATE routine (line 

238) and the call to the GETKEY routine (line 242). 

The UPDATE routine permits file 21 to be overwritten without destroying all other data records residing on that file. The GETKEY routine accesses the 

key value for the last record to be read. This value 

is required in order to rewrite the record back onto 

the subfile.
86 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

SUBROUTINE BATCH(*»NREC) 

%

% SUBROUTINE "BATCH" IS DESIGNED FOR MAKING BATCH CHANGES

% TO GIVEN PARAMETERS OF A SUBFILE SELECTED FROM [HE MASTtR

% FILE. ALPHANUMERIC ENTRIES ARE CHECKED WITH THt DICTION-

% ARIES FOR ACCURACY ANDi IF THERE IS NO COMPARABLE ENTRY

% IN THE DICTIONARYt THE DATA~MANAGER IS QUERIED WITH

% REGARD TO THE VALIDITY OF THAT ALPHANUMERIC ENTRY

% BEFORE ADDING IT TO THE DICTIONARY LIST.

%

% AFTER ALL BATCH CHANGES ARE MADE TO THOSE PARAMETERS.

% CONTROL IS RETURNED TO SUBROUTINE "REVISE" FOR FURTHER

% REVISION STEPS OR FOR POSTING~THE CHANGED SUBFILE ONTO

% THE MASTER FILE*

%

% NELEM = NUMBER OF DATA ELEMENTS IN A MASTER RECORD.

% VLIST DATA ELEMENTS NAMES AS THEY APPEAR IN THE

% DEFINITION AND MASK FILES.

% NREC = NUMBER OF RECORDS REVIEWED IN THE SELECTED SUBFILE.

* KDIC = INDEX TO IDENTIFY THE MASTER FILE BEING USED AND TO

% LOCATE THE PROPER MAXREC VALUE FROM THE DICTIONARY

% FILE*

% ITYPE a TYPE DESIGNATION OF THE DATA ELEMENTS AS

% LISTED IN THE MASK FILE* % ITYPE = 1...INTEGER TYPE DATA % ITYPE = 2...REAL TYPE DATA

* ITYPE > 10...DATA CONSISTS OF A DICTIONARY

% POINTER TO REFERENCE A'LOOKUP IN THE

% (ITYPE -~10)TH DICTIONARY.

% IMAGE a INTEGER REPRESENTATION OF MASTER DATA

% ELEMENTSt INCLUDING INTEGER DATA AND

% DICTIONARY POINTERS.

% QIMAGE = REAL REPRESENTATION OF MASTER DATA ELEMENTS % THROUGH EQUIVALENCE WITH IMAGE.'

% NSTRNG = INTEGER REPRESENTATION OF THE DATA SIRING FOK

% ALL DATA ELEMENTS (INTEGER & ALPHANUMERIC)

% BELONGING TO A MASTtR RECORD.

% STRING = REAL REPRESENTATION (THROUGH EQUIVALtNCE % STATEMENT) OF THE DATA STRING FOR ALL REAL-

% VALUED DATA ELEMENTS BELONGING TO A

% MASTER RECORD.

% ITEM * DATA ELEMENT POSITION INDEX FOR EACH RECORD.

% NAME = ARRAY (UP TO 7 COMPUTER WORDS) OF NEW ALPHA-

% NUMERIC DATA FOR COMPARISON WITH EXISTING

% DICTIONARY ENTRIES TO 1) DETERMINE UlCT-

% IONARY POINTER OR 2) TO DETERMINE THAI A

% DICTIONARY ENTRY DOES NOT EXIST FOR J.HE

% GIVEN DICTIONARY CATEGORY.

% LT » NUMBER OF WORDS (LESS THAN OR EQUAL FO 7)

* NEEDED TO STORE THE ALPHANUMERIC ENTRY IN

% "NAME."

% KWORD « AN ARRAY SPECIFYING THE MAXIMUM NUMBtR OF

% COMPUTER WORDS RESERVED FOR EACH RAW DATA
APPENDIX C 87

153

154

155

156

157

156

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

160

181

182

183

184

185

186

187

186

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

%

ELEMENT.

NWQRDS * THE TOTAL MAXIMUM NUMBER 

NEEDED TO STORE RAW DATA 

THE I-TH DAfA ELEMENTS.

OF COMPUTER 

FOR THE 1ST

WORDS 

THROUGH

DIMENSION 

ITYPEUOO)t 

VLISTUOO) t 

DIMENSION

IMAGE(400)f 

QIMAGE(400)t 

KWORDC400)it 

IOATAC400)

NSTRNG(400)t 

STRING(400)t 

NAMEC7)

DOUBLE PRECISION VLABELf *

VLISTt QNEXTt QUIT

COMMON NAMED(800)fItYPEfPAO(401)tVLISTfNELEM

COMMON /LOG/ MONTHtIDAYtlYEARtILOGtMAXRECtKWOKDtKDICtIKITE

EQUIVALENCE (ISTARtSTAR)t(IMAGEtQIMAGE)t(NSTRNGtSTRING)

DATA iBLANKfQBLANKfYEStXNOtSTAR/' ' ' 'f'YES't'NO't»#»/

DATA QNEXTtQUIT/'NEXT'f'QUIT'/

IFdRITE .EQ. 23) G(T TO 60

WHIT£(6tl001)

1001 FORMAT(/« THIS IS THE BATCH UPDATE PROCEDURE.'/' GIVEN A« % 

SPECIFIED DATA ELEMENT NAME AND A SPECIFIED"DATA ELtMENT' % 

VALUEt THIS'/' PROCEDURE CHANGES ALL RECORDS IN THE~6IVEN'% 

SUBFILE TO THE DATA VALUE SPECIFIED'/' FOR 1HAT DATA' % 

ELEMENT NAME.'//'"I HE BATCH EDIT/REVISION PROCEDURE CAN' % 

BE TERMINATED 8Y ENTERING "QUIT" WHEN'/' A PROMPT FUK THE'* 

NAME OF THE DATA ELEMENT IS ENCOUNTERED.' )

1002 FORMAT(Ad)

60 READ(5t1002tPROMPTs'NAME OF DATA ELEMENT T0% 

BE CHANGED: ') VLABEL

IFtVLABEL ,EQ. QUIT) GO TO 999

ITEM = 0

00 70 IsltNELEM

ITEM * ITEM * 1 

70 IFtVLABEL .EQ. VLIST(D) GO TO 80

WHITE(6tl003) 

1003 FORMAT(/' ITEM NOT IN LIST OF DATA ELEMENTSt HEENTER')

GO TO 60 

«0 IF(ITYPE(ITEM)*2) 110tl20tl30

% THE FOLLOWING STATEMENTS PERMIT REPLACEMENT OF THE iNTEGtR 

% DATA CONTAINED IN THE 'IMAGE' ARRAY.

110 READ<5t*fPROMPT**ENTER 

IFUNPT .EQ. ISTAR)"GO 

IMAGE(ITEM) = INPT 

GO TO 155

VALUE? 

TO 997

') INPT

% THE FOLLOWING STATEMENTS PERMIT REPLACEMENT OF THE REAL 

* DATA CONTAINED IN THE 'IMAGE' ARRAY.

120 READ(5t*»PROMPTs»ENTER DECIMAL VALUE: «) QPUT 

IFtQPUT .EQ. STAR) GO TO 997 

QIMAGE(ITEM) « QPUT

GO TO 155 

* THE FOLLOWING STATEMENTS PERMIT REPLACEMENT OF ALPHA-
88 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

207

206

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

256

259

260

% NUMERIC DATA, GENERATE NEW POINTERS* AND UPDATE THE 

* DICTIONARY IF THE SPECIFIED DATA VALUE DOES NOT 

% ALREADY RESIDE~THERE.

130

140

= ITEM - 1 

IsltlTEMl

KSUM + KWQRDU) 

= KSUM « KWORD(ITEM) - 1

KSUM,KSUMP1 )

1006 FORMAT(7A4)

READ(5,1006,PROMPT=«ENTER VALUE: M (NSTRNG(l)tl

IF(NSTRNG(KSUM) ,EQi ISTAR) GO TO 997

LAST = KWORD(ITEM)

KSUMM1 = KSUM - 1

DO 145 1=1,7 

145 NAME(I) = IBLANK

DO 150 1= 1,LAST 

150 NAME (I) = NSTRNGU+KSUMM1)

NDIC = ITYPEUTEM) - 10

CALL MATCH (NAME,NDIC,LT,MKEY,NUM,$995,$996)

IMAGEUTEM) = MKEY - NOIC*1000Q

% THE FOLLOWING STATEMENTS READ, SEQUENTIALLY, ALL OF THE

* RECORDS IN THE SUBFILE'AND APPLY THE CHANGE IN DATA

% VALUE FOR THE SPECIFIED DATA PARAMETER TO EACH KECORD.

% AND THEN REWRITE THE RECORD BACK ONTO THE SUBFILE.

% "IDATA" IS USED AS A DUMMY I/O PARAMETER.

155 NREC = 0

REWIND 21

CALL UPDATE(21,1) 

160 READ(21,END=170) (IDATA(I)»I*1,NELEM)

IDATA(ITEM) a IMAGE(ITEM)

NREC = NREC « 1

CALL GETKEY(21,IKEY)

WKITE<2i,KEYslKEY) <IDATA(I)> I*1»NELEM)

GO TO 160 

170 WRITE(6,1007) 

1007 FORMAT(/ DO YOU WISH TO CHANGE ANY MORE DATA ELEMENTS' %

 BELONGING TO THIS FILE? ENTER ') 

180 READtS.lOOS^ROMPTs^'YES11 OH »NO":~ »)TEST 

1008 FORMATU4)

IF((TEST .NE. YES) .AND. (TEST .NE. XNO)) GO 10 180

IFCTEST .EG. YES) GO TO 60

RETURN 1

994 WHITE(6,1010)

1010 FORMAT(/» DICTIONARY KEY EXCEEDS PERMISSABLE CAPACITY* 

FOR THE GIVEN /* DATA ELEMENT NAME. 1 /* 

 EXECUTION TERMINATED! /%

 CONTACT PROGRAMMER. 1 )

STOP

995 WRITE(6,2001) VLABEL,NAME 

2001 FORMAT(/« THERE IS NO DICTIONARY MATCH FOR DA1A NAME: %
APPENDIX C 89

261 »A7/» ALPHANUMERIC DATAS »t7A4/%

262 » DO YOU WISH TO ENTER THIS DATA IN THE DICTIONARY?')

263 190 READ(5»1008»PROMPT=«"YES OR "NO11 : ') TEST

264 IF«TEST~.NE. YES) .AND, (TEST .NE. XNO)) 60 !0 190

265 IF(TEST .EQ. XNO) 60 TO 60"

266 NUM = NUM+1

267 CALL ADDICT(NAMEtLT»NDIC»NUMt$994)

268 IMAGE(ITEM) « NUM

269 GO TO 155

270 996 WNITE<6»1009)

271 1009 FORMAT(/t BLANK DICTIONARY ENTRIES ARE NOT LEGITIMATE.')

272 GO TO 170

273 997 tnlHITE(6tl011) VLABEL

274 1011 FORMAT(/t YOU HAVE ENTERED AN ASTERISKf *t TO LEAVE't*

275 1X»A7»» UNCHANGED.'/)

276 60 TO 60

277 999 «RITE(6»1012>

278 1012 FORMAT (/' YOU HAVE ENTERED "QUIT11

279 » EDIT/REVISION PROCEDURE.' )

280 RETURN

281 END

TO TERMINATt THE BAfCH' %
90 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE MODIFY

This subroutine is used to change the data values 

on a single record. A listing of subroutine MODIFY 

appears at the end of this discussion. It is called from 

subroutine SEQREV or from subroutine KEYREV. 

In either case, the record is accessed from the subfile by reading each record in sequence, as done by 

SEQREV, or by referencing the record by its key 

value, as performed in KEYREV. The user may 

modify as many data values as desired on a selected 

record. When modification of that record is concluded, control is returned to the calling subroutine 

for selection of the next record to be modified.

The major variables are identified and defined in 

the comments at the beginning of the listing. Those 

variables listed in the COMMON statements (lines 

154-155) are identical with the variables discussed 

in subroutine REVISE. Again, the integer and real 

representations of (1) the raw-data strings, 

NSTRNG and STRING, (2) the master-file arrays, 

IMAGE and QIMAGE, and (3) the asterisk values, 

ISTAR and STAR, have been equivalenced in each 

case (line 156). The data fill is initialized (lines 157- 

158) for alphanumeric values of YES, XNO, STAR, 

QNEXT, and QUIT, as well as the variables 

IBLANK and QBLANK, which are used for inserting blank data fill.

The first action by this subroutine is the decoding 

of the selected record from its master-file format to 

the raw-data format (lines 159-199) in order to display the record to the data manager for review. This 

process begins by initializing to zero (line 159) the 

counter for the number of computer words, 

NWORDS, used to store the first "I" data elements in 

the raw-data string. Then, each of the NELEM data 

elements is translated into its proper position in the 

raw-data string, beginning with the DO statement 

(line 160).

The I-th data element is tested for type by comparing the value in the I-th position of the ITYPE 

array with the integer 2 (line 161). Thus, if the 

ITYPE value is 1, the data element is an integer, 

and control passes to statement 10. If the ITYPE 

value is 2, the data element is real, and control is 

transferred to statement 20. If the ITYPE value is 

greater than or equal to 3 (in fact, ITYPE values 

will be greater than 10 to include pointer codes for 

the dictionary categories), the data type is alphanumeric, and control will be transferred to statement 

30, where the relevant word string will be accessed 

from the (ITYPE-lO)-th dictionary category.

At statement 10 (line 167), the value of

NWORDS is again incremented by the number of 

computer words, KWORD, reserved for the I-th data 

element. Then, the integer data in the I-th word of 

the master record array, IMAGE, is substituted into 

the NWORDS position of the raw-data string, 

NSTRNG (line 168). Next, control is transferred 

(line 169) to statement 99 for recycling through the 

DO loop for the next data element.

At statement 20 (line 175), the value of NWORDS 

is again incremented by the number of computer 

words, KWORD. The real data in the I-th word 

of the master record array, QIMAGE, is substituted 

into the NWORDS-th position of the raw-data 

string, STRING (line 176), and control is transferred (line 17) to statement 99 to continue through 

the DO loop, processing the next data element.

Statement 30 begins the logic of translating from 

the dictionary pointer of the data element to the 

alphanumeric string referenced by that pointer and 

contained in the dictionary category associated with 

that data element though the corresponding value in 

the ITYPE array. First, the IMAGE value is tested 

for blank data (line 186). If the value is blank, the 

length of the alphanumeric string, LT, is set to zero 

(line 187), and control is transferred (line 188) to 

statement 45. If the data in IMAGE is nonblank, control is transferred to statement 35, where subroutine SCANDC is used to select the corresponding 

alphanumeric entry from the dictionary (line 189). 

The calling sequence provides the dictionary category index, ITYPE minus 10, and the pointer, 

IMAGE. The array containing the alphanumeric 

string, NAME, and the value giving the number of 

computer words required for that string, LT, are 

returned from SCANDC through the calling sequence. If there is a blank dictionary entry corresponding to a nonblank integer value of the pointer, 

control is transferred to statement 996, where a 

message is displayed.

After the contents of the record have been displayed to the data manager, he is then prompted for 

the entry of the name of the data element to be 

changed (lines 205-206). If, instead of the data 

name, the characters, NEXT, or the characters, 

QUIT, are entered, action on the displayed record 

will be terminated. The entered value is first tested 

against the value of QNEXT (line 207), and if 

there is equality, the logic proceeds to statement 998, 

where a message is displayed (lines 283-285), and 

control is returned to the calling routine by a 

RETURN 1 statement (line 286). If the comparison 

with QNEXT fails, the variable name is next tested
APPENDIX C 91

against the value of QUIT (line 208). If equality 

exists, control is transferred to statement 999, where 

a message is displayed (lines 287-289), and the 

record is rewritten onto the subfile (line 290), thus 

posting all modifications to the record prior to entry 

of the characters QUIT for the data-element name. 

A standard return (line 291) is then taken to the 

calling routine. If the characters, NEXT, have been 

entered for input of the data-element name, then control is returned to the calling routine without first 

rewriting the record onto the subfile. Therefore, none 

of the prior modifications made to that record are 

posted; instead, the record will remain in the subfile with its original contents unchanged.

If the value of the data-element name, VLABEL, 

was not entered with the characters NEXT or QUIT, 

the entry is then tested against all of the data-element names in the VLIST array to ensure that it is a 

valid data-element name (lines 209-215). If there is 

a match with one of the data-element names (line 

212), control is transferred to statement 80 to begin 

processing the change in data value for that data 

element. If there is no match, a message is displayed 

(lines 213-214), and control is returned (line 215) 

to statement 60 to re-enter the data-element name.

The value of ITEM has been determined (line 

211) when the DO loop is exited by passing the test 

against the ITEM-th position of VLIST (line 212). 

This value of ITEM is now used to reference the 

ITYPE value corresponding to the selected dataelement name to test for the data-element type (line 

216).

If the ITYPE value is 1, the data type is integer, 

and control proceeds to statement 110 (line 221), 

where the data manager may input the replacement 

data value. If, instead, an asterisk is entered, the 

test against the value of ISTAR (line 222) is passed, 

and control transfers first to statement 997, where a 

message is displayed (lines 279-281), and then to 

statement 60 (line 282). A prompt is made for a new 

data-element name without any change to the value 

of the preceding data element. If a value other than 

an asterisk has been entered for the integer input, 

this value is transferred into the position of that 

data element in the IMAGE array (line 223), and 

then control is passed to statement 160 for a message 

query regarding the change of additional data elements for that record (lines 256-258).

If the ITYPE value is 2, the data type is real, and 

control passes to statement 120 (line 229) to prompt 

for decimal data entry. If, instead, an asterisk is 

entered, the test against the value of STAR (line

230) is passed, and control again transfers to statement 997, leaving the value for that data element 

unchanged. Otherwise, the decimal data value is 

transferred into the proper data-element position of 

the QIMAGE array (line 231), and control passes 

to statement 160 for the message query regarding 

further modifications.

If the ITYPE value is greater than 10, the data 

type is alphanumeric, and control passes to statement 

130 (line 239), the start of the logic for the entry of 

alphanumeric data. The value of KSUM, the number 

of computer words required for the storage of all 

data elements prior to the ITEM-th plus the first 

word of the ITEM-th position, is computed (lines 

239-242), as is the value of KSUMP1 (line 243), 

the number of computer words reserved to store all 

data elements through the ITEM-th position. Next, 

the data manager is prompted for entry of an alphanumeric data string in the KSUM through KSUMPI 

positions of NSTRNG (lines 244-245). The first 

word of the string is compared with ISTAR (line 

246) and, if equal, control is transferred to statement 997, the data element is left unchanged, and an 

informational message is printed.

The value of LAST is set equal to the current value 

from the KWORD array (line 247) for use as a limit 

for the DO loop index, and the value of KSUMM1 is 

set to the value of KSUM minus one (line 248), for 

use in computing the NSTRNG index (line 252). 

After all seven words of the NAME array are 

blanked out (lines 249-250), the most recent values 

placed in the NSTRNG array are also transferred 

into the NAME array (lines 251-252). The dictionary category number, NDIC, is computed by subtracting 10 from the ITEM-th position of the ITYPE 

array (line 253).

Finally, subroutine MATCH is called (line 254) to 

search the specified dictionary category for an entry 

matching the new alphanumeric data input. The alphanumeric data are communicated through the calling sequence by the NAME array, and the dictionary 

category is communicated by NDIC. If there is a 

dictionary match, the subroutine returns the number 

of computer words in the dictionary entry, LT, the 

key value for the dictionary entry, MKEY, and the 

number of dictionary entries contained in that category, NUM. If there is no match, control is transferred to statement 995 or, if the data are blank, to 

statement 996.

If a dictionary match has been found, a standard 

return is executed from MATCH, and the following 

statement (line 255) computes the value of the
92 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

pointer to that dictionary entry for storage in the 

IMAGE array. The user is then prompted for a YES 

or NO entry for a change of additional data elements belonging to the current record (lines 256- 

259). The YES or NO response is tested to ensure 

that one of the two allowable responses has been 

entered (line 260), recycling of the YES or NO 

prompt, if the test fails. If a proper response has 

been given, the response is then tested for a YES 

value (line 262), which will cause control to be transferred to statement 60 (line 205), where a new dataelement name will be entered for data-value modification. If the test fails, the IMAGE array containing 

changed data values will be rewritten onto the subfile over the old data for that record (line 263), and 

a RETURN 1 exit is taken from subroutine MODIFY (line 264).

If there was no dictionary match found for the 

new alphanumeric input, the user is prompted with 

a message giving the data-element name and the 

newly entered data and asking if it is to be added to 

the dictionary (lines 265-269). Again, the YES or 

NO response is tested to ensure that one of the two 

allowable values has been correctly entered (line

270), returning to the prompt at statement 170, if 

the test fails. If the response is NO, the test (line

271) is satisfied, and control is returned to statement 60 for selection of another data-element name 

for data revision. If the response is YES, the number

of entries in the given dictionary category is fncreased by 1 (line 272), and subroutine ADDICT is 

called (line 273) to enter that alphanumeric data 

into the dictionary. The following variables are 

transferred to ADDICT through the calling sequence : the NAME array, containing the new alphanumeric data; the length, LT, of the array; the dictionary category number, NDIC; and the new number of entries for that category, NUM.

The value of NUM, the dictionary pointer for the 

new entry, is transferred into the ITEM-th position 

of the IMAGE array (line 274), and control is transferred (line 275) to statement 160 for a prompted 

response to continue with data revision for that 

record or to go on to another record.

If the new data entered consist only of blank data, 

the return from subroutine MATCH transfers control to statement 996, where a message is displayed 

stating that blank data are not legitimate (lines 276- 

277). The blank data value is not substituted for the 

data element, and control is returned to statement 

160 for the user's selection of additional data elements to be revised.

The statements in MODIFY which are master file 

dependent are the calls to the record display routines 

(lines 201 and 203) based on the value of the masterfile index, KDIC. One INFONET-dependent subroutine, GETKEY, is called (line 200) to obtain the key 

value for the last record read from file 21.
APPENDIX C 93

100

101

102

103

104

105

106

107

108

109

110

111

112

113 in

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

SUBROUTINE MODIFY(**IMAGEtQIMAGE)

* SUBROUTINE 'MODIFY' IS DESIGNED TO READ A RECORD FROM

* AN EXISTlNGf KEYED* MASTER FILE* OR A SUBFILE

* OF THE MASTER FILE* AND DISPLAY THE DATA SO THAT

% THE USER IS ABLE TO MODIFY THE INDIVIDUAL DATA

% ELEMENTS AS REQUIRED,

% NELEM = NUMBER OF DATA ELEMENTS IN A MASTER RECORD,

% VLIST = DATA ELEMENTS NAMES AS THEY APPEAR IN THE

% DEFINITION AND MASK FILES.

% ITYPE TYPE DESIGNATION OF THE DATA ELEMENT* AS

* LISTED IN THE MASK FILE.

% ITYPE * Li,INTEGER TYPE DATA

* ITYPE - 2...REAL TYPE DATA

* ITYPE > 10...DATA CONSISTS OF A DICTIONARY

% POINTER TO REFERENCE A~LOOKUP IN THE

% (ITYPE -~10)TH DICTIONARY.

* IMAGE = INTEGER REPRESENTATION OF MASTER DATA

% ELEMENTS, INCLUDING INTEGER DATA AND

* DICTIONARY POINTERS.

* QIMAGE » REAL REPRESENTATION OF MASTER DATA ELEMENTS

% THROUGH EQUIVALENCE WITH 'IMAGE.'

% NSTRNG = INTEGER REPRESENTATION OF THE DATA SIRING FOH

* ALL DATA ELEMENTS (INTEGER^ ALPHANUMERIC)

% BELONGING TO A MASTER RECORD.

% STRING * REAL REPRESENTATION (THROUGH EQUIVALENCE

% STATEMENT) OF THE DATA STRING FOR ALL REAL-

* VALUED DATA ELEMENTS BELONGING TO A

* MASTER RECORD.

* ITEM = DATA ELEMENT POSITION INDEX FOR EACH RECORD,

* NAME = ARRAY (UP TO 7 COMPUTER WORDS) OF NEW ALPHA-

* NUMERIC DATA FOR COMPARISON WITH EXISTING

* DICTIONARY'ENTRIES TO i) DETERMINE OICT-

* IONARY POINTER OR 2) TO DETERMINE THAT A 

% DICTIONARY ENTRY DOES NOT EXIST FOR I HE

GIVEN DICTIONARY CATEGORY.

NUMBER OF WORDS (LESS THAN OR EQUAL 10 7)

NEEDED TO STORE THE ALPHANUMERIC ENTRY IN

"NAME."

AN ARRAY SPECIFYING THE MAXIMUM NUMBER OF

COMPUTER WORDS RESERVED FOR EACH RAW DATA

ELEMENT,

THE TOTAL MAXIMUM NUMBER OF COMPUTER WORDS

NEEDED TO STORE RAW DATA FOR THE 1ST THROUGH

THE I-TH DATA ELEMENTS. 

* DICTIONARY CATEGORY REFERENCE NUM9ER. 

= TOTAL NUMBER OF DICTIONARY ENTRIES IN THE

"NDIC" DICTIONARY CATEGORY.

PRECISION VLABELt *

QNEXT* QUIT

IMAGE(400)t NSTRNG(400)f *

QIMAGE(400)» STRING(400)» *

LT

KWORO

NWORDS =

NDIC 

MUM

DOUBLE 

VLIST* 

DIMENSION 

ITYPE(400)»
94 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

%

% TH

% WH

* RE

%

10

%

% TH

% WH % RE

%

20

%

% TH

% EL

% TH

% EL

% TH

% AR

%

30

35

40

45

bO

55

99

100

1002

60

BE

VLIST(400)» KWORD(400)» NAME(7)

COMMON NAMED(BOO) 9 1TYPE»PAD(401)*VLIST»NELEM

COMMON /LOG/ MONTH*IOAY»IYEAH,ILOG*MAXREC»KWOKD»KDIC*1KITE

EQUIVALENCE (ISTAR»STAR)»(IMAGE»QIMAGE)t(NSTRNGfSTRINb)

DATA IBLANKfQBLANKfYEStXNOfSUR/ 1 »' * YES» «NO»»»»'/

DATA QNEXT»QUIT/»NEXT«,tQUIT»/

NWORDS = 0

DO 100 I=1»NELEM

IFdTYPECI) - 2) 10»20t30

% THE FOLLOWING STATEMENTS ACCEPT THE DATA ELEMENTS 

% WHICH ARE INTEGER WORDS AND ADD THEM TO THE TOTAL

NWORDS a NWORDS * KWORDd) 

NSTRNG(NWORDS) = IMAGE(I) 

GO TO 99

* THE FOLLOWING STATEMENTS ACCEPT THE DATA ELEMENTS 

% WHICH ARE REAL WORDS AND ADD THEM TO THE TOTAL

RECORD STRING.

NWORDS = NWORDS + KWORDd) 

STRING(NWORDS) = QIMAGEd) 

GO TO 99

THE FOLLOWING STATEMENTS BRING THE ALPHANUMERIC 

% ELEMENTS (REFERENCED BY THE CODED POINTERS) FROM 

THE APPROPRIATE DICTIONARIES AND ADD THESE 

ELEMENTS TO THE TOTAL KECORD STRING* INCLUDING 

% THOSE PORTIONS OF THE DICTIONARY WORDS WHICH

IF(IMAGEd) .NE. IBLANK) GO TO 35

LT = 0

GO TO 45

CALL SCANDC<ITYPE<I)-10»IMAGEU)»NAME.LT»$996)

DO 40 J=1*LT

NSTRNG(J+NWORDS) = NAME(J)

IF(LT .GE. KWORD(I)) GO TO 55

LAST :

LTP1 i

: KWORD(I)

« LT * 1

DO 50 JsLTPltLAST 

NSTRNGU + NWORDS) » 

NWORDS = NWORDS *

CONTINUE

CONTINUE

CALL GETKEY^I.KEYRJ

IF(KDIC .EQ. 1) CALL

IF(KDIC .EQ. 2) CALL

IFtKDIC .EQ. 3) CALL 

FORMAT(A6)

READ(5t1002*PROMPTS*NAME 

CHANGED? M VLA8EL

IBLANK 

KWORD(I)

OUTUSC(NSTRNG»STKING*KEYK,NWOROS) 

OUTUSA(NSTRNG»St«ING*KEYK»NWORDS) 

OUTUSC(NSTRNGtSTRINGtKEYK»NWORDS)

OF DATA ELEMENT TO%
APPENDIX C 95

207

208

209

210

211

212

213

214

215

216

217

21S

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

70

1003

80

%

% THE

IF(VLABEL ,EQ, QNEXT) GO TO 998

IFtVLABEL ,EQ, QUIT) GO TO 999

ITEM = 0

DO 70 I=1»NELEM

ITEM = ITEM * 1

IF(VLA8EL ,EQ, VLIST(D) GO TO 80

WRITE(6»1Q03)

FORMAT (/« ITEM NOT FOUND IN LIST OF DATA ELEMtNTSt REENTER' )

GO TO 60

IF (I TYPE (ITEM) -2) 110tl20*130

FOLLOWING STATEMENTS PERMIT REPLACEMENT OF THE INTEGER

*> DATA CONTAINED IN THE 'IMAGE' ARRAY,

*

110

%

% THE

READ(5,*»PROMPT=»ENTER VALUE? ') INPT

IFUNPT ,EQ, ISTAR)~GO TO 997

IMAGE(ITEM) = INPT

GO TO 160

FOLLOWING STATEMENTS PERMIT REPLACEMENT OF THE REAL

% DATA CONTAINED IN THE 'IMAGE* ARRAY.

%

120

%

* THE

READ(5t*»PROMPT='ENTER DECIMAL VALUE! ') QPUT

IF(QPUT ,EQ, STAR) GO TO 997

QIMAGE(ITEM) = QPUT

GO TO 160

FOLLOWING STATEMENTS PERMIT REPLACEMENT OF ALPHA-

% NUMERIC DATA* GENERATE~NEW POINTERS* AND UPDATE THE

% DICTIONARY IF THE SPECIFIED DATA VALUE DOES NOT

* ALREADY RESIDE THERE,

*

130

140

1006

145

150

160

1007

165

KSUM a 1

IfEMl = ITEM - 1

DO 140 I=ltITEMl

KSUM a KSUM « KWQRDU)

KSUMP1 = KSUM + KWORD(ITEM) - 1

FORMAT(7A4)

READ(5»1006»PROMPT='ENTER DATA: ') (NSTRNG ( I ) t I=KSUMtKSUMPl )

IFCNSTRNG(KSUM) ,EQ, ISTAR) GO TO 997

LAST s KWORD(ITEM)

KSUMMl a KSUM - 1

DO 145 I=l»7

NAME (I) = IBLANK

DO 150 1= 1»LAST

NAME (I) a NSTRNG (I^KSUMMl)

NDIC = ITYPE(ITEM) - 10

CALL MATCH <NAMEtNDIC»LT»MKEYtNUM»$995,$996)

IMAGE(ITEM) = MKEY - NDIC*10000

WRITE(6»1007)

FORMAT(/' DO YOU WISH TO CHANGE ANY MORE DATA ELEMENTb«/%

' BELONGING TU THIS RECORD? ENTER ')

R£AD(5,1008»PROMPT="I YES M OR "NO 11 * ' ) TEST

IF«TEST .NE, YES) UND, (TEST .NE, XNO) ) GO 10 165
96 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

261 1008 FORMATU4)

262 IFtTEST .EQ. YES) SO TO 60

263 WRIT£(21fKEYsKEYR) ( IMAGE(I)f1=1»N£LEM)

264 RETURN 1

265 995 WRITE(6t200i) VLA8EL»NAME

266 2001 FORMAT(/» THERE IS NO DICTIONARY MATCH FOR DATA NAME* '*

267 »A7/» ALPHANUMERIC DATA: »f7A4/%

268 DO YOU WISH TO ENTER THIS DATA IN THE DICTIUNARY?t)

269 170 READ(5»1008»PROMPT=»"YES" OR "NO11 : «) TEST

270 IF«TEST .NE. YES) .AND. (TEST .NE. XNO) ) 60 10 170

271 IF(TEST .EQ. XNO) 60 TO 60

272 NUM = NUM+1

273 CALL ADOICT(NAME»LT»NDIC»NUM)

274 IMA6E(ITEM) = NUM

275 60 TO 160

276 996 WRITE<6»1009)

277 1009 FORMAT(/» BLANK DICTIONARY ENTRIES ARE NOT LEGITIMATE.')

278 60 TO 160

279 997 WRITE(6*1011) VLA8EL

280 1011 FORMAT(/» YOU HAVE ENTERED AN ASTERISK, *, TO LEAVER*

281 1X»A7»» UNCHAN6ED.'/)

282 60 TO 60

283 998 *RlTE(6flCTl2) KEYR

284 1012 FORMAT (/» YOU HAVE ENTERED "NEXT 11 WHICH LEAVEb THE RECORD 1 %

285 (KEY =»fI8»») UNREVISED, )

286 RETURN i

287 999 WRITE<6»1013)

288 1013 FURMAT(/» YOU HAVE ENTERED "QUIT" TO TERMINATt THIS* 1

289 REVISION PROCEDURE.')

290 WHITE(21tKEYaKEYR) (IMA6E(I)f1=1tNELEM)

291 RETURN

292 END
APPENDIX C 97

SUBROUTINE SCANDC

Subroutine SCANDC is used to locate the value of 

the alphanumeric data array, NAME, which is referenced by the dictionary category number, NDIC, 

and the dictionary entry pointer, IPOINT. A listing 

of subroutine SCANDC appears at the end of this 

discussion. The subroutine returns the data value 

from the dictionary and the number of computer 

words, LT, required by the data string.

The DATA statement (line 112) is used to initialize the value of IBLANK as blank data. Then, all 

seven words of the NAME array are set to blank 

values (lines 113-114). The key value, LKEY, is 

computed (line 115) and used to read the number of 

dictionary entries, NUM, contained in the NDIC 

category (line 116) as well as K, which, although not

used in this subroutine, has the same value as NDIC. 

The key value for the dictionary entry, NKEY, is 

calculated from LKEY and the dictionary pointer, 

IPOINT (line 117). If LKEY is too large for the 

number of entries in that dictionary category (line 

118), control is transferred to statement 100, where 

an error message is dispalyed (lines 121-127), and 

a nonstandard return is made (line 128) to the calling subroutine.

If the value of NKEY is acceptable, the number of 

computer words, LT, and the dictionary entry, 

NAME, are read from the dictionary on file 9.

All statements in subroutine SCANDC are written in standard FORTRAN, no statement being INFONET-dependent. No statement appearing in this 

subroutine exists to accommodate a specific data 

base.

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

126

129

SUBR

%

% TH

% GI

% CA

* RE

% LE

% VA

% FO

* PO

%

10

100

1001

END

SUBROUTINE SCANDC(NDICtIPOINT»NAM£»LT»*)

% THIS IS SUBROUTINE »SCANDC,»

GIVEN THE DICTIONARY CATEGORY NUMBERt »NDIC»» AND THE 

% CATEGORY ELEMENT POINTER* »IPOINT* THIS SUBROUTINE

* READS THE DICTIONARY ELEMENT NAMEt 'NAME*' AND THE 

% LENGTH OF THE NAME IN WORDS* »LT*' AND RETURNS THESE 

% VALUES TO THE CALLING ROUTINE FOR DISPLAY TO THE USER 

% FOR THE PURPOSE OF IDENTIFICATION* DATA REVIEW* AND

* POSSIBLE REVISION,

DIMENSION NAME(7)

DATA IBLANK/' »/

DO 10 1=1*7

NAME(I) = I8LANK

LKEY a NDIC*10000

READ(9»KEY=LKEY) NUM»K

NKEY = LKEY * IPOINT

IFtNKEY ,6T. LKEY > NUM) GO TO 100

READ(9*KEY=NKEY) LT*(NAME(I)»Ial»LT)

RETURN

WRITE(6*1001) IPOINT*NUM*NDIC

FORMAT(/« DICTIONARY POINTER

«) EXCEEDS NUMBER OF ENTRIES

 IN CATEGORY »»»»i2»»»»»»/%

 EITHER THE DICTIONARY POINTER

 DICTIONARY LIST EXCEEDS 10000 

» PROGRAMMER. 1 ) 

RETURN 1

(»»I8t* 

(t»I8t»)»/%

IS IN ERRORt OR«/% 

ENTRIES. CONIACTV*
98 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE ADDICT

This subroutine is used to add new dictionary entries to the specified dictionary category. A listing 

of subroutine ADDICT appears at the end of this 

discussion. The alphanumeric data for the entry are 

contained in the NAME array, the number of computer words needed for the data is contained in LT, 

the dictionary category number is contained in 

NDIC, and the number of entries in the dictionary 

category is contained in NUM, all of which enter the 

subroutine through the calling sequence.

The value of NUM is tested (line 120) to ensure 

that it does not exceed the number of entries reserved for each dictionary category. If the test fails, 

control is transferred to statement 994, where a 

diagnostic message is written (lines 129-133), and 

execution is stopped (line 134). If the test of NUM 

is passed, file 9 is rewound (line 121) so that it can

be placed in the update mode (line 122). The keys 

for the number of entries, NUM, in a dictionary 

category and for the new dictionary entry are computed (lines 123-124). Then, the number of dictionary entries, NUM, and the corresponding dictionary 

category number, NDIC, are written on the IKEY-th 

line, and the length, LT, and the nonblank words in 

data array NAME are written on the NKEY-th line 

of the dictionary file (lines 125-126). The dictionary 

file is then closed with a rewind (line 127), and control is returned to the calling routine with a standard 

return (line 128).

There is only one nonstandard FORTRAN statement in subroutine ADDICT. This is the call to UPDATE (line 122), which opens the dictionary file in 

the update mode so that records can be written onto 

the file without destroying the other data residing in 

that file.

100

101

102

103

104

105

106

107

106

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

SUBROUTINE ADDICT(NAME«LF*NDIC*NUM)

THIS IS SUBROUTINE 'ADDICT,' 

IT IS DESIGNED TO ADD SPECIFIED ALPHANUMERIC DATA 

ELEMENTS TO THE DICTIONARY LIST FOR EACH REVISED 

DICTIONARY CATEGORY. IF A CATEGORY LIST EXCEEDS 

10000 ENTRIES* AN ERROR RETURN MESSAGE tO CONTACI 

THE PROGRAMMER WILL BE DISPLAYED AND EXECUTION 

WILL BE TERMINATED.

NAME * ARRAY <UP TO 7 COMPUTER WORDS) OF NEW ALPHANUMERIC DATA FOR ENTRY INTO THE APPROPRIATE 

DICTIONARY" CATEGORY.

LT = NUMBER OF WORDS (LESS THAN OR EQUAL [0 7) 

NEEDED TO STORE THE ALPHANUMERIC ENTKY IN

"NAME."

NDIC a DICTIONARY CATEGORY REFERENCE NUMBER. 

NUM = TOTAL NUMBER OF DICTIONARY ENTRIES IN THE

"NDIC" DICTIONARY CATEGORY. 

DIMENSION NAMEC7) 

IF (NUM ,GE. 9999) GO TO 994 

REWIND 9

CALL UPDATE(9«1) 

IKEY a NDIC*10000 

NKEY = IKEY + NUM 

WRITE(9»KEY=IKEY) NUM»NDIC 

WRITE(9*KEY=NKEY) LT» (NAME(l) »I=1»LT) 

REWIND 9

RETURN

994 WKITE(6»1010)

1010 FORMAT(/' DICTIONARY KEY EXCEEDS PERMISSABLE CAPACITY*

FOR THE GIVEN '/ DATA ELEMENT NAME,*/*

' EXECUTION TERMINATED! »/% 

' CONTACT PROGRAMMER,') 

STOP 

END
APPENDIX C 99

SUBROUTINE MATCH

This subroutine searches all dictionary entries in a 

given dictionary category until either it finds a 

matching entry for new alphanumeric data input or 

it determines that no dictionary entry matches the 

new data input. A listing of subroutine MATCH appears at the end of this discussion. The inputs that 

are transmitted to subroutine MATCH through the 

calling sequence are the alphanumeric data string of 

the array, NAME, and the number of the dictionary 

category, NDIC. The subroutine returns the following values: LN, the number of computer words used 

by the data string; NKEY, the value of the key of 

the matching dictionary entry; NUM, the number of 

dictionary entries in the dictionary category. It also 

may execute two nonstandard returns.

The DATA statement (line 125) is used to initialize the contents of IBLANK as blank data. The value 

of IKEY identifies the line number where the value 

of NUM is stored for the dictionary category number, NDIC. The value of IKEY is computed (line 

126) and used to read the values of NUM and K 

(line 127). (The value of K exists on the file, but it 

is not used in this subroutine). The number of nonblank words, LN, is computed for the input data 

string, NAME, with a RETURN 2 exit taken if LN 

is equal to zero (lines 136-140).

The actual dictionary search for a matching entry 

takes place in the DO loop (lines 150-158) with the

DO loop index, I, going from one to NUM, the number of dictionary entries. The seven-word array, 

ITANK, is used to read in each dictionary entry. 

First, all words in the array are set to blanks (lines 

151-152). Then, the length of data string in computer words, LT, and the same number of computer 

words from the dictionary entry are read into the 

ITANK array. If the input array and the dictionary 

array do not contain the same number of computer 

words of data (that is, if LN^LT), control then 

passes (line 154) to the end of the DO loop. Each 

word of the NAME array is checked against each 

word of the ITANK array, and, if for any word of 

the string there is a mismatch (line 156), control 

again proceeds to the end of the DO loop at statement 50.

If the test (line 156) fails for all LN nonblank 

words, then there is a data match with that dictionary entry. Control transfers (lines 157) to statement 

90, where subroutine GETKEY is called (line 160) 

to obtain the line key for the matching dictionary 

entry. A standard return (line 161) is taken to end 

the search for a matching dictionary entry.

No special logic is required in this routine to accommodate differences in the record structure for 

each master file. However, one INFONET-dependent 

subroutine, GETKEY, is used to obtain the line key 

value, NKEY, for the matching dictionary entry 

(line 160).
100 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

100 SUBROUTINE MATCH(NAME»NDIC*LN»NKEYtNUM»*t*>

101 % THIS IS SUBROUTINE *'MATCH. »

102 % IT IS DESIGNED TO READ THE KEYED DICTIONARY FILEf

103 % SEARCH FOR THE DICTIONARY ELEMENT REQUESTEDt AND

104 % RETURN THE KEY ASSOCIATED WITH THAT ELEMENT

105 % ALONG WITH THE ELEMENT~NAME* IF THERE IS A MATCH.

106 %

107 % NAME = ARRAY (UP TO 7 COMPUTER *ORDS) OF NEW ALPHA108 * NUMERIC DAfA FOR COMPARISON WITH EXISTING

109 * DICTIONARY ENTRIES TO 1) DETERMINE UACT110 * IONARY POINTER OR I) TO DETERMINE THAT A

111 * DICTIONARY ENTRY DOES NOT EXIST FOR »HE

112 * GIVEN DICTIONARY CAJEGORY.

113 % LN s NUMBER OF WORDS (LESS THAN OR EQUAL TO 7)

114 % NEEDED TO STORE THE ALPHANUMERIC ENTRY IN

115 % "NAME."

116 * NDIC = DICTIONARY CATEGORY REFERENCE NUMBER,

117 * NUM * TOTAL NUMBER OF DICTIONARY ENTRIES IN THE

118 % "NDIC" DICTIONARY CATEGORY.

119 % ITANK = ALPHANUMERIC DICTIONARY ENTRY (AN ARRAY OF UP

120 % TO 7 COMPUTER WORDS)

121 % LT 9 NUMBER OF WORDS (LESS THAN OR EQUAL [0 7)

122 % NEEDED TO STORE THE ALPHANUMERIC ENTRY IN

123 % "ITANK."

124 DIMENSION NAME(7) 9 I TANK(7)

125 DATA IBLANK/' »/

126 IKEY 9 NDIC*10000

127 READ(9»KEY=IKEY) NUM»K

128 %

129 % NOTE! »K* IS THE NUMBER OF THE DICTIONARY CATEGORY AND

130 % »NUM» IS THE NUMBER OF ELEMENTS IN THAT CATEGORY,

131 %

132 %

133 * THE FOLLOWING SET OF STATEMENTS FIND THE NUMBER* »LN*»

134 % OF NON-BLANK WORDS IN THE ELEMENT TO BE LOCATtDt

135 %

136 LN = 0

137 DO 25 I=lt7

138 IF(NAMEU) ,EQ. I8LANK) GO TO 30

139 25 LN 9 I

140 30 IF(LN .£«. 0) RETURN 2

141 %

142 % THESE STATEMENTS SEARCH THROUGH THE NUMBER OF DICTIONARY

143 % ELEMENTS* »NUM*» IN THE SPECIFIED DICTIONARY CATtGORY

144 % TO LOCATE A DATA ELEMENT MATCH. IF THERE IS NO MATCHt

145 % A 'RETURN It EXIT RETURNS EXECUTION To THE CALLING SUB146 * ROUTINE WHERE THE USER WILL BE QUERIED AS TO WHETHER

147 % OR NOT HE WISHES TO HAVE HIS UNMATCHED ALPHANUMERIC

148 % DATA ADDED TO THE DICTIONARY LISTING,

149 *

150 00 50 I=1»NUM

151 DO 35 L=l»7

152 35 ITANK(L) = IBLANK
APPENDIX C 101

153 REAO(9) LTt<lTANK(K)fK=lfLT)

154 IFCLN ,NE. LT) 60 TO 50

155 DO 40 K«ltLN

156 40 IF(NAME(K) ,NE. ITANK(K)) 60 TO 50

157 60 TO 90

158 bO CONTINUE

159 RETURN 1

160 90 CALL 6ETKEY(9tNKEY)

161 RETURN

162 END
102 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE OUTUSC

Subroutine OUTUSC is a special subroutine written to provide a formatted display of the raw data of 

the WCOAL and ECOAL files for review and update. A listing of subroutine OUTUSC appears at 

the end of this discussion. The subroutine is totally 

dependent on the data-element names and the record 

structure of these files. The raw data from NSTRNG 

and STRING are transferred into the arrays NST

and XST (lines 109-111). This is done because NST 

has been dimensioned to the exact number of computer words needed for the integer and alphanumeric 

data, so that the output operation occurs as a block 

write (line 112) rather than as an implied DO write. 

The block form of input/output is considerably more 

efficient on the INFONET system. After the record 

has been written according to the accompanying format, control returns to the calling routine for further operation.

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

%

SUBROUTINE OUTUSC (NSTRNG»STRINGtKEYRt

THIS IS AN OUTPUT SUBROUTINE THAT HAS BEEN FORMATTED 

FOR TERMINAL OUTPUT OF THE "USCOAL" RECORD WITH THE 

DATA ELEMENTS DISPLAYED IN THE SAME FORM AS THEY HAVE 

BEEN ENTERED INTO THE RECORD,

%

10

100

NSTRNG(400)t 

(NSTRNGtSTRING)

STRING(400) NST(75)

1

DIMENSION 

EQUIVALENCE 

DO 10 I=lf75 

NSTU) = NSTRNG (I) 

XST « STRING(76) 

WRITE(6»1001) NSTtKEYRtXST 

FORMAT(/30X !»»»*»»»»» »'// 

STATE: 't4A4»8Xt'COUNtY: '»6A4/ 

PMERIO: 't!2t2Xt'TWNSHIP: 'tI3»« NS: «»Al

RANGE: 'ti3»« EK<: '»Aif« SECTION: «ti2»4Xt 

AAPGPRV: 'ti3//

«t4A4t3Xt'REGION: «t6A4t7Xt

«t4A4»2X»'DlSTRCT: »»6A4t7Xt'OVRBRUN: 'til/ 

'»4A4t6Xt'8ED: ' t S>A4f UXt 'RELIABL! '»!!// 

'»4A4t5Xt'QUAD: «»7A4t6Xt'8YEAR: 't!2/ 

'»4A4t3X»'SOURCE: 't5A4t2Xt'YEAR: 'tI4// 

'»2A4tAl»6Xt«ID: »tl8»' ... KEY: 'tIB»9Xt 

«»F8,2/30X '» »**»*»*# * //

COALPRV:

FIELD:

FORMATN:

SYSTEM:

SERIES:

RANK:

TONNAGE:

RETURN 

END
APPENDIX C 103

SUBROUTINE OUTUSA

Subroutine OUTUSA is a special subroutine written to provide a formatted display of the raw data 

of the USALYT file for review and update. A listing 

of subroutine OUTUSA appears at the end of this 

discussion. The subroutine is totally dependent on 

the data-element names and the record structure of 

this file. The raw data from NSTRNG and STRING 

are transferred into the arrays NST and XST (lines 

110-113). This is done because NST has been dimensioned to the exact number of computer words 

needed for the integer and alphanumeric data, and 

XST has been dimensioned to the exact number of 

computer words needed for the real data so that the 

output operation occurs as a block write (line 114) 

rather than as an implied DO write. The block form 

of input/output is considerably more efficient on the 

INFONET system. After the record has been written according to the accompanying format, control 

returns to the calling routine.

100

101

102

103

104

105

106

107

108

109

110 in

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

126

129

130

131

132

133

134

135

136

%

* T

* F

% D

% B

%

10

20

1001

« CO

t

 FO

« S

t

TYP:

t

t

LUID

t

OXYG

t

* *

RETU

END

SUBROUTINE OUTUSA(NSTRNG»STRING»KEYRtK*T)

THIS IS AN OUTPUT SUBROUTINE THAT HAS BEEN FORMATTED 

FOR TERMINAL OUTPUT OF THE "USALYT" RECORD WITH THE 

DATA ELEMENTS DISPLAYED IN THE SAME FORM AS THEY HAVE 

BEEN ENTERED INTO THE RECORD,

DIMENSION NSTRN6(400)t STRING(4QO) 

NST(81)» XSTU3) 

EQUIVALENCE (NSTRNGfSTRING)

DO 10 1=1,81

NST(I) « NSTRNG(I)

DO 20 I=l»13

XST(I) * STRINGU+81)

WR!TE(6t1001) NST»XSTiKEYR

FORMAT(/30X»* ******** *i//

1 STATE: «»4A4t8Xt'COUNTY: «»6A4/ 

« PMERID; »»i2?2x»iUNSHIP: t,i3,t

 RANGE; «tI3t» EW: 'tAlt' SECTION:

 AAPGPRV: t,i3//

ALPRV: »?4A4t3XttREGION: »»6A4/ 

FIELD: i»4A4t2X t tDISTRCT: «t6A4/

RMATN: »»4A4t6Xt»BED: «»5A4/ 

SYSTEM: tt4A4?5Xf«QUAD: »t7A4/ 

« SERIES: »tJA4t7x?'SOURCE: t,5A4t2x?»YEAR: 

RANK: »t2A4tAif4X»IANID: »tA4,i8t4Xt«S-TYP:

NS: »tAl»JX» 

'tI2t4Xt

*

*

>n»3Xt*VAL/REP: »tii/

TRACE: «»Altl2X,»HGRIND: »I3tl6Xt'OTHER TESTS: 'tAl//

BTU: »tI5f4xt»ASH:(DEFORM) «ti4t2Xt»(SOFT) »ti4t2Xt 

 »I4»3X»»FRE-S*EL: «tF3,l//

MOISTUR VOL-MAT FIXED-C ASH-PRX CARBON

(PERCENT)«/7XtF4,lt6(5XtF4.1)// 

NITROGN SULFUR URG-SUL PYR-SUL SULFATE 

KEY: »/7X,F4,lt4(5XfF4,l)tl6XfI8//30X«* * 

*«//)

%

HYDROGN

(PERCENT) 

*****

%
104 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE REDUSC

This subroutine is designed to read a raw-data 

record placed in a separate system file for the purpose of processing the record and adding it to either 

the WCOAL or the ECOAL files. A listing of subroutine REDUSC appears at the end of this discussion. 

For maximum efficiency of the input/output routine 

on the INFONET system, this subroutine performs 

the read and decode operations as block operations 

rather than as implied DO operations.

Use of the SYCOR system for data input requires 

that, for transmission, a raw-data record must be 

broken up into separate blocks, each containing 256 

or fewer characters (or 64, 4-byte words). For the

purpose of executing these read operations, IBLOK1 

has been dimensioned to 64 and IBLOCK2 dimensioned to 8. These two block read operations are executed in lines 126 and 131. For purposes of decoding, 

the INFONET system restricts a formatted input/ 

output operation to 144 characters or less. Therefore, IBLOCK1 has been broken into two separate 

strings for decoding through NST1 (line 127) and 

NST2 (line 130). Before the second decoding operation takes place, the last 30 words of IBLOK1 are 

transferred into the first 30 positions of IBLOCK1 

(lines 128-129). The string IBLOK2 is decoded into 

the block, NST3, KKK (the record key number), and 

XST (the real value associated with the last word of 

the data string).
	APPENDIX C 105

100 SUBROUTINE REOUSC<NSTRNG»STRINGtKKKt*)

101 %

102 % THIS SUBROUTINE IS DESIGNED TO READ THE RAW DATA FILE

103 % WHICH HAS BEEN TRANSMITTED VIA THE "SYCOR" TERMINAL TO

104 % THE "INFQNET" HOST COMPUTER FOR ENTRY INTO THE "WCOAL"

105 % AND "ECOAL" MASTER FILES.

106 %

107 % THIS ROUTINE ISt BY NECESSITY* PECULIAR IN TWO HESPECTS:

108 % 1) THE "ITS" SOFTWARE USED 8Y THE "SYCOR" TERMINAL"

109 % CAN ONLY TRANSMIT RECORDS OF 256 OR FEWER CHAR110 % ACTERS. THIS MEANS THAT THE RAW DATA FILE RECORD

111 % HAS BEEN BROKEN UP INTO TWO CHARACTER SfKlNGS*

112 % ONE WITH A LENGTH OF 64 WORDS AND THE SECOND WIJH

113 % A LENGTH OF 8 WORDS, FOR TRANSMISSION ANDt HENCtf

114 % READING PURPOSES.

115 % 2) THE "INFQNET" "READ"/"DECODE" ROUTINES WILL

lib * ACCEPT ONLY STRINGS OF 144 CHARACTERS OK LESS IN

117 % THE FORMATTED'DATA MODES. THIS INCLUDES THOSE

118 % PORTIONS OF THE DATA STRING WHICH ARE SKIPPED VIA

119 * THE X-FIELOS IN THE FORMAT. THIS MEANS THAT THfc.

120 * RECORDS MUST BE BROKEN DOWN FURTHER INTO BLOCKS

121 % OF 144 CHARACTERS OR LESS.

122 %

123 DIMENSION NSTRN6<400), STRlNG(400)t IBLOKl(64) 

124 lBLOK2(8)f NSTU38), NST2<32), NST3(4)

125 EQUIVALENCE (STRlNGtNSTRNG)

126 REAO(31,END=999> IBLOKl

127 DECODE<IBLOKltl001,ERR=997) NSTl

128 00 10 1=1,30

129 10 IBLOKl(I) = IBLOKl(1*34)

130 DECODE(IBLOK1,10Q4,ERR=997) NST2

131 READ(31,END=999) IBLOK2

132 DECODE(I8LOK2tl005»ERR=997) NST3»KKK»XST

133 1001 FURMATUOA4fI2,I3,AifI3»AlfI2,i3tlOA4,IltlOA4)

134 1004 FORMAT(Il,9A4»Il»3A4fAl»7A4»I2»8A4»I4)

135 1005 FORMAT(2A4»Al»I8»I7tF8.2)

136 DO 110 I=lf38

137 110 NSTRNG(I) = NSTKI)

138 DO 120 I=l»26

139 120 NSTRNG(I*38> = NST2U)

140 NSTRNG(65) « « «

141 DO 130 1=1,6

142 130 NSTRNG(I*65) « NST2(I*26)

143 DO 140 1=1,4

144 140 NSTRNGU+71) = NST3(I)

145 STRIN6(76) = XST

146 RETURN

147 997 WRITE(6,1003)

148 1003 FORMAT(/« DATA ERROR. CHECK DATA INPUT FILE.'/)

149 STOP

150 999 RETURN 1

151 END
106 PACER DATA ENTRY, RETRIEVAL, AND UPDATE FOR NCRDS

SUBROUTINE REDUSA

This subroutine is designed to read a raw-data 

record placed in a separate system file for the purpose of processing the record and adding it to the 

USALYT file. A listing of subroutine REDUSA appears at the end of this discussion. For maximum 

efficiency of the input/output routine on the INFONET system, this subroutine performs the read and 

decode operations as block operations rather than as 

implied DO operations.

Use of the SYCOR system for data input requires 

that, for transmission, a raw-data record must be 

broken up into separate blocks, each containing 256 

or fewer characters (or 64, 4-byte words). For the 

purposes of executing these read operations,

IBLOK1 has been dimensioned to 34, IBLOK2 dimensioned to 32, and IBLOK3 dimensioned to 28. 

These three block read operations are executed in 

lines 127, 129, and 131. They are then decoded, 

IBLOK1 being translated according to format into 

NST1 (line 128), IBLOK2 translated into NST2 

(line 130), and IBLOK3 translated into NST3, 

XST1, and KKK (line 132), where NST1, NST2, 

NST3 are blocks of integer and alphanumeric data, 

XST1 is a block of real data, and KKK is the record 

key value. These block values are then transferred 

into the proper positions of the NSTRNG and 

STRING arrays (lines 136 and 143), and a standard 

return is made to the calling subroutine. A STOP is 

reached following an error message if input difficulties have been encountered (lines 145-147).
	APPENDIX C 107

100 SUBROUTINE REDUSA(NSTRNGfSTRING*KKK**)

101 %

102 * THIS SUBROUTINE IS DESIGNED TO READ THE RAW DATA FILE

103 % WHICH HAS BEEN TRANSMITTED VIA THE "SYCOR" TERMINAL TO

104 % THE "INFONET" HOST COMPUTER FOR ENTRY INTO THE "USALYT"

105 % MASTER FILE.

106 %

107 % THIS ROUTINE IS* BY NECESSITY* PECULIAR IN TWO RESPECTS*

108 % 1) THE "ITS" SOFTWARE USED BY THE "SYCOR" TERMINAL*

109 % CAN ONLY TRANSMIT RECORDS OF 256 OR FEWfcR CHAR110 % ACTERS. THIS MEANS THAT THE RAW DATA FILE RECOHD

111 % HAS BEEN BROKEN UP INTO TWO CHARACTER STRINGS*

112 % ONE WITH A LENGTH OF 34 WORDS* THE SECOND WITH A

113 % LENGTH OF 32 WORDS* AND THE THIRD WITH A LENGTH OF

114 * 28 WORDS FOR THE PURPOSE OF TRANSMISSION.

115 % 2) THE "INFONET"' "READ"/»DECODE M ROUTINES WILL

116 % ACCEPT ONLY STRINGS OF 144 CHARACTERS OH LESS IN

117 % THE FORMATTED DATA MODES. THIS INCLUDES THOSE

118 % PORTIONS OF THE DATA STRING'WHICH ARE SKIPPED VIA

119 % THE X-FIELDS IN THE FORMAT, THIS MEANS JiHAT THE

120 % RECORDS MUST BE BROKEN DOWN FURTHER INTO~BLOCKS

121 % OF 144 CHARACTERS OR LESS.

122 %

123 DIMENSION NSTRNG(400)* STRING(400)* AST1U3)* *

124 MSTK37)* NST2(32)» NST3U2)* 1BLOKK34)* *

125 I8LOK2C32). IBLOK3(28)

126 EQUIVALENCE <STRING»NSTRNG)

127 100 READ(31*END=999) IBLOK1

128 DECODE(IBLOKl*1001»tRR=99) NST1

129 READ(31*END=999) IBLOK2

130 DECODE(IBLOK2*1002»ERR=99) NST2

131 READ(31*END=999) IBLOK3

132 DECODE(IBLOK3*1003.tRR=99) NST3*XST1»KKK

133 1001 FORMAT(4A4*6A4*I2»I3*A1*I3*A1»I2*I3»4A4*6A4»4A4»6A4)

134 1002 FORMAT(4A4*5A4*3A4»A1*7A4*3A4*5A4*14*3A4)

135 1003 FORMAT(A4.18*311»A1*I3.A1»1X*15*3(IX*14).F3.1*12(1X*F4.1)»18)

136 DO 110 1=1*37

137 110 NSTRNG(I) = NSTKI)

138 DO 120 1=1,32

139 120 NSTRNGU+37) = NST2U)

140 DO 130 1=1*12

141 130 NSTRN6(I+b9) = NST3(I)

142 DO 140 1=1*13

143 140 STRIN6(I+81) « XSTl(I)

144 RETURN

145 99 WRITE(6»1004)

146 1004 FORMAT</« DATA ERROR. CHECK DATA INPUT FILE. /)

147 STOP

148 999 RETURN 1

149 END