liatfonal Bureau of Standarqs

Library, E-01 Admin. BIdg.

MAY 1 9 1970

NBS TECHNICAL NOTE 500

National Bureau of Standards JUL 2 8 1972 1213

QC

Edit-lnsertion

Programs for

Automatic Typesetting

of Computer Printout
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards ' was established by an act of Congress March 3, 1901 . Today,

in addition to serving as the Nation's central measurement laboratory, the Bureau is a principal

focal point in the Federal Government for assuring maximum application of the physical and

engineering sciences to the advancement of technology in industry and commerce. To this end

the Bureau conducts research and provides central national services in four broad program

areas. These arc: (I) basic measurements and standards, (2) materials measurements and

standards, (3) technological measurements and standards, and (4) transfer of technology.

The Bureau comprises the Institute for Basic Standards, the Institute for Materials Research, the

Institute for Applied Technology, the Center for Radiation Research, the Center for Computer

Sciences and Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United

States of a complete and consistent system of physical measurement; coordinates that system with measurement systems of other nations; and furnishes essential services leading to accurate and

uniform physical measurements throughout the Nation's scientific community, industry, and commerce. The Institute consists of an Office of Measurement Services and the following technical

divisions:Applied Mathematics—Electricity—Metrology—Mechanics—Heat—Atomic and Molecular Physics—Radio Physics - —Radio Engineering -—Time and Frequency - —Astrophysics - —Cryogenics.

THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to im- proved methods of measurement standards, and data on the properties of well-characterized

materials needed by industry, commerce, educational institutions, and Government; develops,

produces, and distributes standard reference materials; relates the physical and chemical properties of materials to their behavior and their interaction with their environments; and provides

advisory and research services to other Government agencies. The Institute consists of an Office of Standard Reference Materials and the following divisions: Analytical Chemistry—Polymers—Metallurgy—Inorganic Materials—Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to promote

the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations in the development of technological

standards, and test methodologies; and provides advisory and research services for Federal, state, and local government agencies. The Institute consists of the following technical divisions and

offices: Engineering Standards—Weights and Measures — Invention and Innovation — Vehicle Systems Research—Product Evaluation —Building Research—Instrument Shops—Measurement Engineering—Electronic Technology—Technical Analysis.

THE CENTER FOR RADIATION RESEARCH engages in research, measurement, and application of radiation tb the solution of Bureau mission problems and the problems of other agencies and institutions. The Center consists of the following divisions: Reactor Radiation—Linac Radiation—Nuclear Radiation—Applied Radiation. THE CENTER FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research and

provides technical services designed to aid Government agencies in the selection, acquisition, and effective use of automatic data processing equipment; and serves as the principal focus

for the development of Federal standards for automatic data processing equipment, techniques,

and computer languages. The Center consists of the following offices and divisions: Information Processing Standards—Computer Information — Computer Services — Sys- tems Development—Information Processing Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination and

accessibility of scientific information generated within NBS and other agencies of the Federal government; promotes the development of the National Standard Reference Data System and a system of information analysis centers dealing with the broader aspects of the National Measure- ment System, and provides appropriate services to ensure that the NBS staff has optimum accessibility to the scientific information of the world. The Office consists of the following

organizational units:

Office of Standard Reference Data—Clearinghouse for Federal Scientific and Technical Information ' —Office of Technical Information and Publications—Library—Office of Public Information—Office of International Relations.

' Headquarters and Laboratories at Gaithersburg. Maryland, unless otherwise noted: mailing address Washington, DC 20234.

-' Located at Boulder. Colorado 80302.

' Located at 5285 Port Royal Road, Springfield, Virginia 22151.
UNITED STATES DEPARTMENT OF COMMERCE

Maurice H. Stans, Secretary

NATIONAL BUREAU OF STANDARDS • Lewis M. Branscomb, Director

NBS TECHNICAL NOTE 500

ISSUED APRIL 1970

Nat. Bur. Stand. (U.S.), Tecti. Note 500, 50 pages (Apr. 1970)

CODEN: NBTNA

Edit-lnsertion Programs

for Automatic Typesetting of Computer Printout

Caria G. Messina and Joseph Hilsenrath

Office of Standard Reference Data

National Bureau of Standards

Washington, D.C. 20234

..< °^"'<

•"•eau ot *

NBS Technical Notes are designed to supplement the Bureau's regular publications program. They provide a means for making available scientific data that are of transient or limited interest. Technical Notes may be

listed or referred to in the open literature.

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C, 20402

(Order by SD Catalog No. CI 3.46:500), Price 60 cents.
FOREWORD

This report describes one of a series of computer

programs being developed by the Data Systems Design Group of

the NBS Office of Standard Reference Data to assist the Data

Centers affiliated with the National Standard Reference Data

System. The text of this report was reproduced from a typescript prepared on a typewriter terminal connected to a time-shared computer system. The program listing was

produced from a magnetic tape which was produced from one of

the programs described in this report.

II
TABLE OF CONTENTS

1. Introduction 1

2. Program Characteristics 2

2.1 Modification for Improved Run Efficiency 3

3. The Subroutines 6

4. The Control Cards 6

4 .

1

Control Cards for SETLST and AMATCH 6

4.2 The Control Cards for SUBSTITUTE 7 4.3 Control Cards for KWIND 8

5. Applications 10

5.1 Applications to Program Listings 10

5.2 Applications to KWIC Indexes 11

5.3 Applications Requiring Multiple Grids 11

6 . Acknowledgements 20

7 . References 20

APPENDIX I

Program Listings ....21

SETLST 22

KWIND 26

Subroutine SUBST 30

Subroutine SUNLK 34

Subroutine SULOCK 35

Subroutine CHECKI 36

Subroutine AMATCH 37

Subroutine NPRINT 39

APPENDIX II

Subroutine NPRINT 42

Subroutine PACK 43

Subroutine TPNRD 44

Patches for labeled COMMON 45

III

Edit- Insertion Programs for Automatic Typesetting of

Computer Printout

by

Carla G. Messina and Joseph Hilsenrath

SETLST and KWINU are FORTRAN programs which accept a card deck or Fortran

records on magnetic tape and insert the appropriate flags and shift symbols

required by many of the "standard" typesetting programs associated with

phototypesetting devices. The programs are specialized to the particular

application; the typesetting device and associated programs; and to the

desired typeface, by means of control cards and substitution tables supplied

at run time. Examples are shown of applications to program listings, KWIC

indexes, and normal computer output. When the input is in tabular form, the

program permits more sophisticated operations including rearrangement,

removal of trailing blanks, typeface changes between columns, etc. These

programs can handle any records which can be read by a FORTRAN READ statement

under an "A" format control.

Key words: Applications, computers, computer-assisted typesetting, FORTRAN

programs, KWIC index, phototypesetting, printing.

1. Introduction

The ease with which a computer is able to prepare a permuted title index has

resulted in the proliferation of such indexes. Usually these indexes are produced by

a photoreduction of the computer print-out. Often, the quality of the printed index

leaves much to be desired. Even when extreme care is taken to see that the text is

legible, the pages are not usually in the correct proportion for a standard size of

printed page. Program listings are more often than not reproduced with marginal

clarity.

A technique for automatic- typesetting of program listings and KWIC indexes enables

one to produce a page with so called "graphic arts" quality. A suitably selected

typeface and size and a correspondingly appropriate page depth (number of lines per

page) offers additional opportunity for economy of space and money as well as improved

readability.

A technique for automatic typesetting of tables direct from magnetic tapes was developed at NBS by W. R. Bozman in 1962 [1]. Since that time several books of data

have been produced by this method. The production of each of these books entailed the

preparation of special programs requiring the services of a programmer experienced in

machine language programming and having detailed knowledge of the operation of the

Linofilm machine.

A more general pioneering effort in computer-assisted typesetting was carried on

at MIT under the leadership of Dr. Michael P. Barnett. IVhile it is unfortunate that

the programs produced by Barnett and coworkers have not been maintained in recent

years, the results of that work - described too modestly as "experiments" - have been

fully recorded [3],

In recent months the Data Systems Design group of the NBS Office of Standard

Reference Data has addressed itself to the problem of preparing a series of general

purpose programs for text preparation, editing and photocomposition. This report

describes the two programs which will enable any computer user to prepare magnetic

tapes for phototypesetting of program listings, of KWIC indexes, and other material

normally run on a line printer.
The program SETLST is in the spirit of the pioneering work of Barnett [3]. In some respects it is less general than that of Harnett's TABPRINT, since we do not

typeset column headings and rules, but rather rely on overlays (for these.) It is more

flexible where character stream transformation is required in changing upper case characters to upper and lower case, and in substitution of Greek characters and

special symbols for their designation in the text.

Unlike TABPRINT which produces output to drive a particular photounit, SETLST

produces tapes which need to be run through a typesetting program before the material

can be set. It is however a feature of SiiTLST that it can insert any flags or header

as may be required and hence is not restricted to a particular typesetting program or

a particular machine. The specific strings or headers or flags are supplied at run

time.

The program KWIND uses the same subroutines as SETLST but is especially tailored 1 for typesetting of KWIC indexes. It is a characteristic of KWIC indexes that they

have a gutter in the middle of the page which the KWINU program recognizes in order to operate on each half separately. On either side of the gutter KWIC lines have one of

five characteristics, the line is either set flush left, or flush right, or flush left

and right with a gap in the middle, or completely full or completely blank. The KWIND

program scans the line, determines which type of line it is, and proceeds in the

following manner. The flush left line is set flush left, and the program goes on to the next line. The flush right line is set flush right and the program goes on to the

next line. The third type of line requires fancier treatment. The left hand piece is

set flush left exclusive of the trailing blanks, the rest of the line is reset flush

right without film advance and ignoring the leading blanks, then the program goes on

to the next line. The fourth type of line is justified to an appropriate pica width.

In addition to the two main fields described above, KWIND allows the designation of

two additional fields to carry an identification. As duplication of fields is

allowed, it is possible to repeat a single identification segment on both the left and

right side of the index.

2. Program Characteristics

The programs discussed here operate on a file consisting of a program deck, or a series of records on tape, or the output tape (print tape) of a KWIC index, to produce

another tape in precisely the format required for phototypesetting systems at the

Government Printing Office or on other comparable systems. The program - suitably

instructed via control cards - inserts a sequence of flags or locators or format

designators where needed. The program is specialized to the particular application;

the typesetting device and associated programs; and to the desired typeface; by means

of control cards and a substitution table supplied at run time.

The substitution table is required to provide capital letters where desired and to indicate the location of punctuation and other symbols, the distribution of which is

not standard on keyboards or grids. Another important use of the substitution table

is to insert instructions in the character stream to obtain characters (mathematical

symbols, Greek letters, etc.) not on the primary grid.

In most cases a typeset page will be longer than the 60 or so lines on a normal

computer listing, hence the headings or dates or footings or page numbers which often

appear on each page of computer output are extraneous and must be deleted. This the

program does in an interesting way.

A series of control cards are supplied which contain the exact contents of the

lines that are to be deleted. There is one card for each type of line. Any line in

the file whose first 80 characters match any of the control cards is automatically

ignored. While this takes care of any number of lines of text which remain fixed from

page to page, there is still the problem of ignoring lines which give the page number

which will vary from page to page. For this purpose, a provision has been made for

indicating which fields are to be ignored in making the match. Since information

which varies from page to page (like a table or a page number) is in a fixed location,

an "ignore" symbol in these positions will do the job. IVhich symbol is used as an "ignore" symbol is open to choice as it is specifically indicated on one of the

control cards.
2.1 Modification for Improved Run Efficiency

The programs given in the following pages are written in as low level dialect of

Fortran as possible to facilitate their use on machines of different manufacture and

compilers of different vintage. As a consequence the programs may be somewhat less

efficient than ones written without these restraints.

Ln particular, we have made it a practice to imbed arguments in CALL statements

rather than placing them in labeled COMMON. Experience in running production jobs on

the WiiS compiler indicated that a 10% saving in run time was achieved by modifying the

program by the introduction of a set of labeled common statements. These and other

changes needed to take advantage of the features of the compiler on the NBS 1108 are given in Appendix II. The places where these changes are to be made are clearly

marked on the program listings in Appendix I.

FINIS$

SUBSTITUTION TABLE

/A/ />A/

/!F/ /!F1/

Ox 1

0><

5 6 3

ABCUEF WXYZO 12 54 56 789 '/(*) = ,$r:^

FINIS$

!F1

80

80 "N

ABCDEFGHIJKLMNOPQRSTUVWXYZ) 123456789

Figure la. The control - cards and substitution table

required by SETLST to format computer output for processing

through the Mod I Autoset program at the Government Printing

Office in order to utilize the monowidth typewriter grid

shown in Figure 2.
ABCDEFGHIJKLKNOPQRSTUVlvXYZO 1 23456789 / \

1 80 5 8

FIELD 1 GOES FROM I TO 80

THE FOLLOWING 1 CARDS CONTAIN THE INSERT STRINGS.

!F1

SUBROUTINE AMATCH INPUT

4 >>FINISS

ABCDEFGHIJKLKNOPQRSTUVV/XYZO 123456789 /(*)=,$.+

5 6 3

0><

0>< 1 /!F1/ /!F1/

/A/ />A/

/B/ />B/

/C/ />c/

/D/ />D/

/X/ />x/

/Y/ />Y/

/Z/ />Z/

/+/ />8/

/ = / />9/

/*/ />o/

/// ^ />//

/(/ />^/

/)/ />./

/§/ />2/

/#/ />!/

/&/ />-/

/:/ />;/

/!/ /// -^ /?/ />?/

FINIS

I

Figure lb. A printout supplied at the end of a SETLST run

of the control cards shown in Figure la. Note that the

substitution table which was entered in free-field format

has been lined up for readability. The slash shown as

string delimiters are uniformly supplied by the program

regardless of what the actual string delimiter was on input.

In particular, since the delimiter itself cannot be

contained in the string it delimits, the control cards

marked above with an asterisk had periods for delimiters.
Linofilm Keyboard Chart CLARINDA TYPEWRITER X-4

Shift

Jnshift

Shift

Unshift

fFi ffl ( ) ff — & ! fi fi /

EM

LE> # @

-^ 14"^ 12 + = )f /

7o 1 2 3 4 5 6 7 8 9 I

10

13

Shift

Unshift

24

Shift

Unshift

14 15 16 17 18 19 20 21 22 23

32 33

12 Q w E R T Y u 1 o p ? Q W E R T Y U I p ?

q w e r t y u i p $

A s D F G H J K L

•

• 6 A S D F G H J K L

• 11 a s d f g h J k 1 t

1

34

z X c V B N M 1 • * Z X C V B N M ( ) &

z X c V b n m >

•

EM

OtSII

35 36 37 38 39 40 41 42 43 44

Figure 2. The layout of characters on the monowidth grid used to typeset the

examples shown here. Note the connection between the layout of the graphics and

the substitution table in the previous figure. Because other typefaces have

different distributions of characters in the shift and unshift position, it is a great advantage to define the locations of the character via a substitution

table rather than in the program proper. The advantage of this grid is that it

contains all of the characters on a model 26 key punch. The use of most other

grids for typesetting of computer listings require time consuming grid changes.
3. The Subroutines

The program SHTLST makes use of two general purpose subroutines. The first of | these, AMATCH, compares an input record to see if the front part matches one of a number of character strings supplied at run time. SETLST uses this to throw away

unwanted lines from the input such as page number, page headings, etc.

The second, SUHSTrfUTH, is used here primarily to insert shift symbols ahead of

those characters which must appear in upper case. The input for this subroutine,

which is supplied at run time via a substitute table, also specifies the precise

characters which must be inserted in the text stream in place of such punctuation and

graphic characters as, :, ?, /, =, +, -, etc. Which characters are substituted for

the above symbols depend on the layout of a particular typesetting grid. For this reason the string substitutions are not built into the program. They are supplied on cards as part of the input. This makes the program applicable to systems other than

those in use at the Government Printing Office. Other applications of SUBSTITUTE can

be found in NBS Technical Note 470 [2], Figure 1 shows the control cards and

substitution table for the character layout on the Clarinda Typewriter grid in use at the Government Printing Office.

The subroutines PACK and N PRINT are used in this program to repack the

characters, six to a computer word, and to write them on tape in records longer than

the 132 characters normally permitted in FORTRAN. The repacking is necessary as the

original files are read in and manipulated in Al format. The subroutine N PRINT is

required in order to write longer records than is possible under FORTRAN available on

the NBS machine. In this assembly the record length (NCOUT) is specified as 300

characters. In normal usage this figure should be set to coincide with the size of

the input buffer of the typesetting program for which the output tape is being

prepared.

The Control Cards

4.1 Control Cards for SETLST and AMATCH

The first control card contains the alphabet in order starting in card column one followed by the integers in increasing order. In card column 50 is the end of line

symbol required by the typesetting program. The program logic makes use of the

location of the characters on the first control card in such a way as to avoid

entirely the need to know how a particular machine recognizes a character on a card,

what the internal bit representation of that character is, and where that character is

placed in a machine word. Nor is it dependent on whether a single character is stored

left-adjusted, right-adjusted or any other way. In this way the program is

independent of whether the particular machine stores away 3 characters per machine

word, or 6, or any number. If a typesetting program requires a particular character

as a halt signal, that character must be punched into card column 50. The program

ends the tape with two characters - a blank and the character designated in card

column 50. Pains are taken to ensure that these two characters appear in the same

record.

The second control card has six switches, each switch takes up five card fields

and must be right adjusted in the field. The first switch contains the number of

fields to process (greater than zero). The second switch should be set to -1 when

only the printer will have the output, to zero when the printer and a tape will have

the output, and to 1 when only the tape will contain the output. The third switch

contains the length in characters of the input records (80 if from cards , and up to 132 if from tape records.) The fourth switch should be zero when all fields and their

locators are to be put out regardless of whether or not the field is completely blank.

It should be set to one when blank fields are to be ignored completely. This

provision alleviates the flashing of unnecessary blanks. The fifth switch is the unit

number from which to read the records to be typeset. The sixth s"wTtch is the number

of the tape unit on which to write the output.

The third control card contains two numbers for each field denoted by the first

switch. These numbers must be separated by at least one space. They indicate the

starting and ending locations of the data to be extracted from the input records.

The next group of control cards contain the typesetting flags to be inserted ahead

of the segments of the input. The flags are terminated by a blank. There must be as many flags as data fields (segments specified in switch one.)

I
The fifth type of control card carries the header information in (I2,78A1) format

as required by some of the typesetting programs. A blank card must be inserted for

those programs which do not require a header.

The next set of controls are needed for the subroutine AMATCH. The first card

contains 2 characters in free-field form. The first of these is the character used to terminate the "match strings" discussed below. The next character is treated as a universal character when found in the "match string." It is used to cope with variable

pieces of an otherwise fixed context, such as a page number in a heading line. The

"match" strings are punched starting in column 1 and extend up to the string

delirainator or the end of the card. The control cards for AMATCH are terminated by a card carrying FINIS followed by the character used to terminate the "match" strings.

The last set of control cards following AMATCH carry the instructions for the

SUBSTITUTE subroutine. They are described in the next section.

4.2 The Control Cards for SUBSTITUTE

I The first control card serves to define the punch configuration for the characters

[in the text as well as the control characters upon which the operations depend. The

presence of the characters on the first card obviates the need to define them

explicitly in the program. This simple device makes the program independent of a variety of incompatabilities which are such a source of trouble in adapting programs

to different computers.

The program logic uses the disposition of the characters on the first control card

in such a way as to avoid entirely the need to know how a particular machine

recognizes a character on a card, what the internal bit representation of that

character is, and where that character is placed in a machine word. In this way the

program is independent of whether the particular machine stores away 3 characters per

machine word, or 6, or even 7. Nor is it dependent on whether a single character is

stored left-adjusted, right-adjusted or any other way. The alphabet is punched in

order into the first 26 card columns hereinafter referred to as cc, and the digits

0,1,..., 9 follow in cc27 through 36. The character to be used to delineate the

strings in the output of this program is designated in cc38; while cc47 must be left

blank in this program and in all programs in this series.

The second card contains three switches in FORMAT (312). They serve no purpose

here but must be present nevertheless.

The third and fourth control cards in FORMAT (4X, 2A1, 12), specify the format of

the input and output records, respectively. The three items on each card perform the

I following tasks:

I a. The first two items designate the characters used for case-shift lock and

lease-shift unlock. Their use is required only under circumstances described below.

I b. The third item instructs the program to insert on input and delete on output,

the case-shift symbols designated in item a. If this number is set to zero, the

option is bypassed, in which case the first and second items discussed in item a above

may be left blank. If this item is a non-zero integer, it distributes, when present

on the third control card, and deletes, if present on the fourth control card, the

shift case symbols indicated by the two previous items on the control cards.

Immediately following the fourth control card for substitute is a deck of cards

containing the instructions for the string substitutions. In this version of the

program, each card carries two strings--the original one and its substitute. The

length of the strings this program handles is limited to a total of 76 for the string

and its substitute. Thus a "long" string can be replaced by a "short" one and vice

versa. Replacement of "long strings" by "long strings" can often be achieved by

breaking them up into pieces and substituting piecemeal.

Each of the strings is delimited by a balanced character which is read from the

first column of the substitution card. In this way each card can have its own string

delimiter. The only requirement is that the delimiter character must not be one which

is in the string it delimits. See Figure 1 for a sample set of control cards for

this program.

The substitution table must be followed by a card with the word FINIS starting in

ccl. It may be followed by the text to be manipulated if the input is from a card

reader.
A number of text editing systems reserve one character as a precedence symbol to I indicate an upper case letter. Thus if we punch *WAS11INGT0N we would expect a , suitable printer to print out Washington. A single symbol could be used to print the

[ word in all caps if one were prepared to type *W*A*S*H* I*N*G*T*0*N . This is obviously

too time consuming as well as wasteful of valuable computer space. The problem is

easily solved by reserving another symbol such as an apostrophe to indicate shift lock

and shift unlock. In that case our test word would be keyboarded as follows:

'WASHINGTON'

.

Subsequent transformation of these symbols as would be required in going to automatic typesetting or converting from the BCD representation to EBDIC would have to treat the character following the W differently in the strings 'WASHINGTON' and

*WASHINGTON. This problem is solved by SUBSTITUTE in the following way. When

instructed to do so via the third control card, the program changes 'WASHINGTON' to

' W'A'S'H' I 'N'G'T'O'N. If instructed to do so via the fourth control card and after

carrying out the substitution, the interior shift symbols are deleted and the word is

imbedded between the shift and lock symbol and unlock symbol.

4.3 Control Cards for KWIND

The first control card for this program is identical to the first card in SETLST

and serves the same purpose.

On control card two, switches 1,2,3, and 4 perform the same functions respectively

as switches 2,3,5, and 6 of control card two in SETLST.

The third control card defines the fields into which the input line is broken.

The order in which the fields are defined is important as the first and fourth fields > are taken to be identifiers and the middle two as the index information. Suitable use

of 0,0 on this control card provides for omission of one or more of the four fields.

Thus on a system which cannot handle the full width of a KWIC index, it is possible to

break the job into two portions. The left half can be run through first and the

second half on a succeeding run. The two halves can then be pasted together using the

duplicate identification numbers for alignment. Figure 9 was produced in this manner

on a photounit which permitted a maximum width of only 43 picas. This method may be

troublesome if the photounit does not advance the film uniformly.

The next 8 cards serve to define the manner in which line segments will be set as outlined in the introductory remarks on KWIND. Each card carries an arbitrary string

of characters which is required by either the photounit or its associated typesetting

program to achieve a flush left line, a flush right, a justified line, etc. The order

of the cards is important as the program performs different operations after inserting

different flags.

The first and the eighth cards must carry the flag (a locator) for the first and

the fourth field (in this case an identifier) . How this field is set is open to

control by the typesetting program external to this program. The remaining cards

carry the flags required to achieve the following results:

the 2 nd card carries a flag for quad left setting of the first half of a line in

the second field.

the 3rd card carries a flag for quad right setting of the second half of a line in

the second field.

the 4th card carries a flag for setting a justified full line in the second field.

the 5th card carries the flag for the quad left setting of the first half of the

thirJ^ield.

the 6 th c ard carries the flag for quad right setting of the second half of the

third field.

the 7th card carries the flag for setting a justified full line in third field.

The above flags are considered terminated by a blank. All of the eight cards must

be present. A blank card is treated as a string of zero length. It will affect the

result only in that no flag will be inserted. The last control card, and those which

follow are the same as in SETLST.
5. Applications

Applications of these programs fall into three main classes. The first and most

straightforward is where we wish the final product to be a facsimile of the page

aroduced on a line printer. Computer listings and results of report generators fall

in this category. These applications require the duplication of the results, linefor-line and character-for-character , as they appear on the line-printer. The

typesetting of such material requires the use of a monowidth typeface as is ordinarily

found on a typewriter.

In the second application, we wish to improve the readability of the output by an Appropriate transformation of the alphabetic characters to read as if they were

originally entered in upper and lower case. Straight text, KWIC indexes, and

(bibliographies are examples of material which benefit from such treatment. In this

Application it is often not necessary to restrict the final output to a monowidth

[typewriter face as the program has ample provision for lining up the output in columns

las required. Thus a fancier typeface can be used.

I In the third application we can include those cases where material needs to be

highlighted through the use of italics or boldfaced characters or even special

characters like mathematical symbols or Greek letters. Such applications may require

the use of more than one grid on the phototypesetting unit.

1

'1

1 COMPND 1 3-*BENZYL-2 , 6-DIPHENYL-2/H-THI0PYRAN-5- BPTPCA

COMPND 2 CARBOXALDEHYDE BPTPCA

AUTHOR MAZHAR-UL-HAQUE, C . N . CAUGHLAN BPTPCA

JRNL CHEM.COMMUNIC 34 1967 066 BPTPCA

CDFRML C25H2001S1 BPTPCA

'1 CRYSTl 11 004 11 .062 16.855 96.5 P 21/N BPTPCA

COMPND 2,6-*DIMETHYLBENZ0IC ACID DMBNZAIO

AUTHOR R.ANCA, S.MARTINEZ-CARRERA, S . GARCIA-BLANCO DMBNZAIO

JRNL ACTA CRYST. 23 1010 1967 001 DMBNZAIO

CDFRML (C1H3)2 C3H3C10101H1 DMBNZAIO

CRYSTl 15 24 4. 04 13.16 94*08 P 21/A DMBNZAIO

CRYST2 01 0. 01 0.01 DMBNZAIO

CRYST3 4 1. 227 1 .21 DMBNZAIO

COMPND 1 2 ALPHA-*BROMOARBORINONE BRARBOIO

AUTHOR 1 O.KENNARD, L.RIVA SDI SANSEVERINO, J . S . ROLLETT BRARBOIO

JRNL 1 TETRAHEDRON 23 131 1967 16 BRARBOIO

CDFRML 1 C30H47BR101 BRARBOIO

CRYSTl 12 84 8. 68 22.46 P 21 21 21 BRARBOIO

CRYST2 01 .01 0.04 219.0 BRARBOIO

CRYST3 4 1. 34 1 .39 BRARBOIO

COMPND 1 (*GLYCYL-/L-HISTIDINATO) COPPER (II) SESQUIHYDRATE CUGLHIIO

AUTHOR 1 J.F.BLOUNT, K.A.FRASER, H.C. FREEMAN, J .T . SZYMANSKI

CUGLHIIO

AUTHOR 2 C. -H.WANG CUGLHIIO

JRNL 1 ACTA CRYST. 22 396 1967 001 CUGLHIIO

CDFRML 1 C8H10CU103N4/ 1.5H201 CUGLHIIO

CRYSTl 11 24 17.84 P 43 21 2 CUGLHIIO

CRYST2 02 0.04 CUGLHIIO

CRYST3 8 1. 772 1 .72 0.02 CUGLHIIO

COMPND 1 *MONOAQUO(BETA-ALANYL-A-HISTIDINATO) COPPER (II ALHICUIO

nOMPNO 2 MONOHYDRATE ALHICUIO

Figure 3. A portion of a punched card data file set in a monowidth typeface by

SETLST using the control cards shown in Figure 1.
5.1 Applications to Program Listings

Program listings represent a class of applications where it is important to reproduce the material exactly as it appears on punched cards, or on the print tape

which drives a line printer, or on magnetic tape records. A monowidth character set

resembling the type on a typewriter such as is shown in Figure 2 is required here.

In this application we set switch 1 and 3 of the second control card to 1 and 80 respectively to define the entire card as a single field; designate the three

characters !F1 to be inserted at the beginning of each line in the output; instruct

the program via the substitution table to capitalize each letter of the alphabet and

on which keys to find the graphics +,-,=,(,) etc. Figures 5, 4, and 5 show the

variety of material which was set from a deck of cards and the control cards shown in

Figure 1.

CALL NUMFND ( SCAN , A , 80, START , GOOF

)

IF (( A . GE . 79 ) . OR . ( GOOF . LE . )

) CALL EXIT

CALL NUMFND (SCAN, A, 80, STOP, GOOF)

IF(GOOF.LE.O) CALL EXIT

READ(5,1) (SCAN(A) . A=l,80)

DO 7 A=l,72

IF(SCAN(A) .NE.BLANK) GO TO 8

7 CONTINUE

9 WRITE (6, 10)

10 FORMAT ('ONO OR POOR SKIPCC CARD. RUN ABORTED.')

CALL EXIT

8 DO 11 8=1,6

IF(SCAN(A) .NE.CHK(B) ) GO TO 9

11 A=A+1

DO 12 B=A,80

IF(SCAN(B) .NE.BLANK) GO TO 13

12 CONTINUE

GO TO 14

13 SKIP=SCAN(B)

14 READ(5,1) (SCAN(A) ,A=1,80)

19 READ(7,1,END=20) (TAPE (A), A=l,80)

DO 16 B=START,STOP

IF(SCAN(B) .EQ.SKIP) GO TO 16

IF(TAPE(B) .NE.SCAN(B) ) GO TO 19

16 CONTINUE

WRITE(6,17) (TAPE(A), A=l,80)

17 F0RMAT(17X,80A1)

GO TO 19

18 CALL EXIT

20 D=D+1

GO TO 15

END

Figure 4. A portion of a program listing phototypset at the Government

Printing Office from a tape produced by SETLST from the original program

deck, using the control cards shown in Figure 1.

10
5.2 Applications to KWIC Indexes

In order to improve the readability of a KWIC index, it is necessary to do more

than set it in a fancy typeface. It is necessary to transform the alphabetic

characters to appear in upper and lower case. This is easily accomplished in KWIND

via a more extensive substitution table. A typical end result is seen in Figure 6 where most of the words appear in initial caps while articles, preposition, etc., are

set in lower case and certain words like USA are set in all caps.

The original format of the index is shown in Figure 7 and the substitution table

that accomplished this transformation is shown in Figure 8. The improved readability

iof Figure 6 results more from the conversion to upper and lower case than it does from

the variable width typeface, as can be seen from Figure 9 which is set in Times Roman

type but in all caps.

5.3 Applications Requiring Multiple Grids

Thus far the applications stressed the use of but a single grid. Both SETLST and

KWIND can handle as many grids as are required or as are permitted by the typesetting

[program for which the tape is being prepared.

In a number of existing abstract journals (Nuclear Science Abstracts or U.S.

[Government Research and Development Reports), Greek letters are spelled out and

isuperior letters or figures are preceded by the word "exp." If the tape which

produced these publications were run through SETLST it would be possible to replace

the word ALPHA or Alpha by a call (=G3, for example) to the appropriate grid which

contained the Greek alphabet. Similarly it is possible to call for superior and

inferior characters from an appropriate grid.

DETAILS FOR TABLE 1 — SINGLE PRECISION 8 DIGITS)

OMNITAB, USING ORTHO SUBROUTINE 7094 EXAMPLE 13 BETA-HAT (Yl) COUNT BETA-HAT (Y2) COUNT 1.0012817 2.892 .99999949 6.292

.99780273 2.658 .10000013 5.886

.99932861 3.173 .0099999756 5.613 1.0001755 3.756 .0010000018 5.745

.99998569 4.844 .000099999866 5.873 1.0000004 6.398 .000010000004 6.398

AVERAGE = 3.954 AVERAGE = 5.968

OMNITAB, USING ORTHO SUBROUTINE 1108 EXAMPLE 14 BETA-HAT (Yl) COUNT BETA-HAT (Y2) COUNT 1.0064697 2.189 .99999990 7.000

.99902344 3.010 .099999700 5.523

.99975586 3.612 .010000125 4.903

.99996948 4.515 .00099998200 4.745 1.0000100 5.000 .00010000109 4.963

.99999968 6.495 .0000099999778 5.654

AVERAGE = 4.137 AVERAGE = 5.464

ORTHO, WITH RE-ORTHOGONALIZATION OMITTED 1108 EXAMPLE 15 BETA-HAT (Yl) COUNT BETA-HAT (Y2) COUNT -1216.5426 -3.085 .98419483 1.801 2752.0557 -3.439 .13523918 .453 -1057.0931 -3.025 -.0034660707 -.129

146.97336 -2.164 .0028495983 -.267

-7.3080225 -.919 -.0000049256487 -.021 1.1663037 .779 .000012094996 .679

AVERAGE = -1.976 AVERAGE = .419

Figure 5. A typeset version of a formatted computer output.

See Figure 14 for the same material photographed from the

Computer output.

11
Thtnnal Condui.tanci' Factors for Pitroiined Gij(liii/Of^

GradingyOf/

CoateiT Grading of Abiasivi' Grain On Coated (1%5) Aciylonitrile Butadiene Styrene

Atrylonitrile Butadiene Styvene

Rigid Colors for Kitthen

Colors for BathTM««.

Stove Pip/And

j Metal Lath E\panded and Shvet and Metal PlastKin^/

Solvent Welded Swp Size Cellulose

Girls, and Boys Knit Underweai' Exclusive of Rayon,

waste and Vent Pipe and Fittings (19tio) PR and Class T) (1%3)

Hollow Metal Single

Water Resistant Orgajic

Polystyrene Plastic Wall TilesAmN

Chasers for Self Openin^^nd/

Hot Dipped Galvanized Ware Coated Wire Diameters for Mineral Coafse

Polyethylene Sheeting Construction, Industrial/AndN

(1942) V J

Above-Deck Roof Insulation (19o.')) Abrasi\e Grain for Grinding Wheels (19t).)) Abrasi\e Grain On Coated Abrasi\e Products (1907) Abrasive Products (1953) Abrasive Pioducts (191)7) ABS Plastic Drain, Waste and Vent Pipe and Fittings ABS Plastic Pipe (SDR PR and Class T) (1963) ABS Plastic Pipe, IPS Dimensions (1959) Accessories (1938) Accessories (1938) Accessories (1942) Accessories (19(iU) Accoustical Materials (19UU) Acetate Butyrate Pipe (1957) Acetate, and Nylon (1935) Infants, Childrens

Acrylonitrile Butadiene Styrene ABS Plastic Drain.

Acrylonitrile Butadiene Styrene ABS Plastic Pipe (SDR

Acting Swing Doors, Frames and Trim (1928) Adhesive Plaster (1952) Adhesives for Installation of Clay Tile (1952) Adhesives for Their Application (195U) Adjustable Die Heads (1929) After Fabrication (1959) Aggregate Production Screens (1942) Aggregates, Crushed Stone, Gravel, and Slag (1948) Agricultural Application (19U1) Agricultural Insecticide and Fungicide Packages

use R257 use CS2-1 use PS8 use R89 use PS8 use CS27U use eS254 use es2i8 use esi)2 use es(i3 use R19U use R3 use R262 use es20() use CS198 use CS270 use CS254 use R82 use R85 use esi8i use eSlti8 use R51 use CS161 use R147 use R163 use CS238 use R41

Figure 6. A portion of a KWIC index produced by SETLST from records

shown in Figure 7. See Figure 8 for an explanation of circled mistakes.

lALiJ\/E-JtCh

S. DEPT. OF COMMERCF STANDARDS

TITLF WOflO INOFX

rHtWMul COigUUCTANCE FACTORS FOR PREFORMED

fiRADlNG OF

fiRADiNG OF COATED

fi.TAniNG OF AHRASIVE GRAIN ON COATED

11J65) ACRYLONITRILE BUTADIENE STYRENE ACRYLONITRILE BUTAOIENF STYRENE

RIGID COLORS FOR KITCHEN COLORS FOR BATHROOM

STOVF PIPF AND MEIAL L«Th tXPiuDEri ANU SHEET AND METAL PLASTERING

SOLVFnT WFLUEU swp SIZE CFLHILOSE

oiRLb. ANii HOYS KNIT urjoFRwEAR Exclusive of rayon. *ASTt A.4(/ VFijT PTPF A.^l|) FITTINGS (196S) PR ANIJ Class D (19b3) HOLLOW METAl SINGLE

wATtR RFSISTANT ORGANIC POLYSTYRENE PLASTIC WALL Til FS. AND CHASFHS FOR SFLF OPENING AND

HOT niPPED GALVANI7EI) WARE COATED

WIRE DIAMETERS FOR MINERAL COARSE

POLYEThYLF.MF ShFFTInG CONSTHUCriON. INDUSTRIAL AND

(19i>2) PACKAGINfi OF FIRST PACKAGING OF TANK MOUNTED

TANK MOUNTED

ABOVE-DECK HOOF INSULATION (19S5) ABRASIVE GRAIN FOR GRINDING WHEELS (196S) ABRASIVE GRAIN ON COATED ABRASIVE PRODUCTS (19f.7) ABRASIVE PRODUCTS (19SS) ABRASIVE PRODUCTS (19f>7) ABS PLASTIC DRAIN. WASTE AND VENT PIPF AND FITTINGS

ABS PLASTIC PIPF (SDR PR AND CLASS T) (1963) ABS PLASTIC PIPF. IPS DIMENSIONS (1959) ACCESSORIES (19.1fl) ACCESSORIES (193fi) ACCESSORIES (19a?) ACCESSORIES (19f,n) ACCOUSTICAL MATERIALS (19(Sn) ACETATE BUTYRATE PIPE (19S7) ACETATE. AND NYI ON (iqSS) INFANTS, CHTl DRFNS. ACRYLONITRILE BUTADIENE STYRENE ABS PLASTIC DRAIN. ACRYLONITRILE BUTADIENE STYRFNE ABS PLASTIC PIPE (SDR ACTING SWING DOORS. FRAMES 'aND TRIM (1928) ADHESIVE PLASTER ( 1 9S?

)

ADHESIVES FOR INSTALLATION OF CLAY TILE (19FS?) ADHESIVES For THEIR APPI ICATION (1950) ADJUSTABLE DIE HEADS (1929) AFTER FABRICATION (1959) AGGREGATE PRODUCTION SCREENS (19U?) AGGREGATES. CRUSHED STONE. GRAVEL. AND SLAG (1908) AGRICULTURAL APPLICATION (1961) AGRICULTURAL INSECTICIDE AND FUNGICIDE PACKAGES

AID UNIT DRESSINGS AND TREATMENTS (19m)

AIR BRAKE (ELECTRIC RAILWAY) PARTS (1935) AIR COMPRESSORS (ONE-FOURTH TO 10 HORSEPOWER (19<*A) AIR COMPRESSORS (I95ft)

s BARS

use R257

use CS27t

use psa

use R89

use PS8

use CS27n

use eS25U

use cs2ia

use eS62

use CS63

use R190

use R3

use R262

use CS2n6

use CS19B

use cs?7n

use es?5<* use Ra2

use R85

use CS181

use CS168

use R51 use esif.1 use Rll*7 use R163

use CS23B

use RIH

use R17a

use R162

use R202

use C5126

Figure 7. A portion of the input which produced the result shown in the

previous figure. The programs SETLST and KWIND have facile provisions

for discarding header lines such as appear in the first two lines above.

See Figure 8 for the control cards and the substitution table which was used to achieve the transformation.

12
Figure 8.

ABCDEFGHIJKLMN0PQRSTUVWXYZ0123456789

101

102

103

104

105

106

107

108

120

2 53

7 8

54 107 108 116

I I I I t I t f

f I I t 1 I I I t I I T ? I t t I 1 ? I I I I I

FINISS

ABCDEFGHIJKLMN0PQRSTUVWXYZ0123456789 /

5 3 -^^

U. S. DEPT. OF COMMERCE STANDS

TITLE WORD INDEX %

/(SRD/ /( -^S^D^R/

/PVC/ ,/(->P-^V^C/

/(PE)/ /( -^P^E)/

/ PR)/ / -P-^R)/

/ PR / / -^P^R /

/ SDR/ / -^S-^D^R/

/ DWV/ / -^D-*W^V/

/ IPS/ / -^I^P-*S/

/ ABS / / ^A-*B^S

/ USA/ / ^U^S-^A/

/ AND / / AND -^/

/ OR / / OR ^/

/ FOR / / FOR ^/

/ TO / / TO ^/

/ OF / / OF ^/

/ WITH / / WITH ^/

/ 11/ / -1-1/

/ III/ / ->I-I-I/

/ IV/ / -I-V/

/ VI/ / -V-I/

/ VII/ / -V-I-I/

/ VIII/ / —V—I— I-

/ IX/ / -I-X/

/ XI/ / -X->I/

/ XII/ / -X-I-I/

/ XIII/ / —X—I— I—

/ XIV/ / —X—I—V/

/ xv/ / -x-v/

/ XVI/ / —X—V—1/

/ XVII/ / ->X—V—I—

1/

1/

1/

/ XVIII/

/ xix// • / XX/ /

I03A/

I03B/

I03C/

I03D/

I03E/

I03X/

I03Y/

I03Z/

I06A/

I06B/

I06C/

I06D/

I06E/

/ —X—V- —X—I—X/ —X—X/

/!I03—A/

/!I03—B/

/!I03—C/

/!I03—D/

1-1-1/

10 3—E/

103—X/

103—Y/

103—Z/

106—A/

106—B/

106—C/

106—D/

106—E/

/!I06X/

/!I06Y/

/1I06Z/

/!I06—X/

/!I06—Y/

/!I06—Z/

-A/

Continued

13
Figure 8 concluded

/'s / /'S

/=X/ /I

/=Y/ /

/=z/ /:

G2!T3-

G2 ! T3-

G2 ! T3-

/•S!/ /'S!/

/+/ /!G2!T3<

/=/ /!G2!T3^

FINIS

Tl^A/

Tl^B/

Tl^C/

Tl^D/

Tl-^X/

!T1^Y/

!T1^Z/

!T1-^A/

!T1^B/

Tl^C/

Tl^D/

T1-*E/

!G1!T1^X/

!G1 !T1-*Y/

!G1 !T1-*Z/

-U!G1!T1/

: !G1!T1/

!T3«-U!G1!

!T3^U!G1!

!T3^U!G1!

!T3^U!G1!

!T3^U!G1!

!T3^U!G1!

!T3*-U!G1!

!T3^U!G1!

!T3-^ !G1!

!T3^ !G1!

!T3-^ !G1!

!T3^ !G1 ! !T3^ !G1!

z/ /.-

Figure 8. Control cards and substitution table for

transforming the character stream in Figure 7 to that shown

in Figure 6, Note that four sets of alphabet cards are

needed to capitalize characters following: a space, a right

parenthesis, a hyphen, and the locator ! 103 inserted by the

program at the middle gutter. The other substitution cards

override these and achieve the desired exceptions. The

mistakes in capitalization of the words: "and", and "of",

immediately to the left of the middle gutter in Figure 6

result from the omission of two cards from the substitution

table. These are /AND!/ /AND!/ and /OF!/ /OF!/.

14
In many computerized data files, space limitations force the use of a shorthand

notation. These can be expanded by appropriate string substitutions. If the data are arranged in columns, the program allows for selective substitution rather than

universal substitution and rearrangement and omissions of columns of numbers, or other

alphanumeric characters.

A good example of the versatility of SKTLST is afforded by the transformations

shown in Figure 10 of an index produced earlier on a line printer in all caps for the

publication "CINUA 68 An Index to the Literature on Microscopic Neutron Data." This

index is published jointly by the Division of Technical Information Extension of the

U.S. Atomic bnergy Commission and the Organization for Economic Cooperation and

Development.

For this application it is necessary to take advantage of a feature of SHTLST

which enables one to divide the record into as many as 20 pieces of arbitrary length

and to insert any arbitrary flags between them. The first set of control cards shown

in Figure 12 causes the program to break the record into 12 pieces and to insert flags

!I01, etc., in the order indicated, in front of each of the pieces which are defined

on the third control card. It is this expanded record upon which the subroutine

SUBSTITUTE operates. It is the use of these locators in the substitution table which

allows for selective substitution.

It is interesting to note that while the locators were inserted primarily to retain the columnar arrangement when going from fixed width to variable width

characters, their presence in the text stream makes it possible to perform

sophisticated conditional substitutions, which would otherwise have required a much

more complicated and much less versatile program. A brief examination of the

substitution table shown in Figure 12 should reveal the flexibility which this feature

affords

5909025 NONLINEAR INDUCTOR MAGNETIC

5209061 MSAC PULSE POWER

6309189 COMPARISON OF HOT-ELECTRON AND RELATED

6623603 DEVELOPMENT ON COUPLING SCHEMES FOR PLASMA

6009174 BANDWIDTH IN WIDEBAND TRANSISTOR AND ESAKI DIODE

6209190 YSTEMS WITH APPLICATION TO COMMON-EMITTER TRANSISTOR

5109058 RISE TIME IN PULSE POWER

6309162 TECHNIQUE THE DESIGN OF WIDEBAND TRANSISTOR

6009171 TY OPTIMAL DESIGN OF MULTI-STAGE TUNED TRANSISTOR

5909268 BINARY QUANTIZATION OF SIGNAL

6723853 EXCURSIONS OF ORBITING SPACECRAFT USE OF

5309245 A SIMPLE DIGITAL TO

6009170 APPLICATION OF THE MAGNETORESISTANCE EFFECT TO

5909094 AN

6309011 DEVELOPMENT OF AN

6623441 CONTROL OF REMOTE MANIPULATORS. EXPERIMENTS USING

6623224 COMPUTER DISPLAYS INVESTIGATION OF AN

6724048 THE ANALYSIS AND CALIBRATION OF

6523547 GRAPHICAL PROCESSING USING HYBRID

6623541 TEN-BIT

5909152 STUDY OF SEMICONDUCTOR DEVICES BY

6209361 COMPUTING FACILITY MANAGEMENT SURVEY RESULTS AND

6423218 AUTOMATIC SYNTACTIC

6523471 FORMAT

6623841 MAU-MACHINE COMMUNICATION IN ONLINE MATHEMATICAL

6623255 MAP. A SYSTEM FOR ON-LINE MATHEMATICAL

6623257 PREDICATION-TYPING - A PILOT STUDY IN SEMANTIC

56091 16 2 ON PROGRESS IN MACHINE COMPUTATION AND NUMERICAL

6523430 AN ON-LINE SYSTEM FOR ALGEBRAIC COMPUTATION AND

6623488 N TECHNIQUES TO TEACH ELECTRICAL ENGINEERING NETWORK

6724048 ENCODERS THE

AMPLIFIER CIRCUITS. PART 1. THE SERIES CIRCUIT WITH A

AMPLIFIER. TECHNICAL MEMORANDUM

AMPLIFIERS

AMPLIFIERS EXPLORATORY

AMPLIFIERS THEORETICAL LIMITATIONS OF GAIN AND

AMPLIFIERS /RTION IN FREQUENCY-DEPENDENT TWOPORT S AMPLIFIERS ASSUMING IDEAL TRANSFORMERS

AMPLIFIERS BY AN EXTENSION OF THE SAMPLED-PARAMETER

AMPLIFIERS CONSIDERING GAIN, STABILITY. AND SENSITIVI AMPLITUDES. EFFECT FOR RADAR ANGULAR ACCURACY ANALOG COMPUTATION IN PREDICTING DYNAMIC TEMPERATURE ANALOG CONVERTER ANALOG MULTIPLICATION ANALOG MULTIPLIER USING THE FIELD-EFFECT TRANSISTOR ANALOG MULTIPLIER. BASED ON THE HALL EFFECT ANALOG SIMULATION MANUAL

ANALOG TECHNIQUE TO DECREASE PEN-TRACKING TIME IN ANALOG TO DIGITAL ENCODERS

ANALOG-DIGITAL CIRCUITRY ANALOGTO-DIGITAL CONVERTER ANALOGUE TECHNIQUES

ANALYSIS

ANALYSIS

ANALYSIS ANALYSIS

ANALYSIS

ANALYSIS ANALYSIS REPORT NO

ANALYSIS CALCULAID

ANALYSIS /ED LEARNING AND COMPUTER-BASED INSTRUCTIO ANALYSIS AND CALIBRATION OF ANALOG TO DIGITAL

5909025

5209061 6309189

6623603 6009174

6209190

5109058

6309162

6009171 5909268 6723853

5309245 6009170

5909094

6309011

6623441 6623224

6724048 6523547

6623541 5909152

6209361 6423218

6523471

6623841 6623255

6623257 5609116

6523430 6623488

6724048

Figure 9. Results from a test of the KWIND program set in Times Roman on a Linofilm at the U.S. Government Printing Office. Letter spacing would improve

the readability somewhat but not enough to justify the added expense of

phototypsetting. Figure 6 shows how much improvement is achieved by converting

to upper and lower case.

15
Z) 5

2 5

ro CM — 3

) -T CO cr h- eg — CM 9 "F. < < ^ ~ < Ol o O — CD r- CO m (T> < CO OJ r ^ 1^ CO C-nJ O CD CO - (D rw ID

ri CT> CT> 0> C7) CT» r-

-") (X> O^ O^ a> CT> CT^

1^

•- t~

C71 3 UJ Z $ roPC

OC O

UJ Z CD I LU z £ CO ^ O^ GO CO GO CO

O^ Ol O^ CT* CTl O^

CO

5; I- ccLU O

z

CO

CD

CD o

CO

X.

CO

CO

ro CO

r^ CD

CO 00

fOCO

CD

ro CM CM ro CO CM CM CD (D CO OC

) n n CO CO n CO m t^ UJ CO ry n *- CO •^CM CO c; CO ro CO CO CO CO CO CO -J CO CO to to CO CO ro CO CO CO CO CO CO CO ro Q •- CO Ns If) CO CO C/) to to < > > >- > X > > 2

GCo ?S^^O=.X X CO K t- 1- U. tCO56

J)6CO CO 6 6

CO

>-LL

CO6 C3 ^~- t- tCO6 h- 1- H trcv^io

/n

1

ui

NGES

FROM

SOTROPY

AS

IFT

EFF

RANC

ITONS

ISOTR

FROM

RECO

H2

CH4

NH3 X 5O

cc

Li. CO ^

UJ

Ooc So

CO>CO> > t li; CD X CD f,

UJ _, inco in^

_i < OC ;^ CC CO < CC Q- ^ CL 5 o: ui ,_ 5 ^

'-' ^>oSuz

SS^ii^iii^z

CO |_ u. 1- u. O

K CO lU 2 ^ CO Q [3 OD CO m r: u y oc oc oc oc * Z Z CO Z LU Z > Q. 5 Q. Q

S _,a:>oc^

(-) LU —' UJ ^

X

CO

CO>

LU < < <

5 2 2

oc DC3

LU

CO

oc3

X

CO

oc cc cc oc O

iccacccccQC^QCcncc 3000009000 X o U O <

I

OtJ IL. U. u "- u_ UJ

U- u. o

CM 1^ •1- —1 -J ^

1- —1 <

LU m moD _j °^ CO CC CD CD CD m CD I o CO CD CO m s X m OC LJ. LL u. CD u. ul U. LL U_ — LL U^ U. z Z H »- f- t- f~ )- Q Q Q K Q D a a a < a a a \ E

RA

)EL

1!

;esh PRC C

M SEE LULU < CM

ccLU < CO c^ fit

CO ^

LJ- LUu.LUU-UJ zg

in CO

u.LU

zo

too

LU

Z

LUZ

Z

UJz

Z

z

CO ^

H' UJ Z

Ulz

Z Z Z H 2

UJ liJ LU < UJ z z z z

Z Z

UJ UJ Z 2

3 > ^ < ^ o y y

> ^ UJ O ^ o '^ o o to UJ o o - < - 5^

to

(-z oijo COz

CO

t—z o o ccLU

CL 2

COz oo

<

<

<*-<

<< O < <<

< < < z <

H K H CM (- < < < z <

< <

t— l~ < < ^ UJ CC . . LU o _ _

zHx"'x<^>-'-

t:a'/'X«!5xi -'.jCCHQCOO'i

LU

U_

Ll_

[X ^

LU CT>

UJ ^

UJOo

UJOu

UJ

—J

m

Q. •- 5

LU2Oo

LU LU

-J —J

t +

_J _l LU LU m CD

Q. CL 5 5

toQ

>

(r<

CD

CD

LU5Oo

_; Z

LU <

CD OC

Q. LU 52

D Q Q

o g o

to CO to

-t- + f 1- H 1- < < <

^DOQQQ -QQQ

^ OOC30C32^?^^

-ICOCOCOCOCOZCOCOCO =;i-H(-h-i-i-t-t-H

u < < uj < a: <

5 (« CD OD CD O W

< ^< >- < 1- < < Q 1— < o< < < < < < < < < < < < <

CO c^ yo

4io oo ^^ u o < o

o

O 0. CD oD CD o m CO CD CD CD CD ffl CD CD

D 0< O < IT 5

J U -J O -1 u o

3

g

Ct CD (- CD m (f) -i z. (n z u. to CD _, CO CO CO to CO {fi in ff) in in to CO O < < < < cc |_ ^ 1- (-

_J O Q- S Q. t/D S

< __ OC < < < - < < < < < < < < < o o —1 5 < _J < —i < < _l < o -J —1 _/ < -1 _) _i -J —I —1 —1 _J _J

3) T- O) a> Ol CM »-

<T in -^ -T ^ in -^ 11 in LU CM r— ^ en CO UJ

cD

11 1 f^ P- CO cD O CO O '- o o

cT) en ^ in TT Tj- in LU

1- CD in to to

1^CD CD CD CDr^ r^ r^ r- r^ CD CD CD CD CD CO CO

i;^ ^ (£) r* <u r^ r^ h- ^

Zo

h-<(—Z

LLI

2--

zo

< ^

zo

2^ ^ O^ i O CD O Z CD

Zo

< ''T CO CO CO CO $ CO CO CO CO CO CO CO CO CO

n •- »- <*5 — O CO OO to CM CO CO o

UJ >

^ ^ ^ CO •>- _j CM ^

<

z

LU

LU<

Q.

>oCO

CTi <1-z

LU

UJ -,

Q- en

>

CJ>

(71 -*: CM O CM C^

CM CD CO in GO Csl o

<

z

LU

iuO

<

Q.—

(

>oCO

CD

•^

>

CD ^ CD -- n -^ c\j ^

D CM in lO in r^ o -- CO r^ r^ r^ CO CD oCD

CD

CO 5 >^to

5o o

>

tr

C/5 5

z>o

Occcr > CO CO

C7) CO (D r- CD CO CD O CO CM CO CO

r- CD m CO in tn CM

CO 2(J >

CCCO

ID

CO

00

in

CD

CDCO

inCD

CD

CO

in

CD

CD

CO 12

CD

CD

CO

in in u^ in in

CT> O^ O^ Ol CD

CD CD CD CD CD

fO CO CO CO CO

ix) in

en CD

CD (D

CO CO X a: cc oc ir cc cc X Q. 0- Q- a Q- QCE GC O

Q

u- O <

LU LU 4 o

Q

u_UJ $ o u. <

-

UJ < s CC CC CC OC CC CC CC g

U-LU OC < < < <<<<<<<< 1 Q. a tr < z cc z oc z z Q. Q. Q_ Q. Q- Q. Q. CC z 0- _J —I —1 Z -I -1 _J _l _l _I _I

CD ^ CD CM 7

CO

to >O

DCUJz

X to r-- 5 CO ->* >d

OCUJz

X<

5 CM >

ocLUz

5-

5 X

CO

CD

en

CD

>-c

ocLUz

X

<

2 in

r- in <j- in in

r-. (^ r^ r^ r- in in in in in

r^ (O in CD ^ CD

^ r- „o

r- r- „tr ^ T -^ X

r) ^ o ^ ^ K

1

UJ Z CD IT) 5 C3 o

O) —

o o.

•- <u Q- oc

LU z

5

ino

UJ z ^

5 ^

CDO in in D O

LU z

5

into

ocX

CO

1 co ro in CO CD

CM

CO ,„ CD CD CO

1 CO 1 CM r^

CO CO

1 1 ^ CM CM Z CM H CM T- TT «- CO CO ^ ^

T 3 ^ :3 ^ (« 3 5 o o o o§ o

3 3 a. c c T T a 3 D 3 D Q 3 Q Q Q. CL Q Q Q. Q. a Q. Q. Q. Q 1 o o-5 UJ UJ

0) cc UJQJ cc CC ° °^^^^ O-3 UJ

Q->

CC o->

QJ C cc

QJ GCQJ <D CC CE

QJ trQj QJ QJ QJ QJ CC DC CC X CC CC X

_ o - o o d 0) Q. CD Q. C^ 0) o O

cy a

> Q- "to a> CO a.> ~rb "(i *- « o o o o

Q. Q. 0) 0) a> OJ O

"tr Q "fO "ra ro ro ro ro ro ro ro ro rt "to ro

JJ 1- LU 1- LU tU (- ^H

i- X >

UJ UJ

\- LU1- >

UJ >

UJ X X ^ x; X ^UJ UJ H t- 1- H

^Hh- UJ X

Ul >UJ >

UJ >UJ > >UJ UJ >

UJ > > > > >

UJ UJ UJ UJ UJ > >

UJ UJ

S ^ ^ CC3 ^ " ,, ,. —

J

Q; ai U CJ ,„

S

CT] >

0) (J > O f o O (J tJ ^ C

o

c o

QJ o

c

tj

QJ CO

•JO up t; uJ J

rt K op tl j- ^ 1- ^ To w To To 1- ^ o C/) i2 ^ rt o

S< X . > (1 TM '^ t/^ (J-. Z X i? z m z n: 03

(J o — — j5 z ti Q "to X u

_ro ct Q) — ro X u

Total Total

Elastic Elastic

DiM

El

Diff

El

TtirmI c

<o ^6

<

o

LU6

<o

UJ UJ 5 5

— — ^ ^ Ul UJ UJ

Q. Q. tn y)

. . nj fTj :^ :^ :r S SuJ UJ O Q Q

<o

UJ 5 — I/) D <

>

UJ o

UJ

Ul Ql •^ c

t: O

c

o S S SStu

"ro To o

TM

1- UJ

h- (— 1- 1- z z Z z

LU LU LU <u QJ Qj OJ tU (U Q) Qj OJ LU X X X X X X X X I 5 Q Q 5 l- 5 X X X X X I X X X 5

UJ J -J ^ Zi 3 Jj Zi _l 3 li li li 3 _) -J LU LU

1 _l 1 UJ UJ LU LU

*4-» OJ • • W X ex QJ u

J-. OJ o u 4-» dJ c +J 3 OJ

4-> O t>0 o t/» -H •k cc OJ •H IW rt >H X E

rt 4-> OJ 6 X X Vh rt o c M O CiC ^ 4-> ^ • O

OJ (^ ctf 4) R3 ^

»H o -p 3 ax

t/) CJ CTJ "^3 T3 +J 0) C 4-* O CT} (/) (/} «J 3 z ta 3

a u

•>-M OJ O 0) W 3 'TJ S rH

•M O T^ Cfl X

a •H S QJ a

•H OJ u X *-> J-iX GO M

u <•-> T3 c

«rt OJ C U o X tS c c« O •H 3 OJ o M-i P

«fl u 1—

1

3

3 c O CO +J

•^ la cti X ^ •H

trt ox £ QJ 4-1 •M ^ p >^*-' W

P. a tf) +J X

•H CJ QJ 3

Jh +J u 4-* 1-1 w

u c« o C

wx e O ^ ^3

(h +J S QJ C

o M-l OJ QJ c« p. a> 0»H »H 3 a ttj cj: (/)

(/) rt o tS

+j (0 0) M-l f-i 00 3X o CO c 4J •M o

•H c: w

c •H OJ M-l c l-l

• H »-i >H O o o

«J a•H •H >» +J 3 +J 4-> •M c CO crM-i 3 c

o o QJ J o

u s »H .-H • H u

o P

o M OJ a> W QJ

i-H *+H rH X X X

X X 4-» 3 4-> rt H cfl tf) +J CO 4-> o u

J p o <H QJ M-4 w t/i PX CO •H 3 4-> r-1 X cx rH

• >sH O X w O QJ

l-« ctJ W U

ta S r-t 3

<u • a M

o u o Vi •H

^1 3 u Q> U^ 3 'd 3X o

(30 O MS -> QJ •H ^1 • H 3 o Q>

ti, CXM-i C 2 CO

16
Among the more interesting tra nsformations performed by the control cards shown in

Figure 12 are the following:

a. The flag !I02 in front of

original line) caused the numb

flush-right in front of, instead o substitution table served to delet

b. The columns flagged !I03

the word GAMMA appeared elsewhere

however, GAMMA is replaced by

produce the Greek letter F . Othe

PROTON to (n,p) and N, ALPtlA to (n

c. If a relatively few 1 extending across the boundaries de

table can be used to reattach

another location. The following

EN1I06GY/ /! 113 > h > N > i:>R>G>Y/

heading ENERGY is shifted to a new

d. The inclusion in the subst

removes from the original record

!I15.

e. While ordinarily the user need not concern himself with the fine points of how

the program operates, there is one feature which is important to emphasize.

That program deletes trailing blanks in the defined fields when inserting the

locators. For that reason the instruction to delete the a from field !I08 in Figures

11 and 15 is written as:

the isotopic number (the second v ers following it to be set as superio

f behind, the element symbol. Two c e the leading zeros in front of the iso

required quite special treatment. For

it would have been simply set with all

a character stream which brings in grid

r items in the substitute table tr

, V), etc.

ines of the file or relatively few wo

fined on the third control card, the

the pieces in the two columns and even

is an example of such a manipul

where the lost characters ER are reins

location,

itution table of /!I02 A/ // and /!I0

s the heading S A and inserts the new

alue in the

r figures and

ards in the

topic number.

example, had

caps. Here,

two so as to ans formed N,

rds have text

substitution

move them to ation: /!I05

erted and the

1 S/ /I15/

line locator

/!I08N!I09/ /!I09/ instead of /!I08N / //

l) f-\ TMF I: T rj

L, A r„ T T T >

/M , G A ^' h A

T T f L X '? F. r T Tf^TAl. XSFCT

TOTAI xsPrr

K L ^ 5 T I C

r L

'"^ S T T C ('IFF rL<\?T!r

T' I F F f_ L A t. T T f ThKMLSCATl. A" TH'JMLSCaTL Ai

^J

, (j A M ^ A

=; A ' do nn;>l TOTAL XSFCT

fM F F ELASTIC

Ql!AMT I T V

niFF FLASTIf

U A M T I T Y

T YPF

r V P T _ J 1 1 K

F X P T - J 1 1 K THFf'- jniih

e. X P 1 - J L' K THF''-JO()k

rxpi -jouK

FXPT-APST

T H E r - J r u F THEO-jnUW

T h, F - J n u K

T>PC

f X p T - P R (3 FVAL-f-'EPT

TYPE

FVAL-RFPT

TYPE

^OCll^tE^TA T I or: lAe

FF VOL PAGE DATE

P 6115? 2/u

7** 7b

8?

75

76

75

67

60

&<i 82

3 6 4

1 71^0 60

1819

38

mi •J 2 2:<i IB

I B 60

rOCDMEK'TATt

rff vol page

AFCU-212R q.-}

I\IA A-SP- 1 I 9fiO I V

00rUME^'TATI

RFF VOL PAGE

MAA-SR-1 IqeOIV

OOCDMEmTATI!

Rff vol page

8/^B

D/ti9

b^H9

7 /H9

6/'J9

7/5?|

7/4 1 7/'t 1 M/5 1

DATI 5/52

H/f-7

DATE

H/h7

Ate

UI

COR

COL

CpK

LAS

COR

LAS

CKC

6AU

G»iU COP

LAP

M J T AI

L Art

A I

LAB

K A N L E Y < , E e

J W E S . F K E i M E L K- N I A f J ,) 5 A L f E T E K . I H AitSCHALL'

« E T H E . S - .' cAR5CHALL<)

CR0SS.9 0T(

SACHS<TLLl

SACH5<TtLl

salpeter.e\

OCT. 1 , 1961

'4 £ S L I < P ,

I CAMPBELL*

OCT. 1 , 1 9 6\

CAMPBELL*

OCT , 1 , 196|

Figure 11. A sample page from the CINDA publication produced on a line printer Ihe magnetic tape which produced this listing was used as input to SETLST The control cards which produced the transformation shown in Figure 10 are shown in Figures 12 and 13. The vertical lines indicate where the program inserted the

cnK^l"''^ * : l^^'. ®^?-' ^" accord with the instructions on the third and subsequent control cards shown in the next figure. See the next figures for an explanation of the circumscribed items.

17
AdCDEFGHlJKL(^«NOPQKSTUVWXYZ0123456789

12 120 17 8

1-1 f 2-4 » 5-7 » i 0-21 » 24-32 » 35-39 » 42-46 » 49-63 » 64-67 » 69-7

1

, 72-109

•114

!I01

!I02

•103

.•104

.•105

.•106

•107

!106

.•109

.•110

!111

toJhll92

1 EDITION 99 LI ONES $

FINISS

ABCDE:F6KIJKLMNOPQRSTU\/WXYZ0123456789 /

><XI ^

AJI03EVALL;AT10N/ /.'r03>EVALUATION/ ^

/

/

/

/

/

/

/

»110-1

I03TOTAL XSECT/ /!I03>TOTAL >X->SECT/ /

I03RES0N PARAMS/ /.'I03>RESON >PARAMS/ ( I03ELASTIC/ /.•103>ELASTIC/ V

I03DIFF ELASTIC/ /.•I03>DIFF >ELASTIC/

I03N PRODUCTION/ /.•I03ivt >PRODUCTION/ I I03NONELASTIC/ /.• I03>nONELASTIC/ -^ I03NONEL GAMMAS/ /!I03>NONEL .•G2.'T3D!G1 .'Ti'S/

/!I03TOT INELASTIC/ /.•I03>T0T >INELASTIC/

/!I03DIFF INELAST/ /•I03>UIFF >INELAST/

/.•I03INELST GAMMA/ /!I03>INELST .•G2!T3D!G1 .'Tl/

/.'I03N2N REACTION/ /.•I03(N»2N) >REACTI0N/

/.'I03THRML5CATLAW/ /» I03>THRML>SCAT>LAW/

/.'I03ABSORPT1ON/ / ! I03>AdSORPTION/

/.•I03DISAPPERANC/ /T I03>ulSAPPERANCE/

/JI03N»GAMMA/ /!I03(N» !G2!T3D.'G1 ITl ) /

/II03SPECT NGAMMA/ /.'I03>SPECT (N» .•62!T3D!G1 ITl)/

/II03N»PROTON/ /!I03{N» P)/

/!I03N»DEUTERON/ /.•103{|>ir D)/

/!103N»ALPHA/ /.•l03(Nr !b2!T3A.'Gl !T1)/

Figure 12, The control cards and a portion of the substitution

table used to produce the output shown in Figure 10. The items

marked by a circle show, respectively, how the character stream

is modified to: a. provide initial caps; b. produce Greek

letters; c, provide contractions and insert parentheses, etc.

See Figure 13 for the rest of the substitution table.

18
/

/

/

/

/

/

/

/

/

/

/

/

/

/

107 DOCUMENTATIO/ /.'I07 >D>0>C>U>M>£>N>T>A>T>I>0>N/

lOBNIIOS/ /!I09/ ^<^^^(a) /

105 EN!I06GY/ /! I13>c>N>E>R>G>Y/ <J4^J^/^

I01ElE.'I02WEN/ /!I12>t>L>E>M>E>N>T/ ^^- —

lOlBE/ /!I01>BE/

XOILI/ /!I01>LI/

lOlHE/ /.'I01>HE/

10200/ /.'IU2/

1020/ /!I02/

102 A/ //

101 S/ /!I15/

imi/ /!IA^/

Il<+0/ /.'lib /

1/ /!!/

/-»--/ /!G2.'T3>) .'Gi.'Tl/

/ / /f30/

/ / /!2'+/

/ / /!i8/

/ / /.'12/

/C/ /(/

/V /)/

/*/ / /

/+/ /.'G2.'T3>>l!GliTl/

/=/ /.'G2iT3> J .'Gi.'Tl/

/A/ />A/

©

/W/ />W/

/x/ />x/

/Y/ />Y/

/^/ />Z/

/ -/ /.'06.'G2!T31!G1.'T1/

/ -/ /Il'+.'G2!T3irGl.'Tl/

/ -/ /!20!G2.'T3i.'Gl

/ -/ /!2b!G2!T3i!Gl

/ -/ /!32!G2.'T3i!Gl

FiNIS

Figure 13. A continuation of the control cards used for the

CINDA publication. The tagged items show how the character

stream was modified to: a. restore the letters ER in ENERGY

which might otherwise have been lost; b. remove the leading zeros

in the isotopic number; c. replace the characters S A by a new

line signal; d. ensure that the letter I in the locator remains

lower case; e. go to another grid for mathematical symbols; f.

generate initial caps everywhere except as indicated in the

longer substitution strings; g. compensate by inserting spaces

for different width values of a minus sign and a decimal point;

h. replace successive blanks by appropriate width spaces.

19
Oi>iNlTA,ir uSlfJo OKlllO jUmKuii I luL zoy'* E A AMPLE 13

BtlT/t-Hn 1 (11) LuU[-jT htlA-HAF (rz) CuUnT

l.U()l;^ni / <i.H92 .99999949 6.29id

.S^yTho^^y.^ i^.obH .1UUUl)U13 b.BHo

• yy'^.^^f.tii J.l ^3 .uCi999997bb b.bl3

1 .UDUl /bb J.7b6 • UOiUUlJUOlH b.7'+b

.^S^ySo:^!^ •^ .HU4 . UnUU99999bbb b.H73

1 .OUOUlJU'* 0.39H . UOUU1|JOOUOU4 b.39«

MV I-KaOL - ^.yb^ AVt- KAGh - b.9bH

Oi.iNITAh» UblNi, UhlhU iUtiKui 1 1 I lit. HUH EXA.'iPLE 14

ULlA-HAl (in i-UUi>il ntlA-HAT (Y2) COUNT

1 .UObHcjS? <i.lh9 .99999990 7.UUU

.9s)90£;j4'4. O.fllO .U999997UU b.b23

.S»9S>7Tbh6 3.hl2 .ulUUU()i2b 4.9U3

.99940^48 H.blfi) .U(JU9999H<>UU 4.7i+b

1 . OuUOiUU a.OuU .U0U1UUU01U9 4.9b3

.y94MyVt5H b.<+9b .O0U0U9999977H 5.6b4

MV i-KuGt - H.137 AVi- kAGL = b.f+bH

UKlHUf WI (,i Kl-uK I nObuNALi/MT low oMiTlEb HUH EXAMPLE lb

HLTa-Ha| (TiJ >-OUivjT HEfA-HAF (ri?) COU.gT

-1^:16. -ji+i^h -j.Ohb . 981+194.03 l.ftUl 27b2.ubb7 -0.^39 .13b^39ia .t+bJ -10b7.u9^1 -J».Oi;b -.u03'+br,U7()7 -.129

14+6.97^30 -^.lb4 . L)0£:b'+9b9H3 -.2b7

-7. JUrtOti^b -.919 -.uOuUo492bb'+87 -.021

1 . lob^uoV .779 .uOUUl<du9'+996 .679

MVhKAtjt - -i.97h AVi-: HaGL = .419

Figure 14. A sample of a formatted output which can be typeset easily using

SETLST and a monowidth typeface. See Figure 5 for the typeset version of

this table.

6. Acknowledgements

The authors wish to express their appreciation for the valuable advice and

guidance provided by Mr. Rubin Wagner, Chief of the Computer-Assisted Printing

Section of the NBS Office of Technical Information and Publications. His willingness

to share his expertise - based on long experience in traditional and modern methods

of typesetting and composition - has contributed significantly to our progress in

programming for computer-assisted printing in general, and to the preparation of this

report in particular. Valuable assistance was rendered by Mrs. Daris Jones in the

typing of the manuscript and in the preparation of the camera-ready copy from which

this report was produced.

7. References

[1] William R. Bozman, Phototypesetting of Computer Output National Bureau of

Standards Technical Note 170 (June 25, 1962) available from the

Superintendent of Documents, U.S. Government Printing Office, Washington,

D.C. 20402.

[2]

[3]

Carla G. Messina and Joseph Hilsenrath, Edpac: Utility Programs for

Computer-Assisted Editing, Copy-Production, and Data Retrieval, NBS Technical

Note 470 (January 1969) available from the Superintendent of Documents, U.S.

Government Printing Office, Washington, D.C. 20402.

Michael P. Barnett, Computer Typesetting/Experiments and Prospects,

Press, Cambridge, Massachusetts 1965.

The MIT

20
APPENDIX I

The program listings given here were written in such a fashion as to permit their easy implementation on various

computers and compilers of different vintage. If a compiler

permits use of labeled common blocks, the operating

efficiency of tliese programs can, possibly, be increased by

certain indicated changes. The markings to the right of the

listings indicate which lines of the program must be

replaced by the corresponding marked lines in APPENDIX II to

take advantage of labeled common. The < means insert and

the period and brace denote lines to be replaced.

21 367-112 O - 70 - 2 "^
c

cc

c

c

c

c

c

cc

c

c

c

c

c

c

c

cc

cc

c

c

c

cc

c

c

c

ccc

cc

c

c

c

c

c

c

cc

c

c

c

cc

c

c

cc

c

c

cc

c

c

c

PROGRAM DEVELOPED AT

SETLST

NBS-NSRDS WASH D.C. BY C. MESSINA 1/68

THE PROGRAM SETLST WILL GENERATE SUITABLE OUTPUT RECORDS FOR

TYPESETTING FROM FIXED FIELD RECORDS.

ALL INPUT RECORDS MUST HAVE THE SAME FORMAT EXCEPT FOR THOSE

RECORDS WHICH ARE DELETED FROM THE FILE BY THE SUBROUTINE (AMATCH)

TYPESETTING GRID CHANGES AND OTHER STRING SUBSTITUTIONS ARE

INSERTED BY THE SUBROUTINE ( SUBST )

.

THIS PROGRAM REMOVES THE TRAILING BLANKS FROM EVERY FIELD TO

BE TYPESET AND WRITES OUT PACKED RECORDS OF VARIABLE LENGTH

CONTROL CARDS

THE FIRST CARD IS SIMILAR TO THE FIRST CARD OF THE SUBROUTINE

(SUBST). THE 47TH CARD COLUMN CONTAINS A BLANK AND THE 50TH CARD

COLUMN CONTAINS THE END OF RECORD SYMBOL. THE END OF RECORD

SYMBOL MUST NOT APPEAR IN THE RECORDS TO BE PROCESSED FROM

UNIT IRTAPE.

THE

ICOL

ITEST

LENGTH

KEEP

FORMAT

.

TO BE PROCESSED.

SECOND CARD HAS SIX SWITCHES IN (615) - CONTAINS THE NUMBER OF CARD FIELDS

- IS -1 FOR PRINTING.

FOR PRINTING AND TAPE WRITING ON UNIT IPTAPE.

1 FOR TAPE WRITING ON UNIT IPTAPE.

- IS THE NUMBER OF CHARACTERS IN AN INPUT RECORD READ

FROM UNIT IRTAPE.

- IS ZERO WHEN ALL FIELDS ARE TO BE PRESENT IN THE OUTPUT

REGARDLESS OF CONTENT.

IRTAPE

IPTAPE

IS NON ZERO WHEN ANY

TO BE IGNORED IN THE

ALSO OMITTED. )

.

IS THE UNIT ON WHICH

IS THE UNIT ON WHICH

THE PRINTER)

.

FIELD WHICH

OUTPUT (THE

IS COMPLETELY BLANK

INSERT STRING IS

IS

THE INPUT RECORDS ARE EXPECTED.

TO WRITE THE OUTPUT RECORDS (NOT

THE THIRD

WISHED IN THE

ARE SEPARATED

CARD CONTAINS

OUTPUT. THE

BY ONE OR AS

THE FIELD DELIMITERS IN THE ORDER

FORMAT IS FREE FIELD AND THE DELIMITERS

MANY SPACES AS DESIRED.

IN THE FOLLOWING EXAMPLE OF 3 COLUMN FIELDS

73 80 1 70 73 80

THE INFORMATION LOCATED STARTING AT THE 73RD CHARACTER AND

EXTENDING TO INCLUDE THE 80TH CHARACTER IS TYPESET, FOLLOWED

BY THE INFORMATION CONTAINED IN CHARACTER FIELDS 1 TO 70 AND

ENDING WITH THE INFORMATION IN FIELDS 73 TO 80. REPEATING FIELD

DESIGNATIONS ON THE THIRD CONTROL CARD, DUPLICATES THE INFORMATION

IN THE OUTPUT RECORD.

THE FOLLOWING ICOL NUMBER OF CARDS CONTAIN THE TYPESETTING

INSERT STRINGS. IN THE OUTPUT RECORDS, THESE INSERT STRINGS

ARE PLACED BEFORE THE INFORMATION TAKEN FROM THE INPUT RECORDS.

THESE STRINGS ARE PUNCHED STARTING IN CARD COLUMN ONE AND ARE

CONSIDERED TERMINATED BY A BLANK CHARACTER. IF NO STRING IS

TO BE INSERTED, A BLANK CARD IS PLACED IN THE INSERT STRING TABLE

AT THE APPROPRIATE POSITION.

AFTER THE INSERT STRING

CONTAINS THE IPTAPE HEADER.

IMMEDIATELY BY THE HEADER.

TABLE, A CARD IN I THE LENGTH OF THE

1I2,78A1)

HEADER IS

FORMAT

FOLLOWED

TYST

TYST

TYST

TYST

TYST

TYST

.TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

TYST

123

4

56

7

8

9

10

11

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

570

571

572

22
10

20

25

30

40

50

60

70

80

90

100

105

110

120

121

122

THE CONTROL CARDS FOR

SUBROUTINE (AMATCH) ARE PLACED FOLLOWED BY THE CONTROL CARDS FOR

SUBROUTINE (SUBST)

DIMENSION IA(84) , ID (136) , INS (400) , N(40 ) , NA (40 ) , NB( 100 ) ,IC(700;

liB(4iUU)

ITAPE=5

I0TAPE=6

READ (ITAPE,9) ( IA( I ) , 1=1 , 80

)

WRITE ( lOTAPE , 19 )( lA ( I ) , 1=1 , 80

)

READ (ITAPE,89) ICOL, ITEST , LENGTH , KEEP , IRTAPE , IPTAPE

lOTAPE , 99 ) ICOL , ITEST , LENGTH , KEEP , IRTAPE , IPTAPE

1

ID(I) ,I=1,80;

WRITE

IF (ICOL) 2,2

IF (ICOL-20) 3,3,2

WRITE (I0TAPE,129)

GO TO 9999

READ (ITAPE,9)

L=2*IC0L

DO 8 1=1.

N(I)=0

NB ( I

) =0

NA(I)=0

K=0

DO 100 1=1,

K=K+1

IF (ID(K)-IA(47

IF (K-80) 10,25,25

WRITE (I0TAPE,49) L,

GO TO 9999

DO 40 J=27,36

IF (ID(KA- A(J) ) 40,50,40

CONTINUE

GO TO 10

N ( I

) =J-27

K=K+1

DO 60 J=27,36

IF (ID(K)-IA(J) ) 60,70,60

CONTINUE

GO TO 100

N(I)=10*N(I)+J-27

K=K+1

DO 80 J=27,36

IF (ID(K)-IA(J) ) 80,90,80

CONTINUE

GO TO 100

N(I)=10*N(I)+J-27

CONTINUE

J=0

DO 120 1=1,

IF (N(I)) 110,105,110

J=J+1

IF (N(I)-132) 120,120,122

CONTINUE

IF (J-L) 125,9999,9999

1=3

N ( I

) =LENGTH

WRITE (I0TAPE,39) I,N(I)

30,20,30

ID(J) ,J=1,801

TYST 573

TYST 58

TYST 59

TYST 60

TYST 62

TYST 63

TYST 64/

TYST 65

TYST 66

TYST 67

TYST 68

TYST 69

TYST 70

TYST 71

TYST 72

TYST 73

TYST 74

TYST 75

TYST 76

TYST 77

TYST 78

TYST 79

TYST 80

TYST 81

TYST 82

TYST 83

TYST 84

TYST 85

TYST 86

TYST 87

TYST 88

TYST 89

TYST 90

TYST 91

TYST 92

TYST 93

TYST 94

TYST 95

TYST 96

TYST 97

TYST 98

TYST 99

TYSTIOO

TYSTlOl

TYST102

TYST103

TYST104

TYST105

TYST106

TYST107

TYST108

TYST109

TYSTllO

TYSTlll

TYST112

TYST113

TYST114

TYST115

23
125

130

140

145

150

160

170

180

190

191

201

192

193

194

195

196

197

198

200

210

GO TO 9999

J=l

K=L-1

DO 145 1=1. K,

2

IF (N(I)-N(I+1)

)

WRITE (I0TAPE,59;

GO TO 9999

WRITE (I0TAPE,29;

J=J+1

WRITE

N3=l

DO 190 1=1

READ ( WRITE

J=l

IF (ID

I0TAPE,69;

ICOL

ITAPE,9)

I0TAPE,19

140,140,130

N(I) ,N(I+1) ,1

J,N(I) ,N(I+1

ICOL

(ID(K) ,K=1,80)

) (ID(K) ,K=1,80;

160,180.160

220

230

;j)-IA(47;

,

INS(N3)=ID(J)

N3=N3+1

J=J+1

IF (N3-400) 150,150.170

WRITE (I0TAPE,79)

GO TO 9999

NA(I)=J-1

CONTINUE

K=l

NB(1)=1

DO 191 1=2, L,

2

NB(I)=NA(K)+NB(I-1)-1

NB(I+1)=NA(K)+NB(I-1)

K=K+1

K1=0

READ (ITAPE,139) Kl , ( IB( J ) , J=l , 78)

WRITE (I0TAPE,149) Kl , ( IB ( I ) , 1=1 ,78)

IF (Kl) 9999,201,201

CALL AMATCH ( lA . ID . LENGTH , , MATCH

)

CALL SUBST(IC,K,0)

IF (LENGTH) 121,121,192

IF (LENGTH-133) 193,193,121

IF (IPTAPE) 194,195,196

WRITE (I0TAPE,119) IRTAPE , IPTAPE

GO TO 9999

IPTAPE=3

IF (IRTAPE) 194,197,198

IRTAPE=5

K=0

READ (IRTAPE, 9, END=900,ERR=900) ( ID ( I ), 1=1 , LENGTH)

CALL AMATCH (lA , ID , LENGTH , 1 , MATCH

)

IF (MATCH) 210,210,200

DO 300 L=1,IC0L

L1=2*L-1

L2=2*L

N1=N(L1)

N2=N(L2)

IF (Nl) 300,300,220

IF (NA(L) ) 250,250,230

N3=NB(L1)

N4=NB ( L2

)

DO 240 I=N3,N4

TYST116

TYST117

TYST118

TYST119

TYST120

TYST121

TYST122

TYST123

TYST124

TYST125

TYST126

TYST127

TYST128

TYST129

TYST130

TYST131

TYST132

TYST133

TYST134

TYST135

TYST136

TYST137

TYST138

TYST139

TYST140

TYST141

TYST142

TYST143

TYST144

TYST145

TYST1451

TYST1452

TYST1453

TYST1454

TYST146

TYST147

TYST148

TYST149

TYST150

TYST151

TYST152

TYST153

TYST154

TYST155

TYST156

TYST158 ] TYST159

J TYST160

TYST161

TYST162

TYST163

TYSTi64

TYST165

TYST166

TYST167

TYST168

TYST169

TYST170

}'-

24
240

250

260

262

264

268

270

280

300

800

805

807

900

9999

9

19

29

39

49

59

69

79

89

99

119

129

139

149

K=K+1

IC(K)=INS(I)

J=N2

DO 260 I=N1,N2

IF (ID(J)-IA(47) ) 270,260,270

J=J-1

IF (KEEP) 262,268,262

IF (NA(L) ) 300,300,264

K=K- ( N4-N3+1

)

GO TO 300

J=J+1

DO 280 I=N1,

K=K+1

IC(K)=ID(I)

CONTINUE

K2=KH-1

CALL SUBST(IC,K,1)

K1=K1+K

J=0

DO 805 I=K2,K1

J=J+1

IB(I)=IC(J)

K=0

CALL NPRINT ( Kl , ITEST , IB , lA ( 47 ), lOTAPE , IPTAPE ,

; GO TO 200

Kl=Kl+4

IB(K1-3)=IA(47)

IB(K1-2)=IA(50)

IB(K1-1)=IA(47)

IB(K1)=IA(50)

CALL NPRINT ( Kl , ITEST , IB , IA(47) , lOTAPE , IPTAPE , 1

STOP

ITOP.

FORMAT

1 FIELD NUMBER

2. ) FORMAT

IGS. /)

FORMAT

lOP.

FORMAT

FORMAT

FORMAT

FORMAT

10 FIELDS. STOP.

FORMAT (1I2,78A1)

FORMAT (1X,1I2,78A1

END

TYST171

TYST172

TYST173

TYST174

TYST175

TYST176

TYST177

TYST178

TYST179

TYST180

TYST181

TYST182

TYST183

TYST184

TYST185

TYST186

TYST187

TYST188

TYST189

TYST190

TYST191

TYST192

TYST193

TYST194

TYST205

TYST206

TYST207

TYST208

TYST209

TYST210

TYST211

TYST226

TYST227

TYST228

TYST229

THTYST230

TYST231

STYST232

TYST233

FORMAT (132A1)

FORMAT (1X,120A1)

FORMAT ( 7H FIELD ,112, IIH GOES FROM ,1I3,4H TO ,113)

FORMAT (57H ONLY LINES WITH 132 OR LESS CHARACTERS ARE ALLOWED,

IE ,1I6,7H FIELD ,/llH SPECIFIED ,1I6,18H CHARACTERS. STOP.

FORMAT (1X,1I4,53H NUMBERS WERE NOT GIVEN ON THE FOLLOWING CARD

/80A1)

20H THE PAIR OF NUMBERS ,116, 5H AND ,116, 25H SPECIFYINGTYST234

116, /42H ARE NOT GIVEN IN THE CORRECT ORDER. ST0PTYST235

TYST236

15H THE FOLLOWING ,1I4,34H CARDS CONTAIN THE INSERT STRINTYST237

TYST238

60H0THE INSERT STRINGS TAKE UP MORE THAN 400 CHARACTERS . STTYST239

) TYST240

1015) TYST241

IX, 1015) TYST242

47H ILLEGAL UNIT SPECIFIED ON SECOND CONTROL CARD. 216) TYST245

70H0CURRENT DIMENSION STATEMENTS ALLOW FOR A MAXIMUM OF 2TYST246

) TYST247

TYST248

TYST249

TYST250

25
10

20

25

30

40

50

60

70

80

90

100

105

107

110

120

125

40.50,40

KWIND, TYPESETTING FOR KWIC INDEXES

DIMENSIONIA ( 84 ) , IC ( 700 ) , ID ( 136 ) . INS ( 80 )

, N ( 8 )

. NA ( 8 )

. NB ( 20

;

ITAPE=5

I0TAPE=6

READ (ITAPE,9) ( lA ( I ) , 1=1 , 80

)

WRITE (I0TAPE.19) ( lA ( I ) . 1=1 , 80

)

READ (ITAPE,89) ITEST , LENGTH , IRTAPE , IPTAPE

WRITE (I0TAPE,99) ITEST , LENGTH , IRTAPE , IPTAPE

READ (ITAPE,9) ( ID ( I ) , 1=1 , 80

)

DO 5 1=1,8

N ( I

) =0

NB(I)=0

NA ( I

) =0

K=0

DO 100 1=1,8

K=K+1

IF (ID(K)-IA(47) ) 30,20,30

IF (K-80) 10,25,25

WRITE (I0TAPE,49) ( ID ( J ) , J=l , 80

)

GO TO 9999

DO 40 J=27,36

IF (ID(K)-IA(J:

CONTINUE

GO TO 10

N(I)=J-27

K=K+1

DO 60 J=27,36

IF (ID(K)-IA(j;

CONTINUE

GO TO 100

N(I)=10*N(I)+J-27

K=K+1

DO 80 J=27,36

IF (ID(K)-IA(J) ) 80,90,80

CONTINUE

GO TO 100

N(I)=10*N(I)+J-27

CONTINUE

J=0

DO 120 1=1,8

IF (N(I) ) 110,105.107

J=J+1

IF (N(I)-136) 120,120,110

WRITE (I0TAPE,39) I,N(I)

GO TO 9999

CONTINUE

IF (J-8) 125,9999,9999

J=l

DO 145 1=1,7,2

60,70,60

IF (N(I)-N(I+1) ) 140,140,130

130 WRITE (I0TAPE,59) N( I ) . N( I+l ) ,

I

GO TO 9999

140 WRITE ( lOTAPE ,29) J,N(I),N(I

145 J=J+1

WRITE (I0TAPE,69)

N3=l

DO 190 1=1,8

KWIC0090 • IB(4100)KWIC0100

KWICOllO

KWIC0120

KWIC0130

KWIC0140

KWIC0150

KWIC0160

KWIC0170

KWIC0180

KWIC0190

KWIC0198

KWIC0200

KWIC0210

KWIC0220

KWIC0230

KWIC0240

KWIC0250

KWIC0260

KWIC0270

KWIC0280

KWIC0290

KWIC0300

KWIC0310

KWIC0320

KWIC0330

KWIC0340

KWIC0350

KWIC0360

KWIC0370

KWIC0380

KWIC0390

KWIC0400

KWIC0410

KWIC0420

KWIC0430

KWIC0440

KWIC0450

KWIC0460

KWIC0470

KWIC0480

KWIC0490

KWIC0500

KWIC0510

KWIC0520

KWIC0530

KWIC0540

KWIC0550

KWIC0560

KWIC0570

KWIC0580

KWIC0590

KWIC0600

KWIC0610

KWIC0620

KWIC0630

KWIC0640

26
150

160

170

180

190

READ ( ITAPE,9)

WRITE (I0TAPE,19

J-1

IF (ID(J)-IA(47)

INS(N3)=ID(J)

N3=N3+1

J=J+1

IF (N3-80) 150,150,170

WRITE (I0TAPE,79)

GO TO 9999

NA(I)=J-1

CONTINUE

K=l

NB(1)=1

DO 195 1=2,16,2

ID(K) ,K=1,80)

(ID(K) ,K=1.80

160,180,160

KWIC0650

KWIC0660

KWIC0670

KWIC0680

KWIC0690

KWIC0700

KWIC0710

KWIC0720

KWIC0730

KWIC0740

KWIC0750

KWIC0760

KWIC0770

KWIC0780

KWIC0790

NB(I)=NA(K)+NB(I-1)-1

NB(I+1)=NA(K)+NB(I-1)

195 K=K+1

READ (ITAPE,139) Kl , ( IB ( J ) , J=l , 78

)

WRITE (I0TAPE,149) Kl , ( IB (I ) , 1=1 , 78

)

CALL AMATCH ( lA , ID , LENGTH , , MATCH

)

CALL SUBST(ID,1,0)

IT = N(6)

K=0

200 READ (IRTAPE,9,END=900,ERR=900) ( ID ( I

201 N1=N(1)

N2=N ( 2

)

CALL AMATCH ( lA , ID , LENGTH , 1 , MATCH

)

IF (MATCH) 205,205,200

1=1, length;

205 IF (N(l)) 270.270,210

210 IF (NA(1) ) 240,240,220

220 N3=NB ( 1

)

N4=NB ( 2 DO 230 I=N3,N4

K=K+1

230 IC(K)=INS(I)

240 DO 250 I=N1,N2

K=K+1

250 IC(K)=ID(I)

270 IF (N(3) ) 500.500,280

280 N1=N(3)+1

N2=N ( 4

)

J=N1-1

DO 300 I=N1,N2

IF ( ID ( I-l ) -lA ( 47 )

) 300 , 290 , 300

290 IF (ID(I)-IA(47) ) 300,350,300

300 CONTINUE

IF (NA(4) ) 330,330,310

310 N3=NB ( 7

)

N4=NB ( 8

)

DO 320 I=N3,N4

K=K+1

320 IC(K)=INS(I)

330 N1=N(3)

DO 340 I=N1,N2

K=K+1

340 IC(K)=ID(I)

GO TO 500

27

KWIC0800

KWIC0810

KWIC0820

KWIC0830

KWIC0832

KWIC0834

KWIC0840

KWIC0850

KWIC0860

KWIC0870

KWIC0880

KWIC0890

KWIC0900

KWIC0910

KWIC0920

KWIC0930

KWIC0940

KWIC0950

KWIC0960

KWIC0970

KWIC0980

KWIC0990

KWICIOOO

KWIClOlO

KWIC1020

KWIC1030

KWIC1040

KWIC1050

KWIC1060

KWIC1070

KWIC1080

KWIC1090

KWICllOO

KWIClllO

KWIC1120

KWIC1130

KWIC1140

KWIC1150

KWIC1160

KWIC1170

KWIC1180
350

360

370

380

390

400

410

IF (I-Nl) 410,410,360

IF (NA(2) ) 390,390,370

N3=NB(3)

N4=NB ( 4

)

DO 380 J=N3,N4

K=K+1

IC(K)=INS(J)

J = I-2

N1=N(3)

DO 400 I=N1,J

K=K+1

IC(K)=ID(I)

J=J + 1 DO 430 I=J,N2

IF (ID(I)-IA(47) ) 440,430,440

KWIC1190

KWIC1200

KWIC1220

KWIC1230

KWIC1240

KWIC1250

KWIC1260

KWIC1270

KWIC1280

KWIC1290

KWIC1300

KWIC1310

KWIC1320

KWIC1330

KWIC1340

430

440

450

460

470

480

500

510

470,470,450

520

530

540

550

560

570

590

600

610

620

630

640

CONTINUE

GO TO 500

IF (NA(3)

:

N3=NB(5)

N4=NB ( 6

)

DO 460 J=N3,N4

K=K+1

IC(K)=INS(J)

DO 480 J=I,N2

K=K+1

IC(K)=ID(J)

IF (N(5) ) 720,720,510

N1=N(5)+1

N2=N(6)

J=N1-1

DO 530 I=N1,N2

560,560,540

IF (ID(I-1)-IA(47:

IF (ID(I)-IA(47)

)

CONTINUE

IF (NA(7

N3=NB(13)

N4=NB(14)

DO 550 I=N3,N4

K=K+1

IC(K)=INS(I)

N1=N(5)

DO 570 I=N1,N2

K=K+1

IC(K)=ID(I)

GO TO 720

IF(I-Nl) 650,650,600

IF (NA(5) ) 630,630,610

N3=NB ( 9

)

N4=NB(10)

DO 620 J=N3,N4

K=K+1

IC(K)=INS(J)

J=I-2

N1=N(5)

DO 640 I=N1,J

K=K+1

IC(K)=ID(I)

) 530,520,530

530,590,530

KWIC1350

KWIC1360

KWIC1370

KWIC1380

KWIC1390

KWIC1400

KWIC1410

KWIC1420

KWIC1430

KWIC1440

KWIC1450

KWIC1460

KWIC1470

KWIC1480

KWIC1490

KWIC1500

KWIC1510

KWIC1520

KWIC1530

KWIC1540

KWIC1550

KWIC1560

KWIC1570

KWIC1580

KWIC1590

KWIC1600

KWIC1610

KWIC1620

KWIC1630

KWIC1640

KWIC1650

KWIC1660

KWIC1670

KWIC1680

KWIC1690

KWIC1700

KWIC1710

KWIC1730

KWIC1740

KWIC1750

KWIC1760

KWIC1770

28
650

660

670

680

690

700

710

720

730

J=J+1

DO 660 I=J,N2

IF (ID(I)-IA(47) ) 670,660,670

CONTINUE

GO TO 720

IF (NA(6) ) 700,700,680

N3=NB(11)

N4=NB(I2)

DO 690 J=N3.N4

K=K+1

IC(K)=INS(J)

DO 710 J=I,N2

K=K+1

IC(K)=ID(J)

IF (N(7) ) 800,800,730

N1=N(7)

KWIC1780

KWIC1790

KWIC1800

KWIC1810

KWIC1820

KWIC1830

KWIC1840

KWIC1850

KWIC1860

KWIC1870

KWIC1880

KWIC1890

KWIC1900

KWIC1910

KWIC1920

KWIC1930

740

760

770

780

800

805

807

850

900

C lA

770,770,740

, N4

N2

N2=N(8)

IF (NA(8

N3=NB(15)

N4=NB(16)

DO 760 I=N3

K=K+1

IC(K)=INS(I

DO 780 I=N1

K=K+1

IC(K)=ID(I)

K2=K1+1

CALL SUBST(IC,K,1)

K1=K1+K

J=0

DO 805 I=K2,K1

J=J+1

IB(I)=IC(J)

K=0

CALL NPRINT ( Kl , ITEST , IB , lA { 47 ) , lOTAPE , IPTAPE , GO TO 200

Kl=Kl+4

50) CONTAINS THE END OF RECORD SYMBOL , lA (47

)

IB(K1-3)=IA(47)

IB(K1-2)=IA(50)

IB(K1-1)=IA(47)

IB{K1)=IA(50)

CALL NPRINT (Kl

49

59

69

79

89

99

KWIC1940

KWIC1950

KWIC1960

KWIC1970

KWIC1980

KWIC1990

KWIC2000

KWIC2010

KWIC2020

KWIC2030

KWIC2031

KWIC2032

KWIC2033

KWIC2034

KWIC2035

KWIC2036

KWIC2037

KWIC2038

KWIC2050

KWIC2060

KWIC2070

KWIC2080

KWIC2090

KWIC2100

KWIC2180

KWIC2190

KWIC2200

KWIC2350

(136A1) KWIC2360

(1X,131A1) KWIC2370

( 7H FIELD ,112. IIH GOES FROM ,1I3,4H TO ,113) KWIC2380

(57H ONLY LINES WITH 136 OR LESS CHARACTERS ARE ALLOWED. THKWIC2390

IE ,1I6,7H FIELD ,/llH SPECIFIED ,1I6,18H CHARACTERS. STOP. ) KWIC2400

FORMAT (58H EIGHT NUMBERS WERE NOT GIVEN ON THE FOLLOWING CARD. ST0KWIC2410

IP. /1X,131A1) KWIC2420

FORMAT (20H THE PAIR OF NUMBERS ,116, 5H AND ,116, 25H SPECIFYINGKWIC2430

NUMBER ,116, /42H ARE NOT GIVEN IN THE CORRECT ORDER. ST0PKWIC2440

KWIC2450

(50H THE FOLLOWING 8 CARDS CONTAIN THE INSERT STRINGS

(60H THE INSERT STRINGS TAKE UP MORE THAN 80 CHARACTERS.

CONTAINS A BLANK.

ITEST , IB , lA ( 47 ) , lOTAPE , IPTAPE ,

9999 STOP

9 FORMAT

19 FORMAT

29 FORMAT

39 FORMAT

1 FIELD

2. ) FORMAT

FORMAT

lOP.

FORMAT

FORMAT

1015)

IX, 1015: 29

/)KWIC2460

STKWIC2470

KWIC2480

KWIC2490

KWIC2500
109 FORMAT ( 61H0THE LAST LINE WRITTEN BEFORE A TAPE ERROR OR END OF FKWIC2510

IILE IS /1X,131A1 /7 H STOP. ) KWIC2520

139 FORMAT (1I2,78A1)

149 FORMAT ( IX , 112 . 78A1

)

END KWIC2530

SUBROUTINE SUBST ( IB , IW , ITYPE

)

SUBS 1 C SUBS 2 C SUBSTITUTE SUBROUTINE SUBS 3

C SUBS 4

C TEXTUAL SUBSTITUTION PROGRAM WRITTEN BY C. MESSINA NSRDS-NBS SUBS 40

C IB (999) IS THE STRING TO BE PROCESSED. ON RETURN FROM SUBST. IB SUBS 41

C CONTAINS THE REMADE LINE. SUBS 42

C IW IS THE LENGTH OF THE INPUT STRING IN IB. ON RETURN FROM SUBST , SUBS 43

C IW CONTAINS THE NEW LENGTH OF IB. SUBS 44

C ITYPE = WHEN THE SUBSTITUTION TABLE IS READ IN AND ITYPE = 1 SUBS 5

C WHEN THE SUBSTITUTION IS TO TAKE PLACE. SUBS 6

C SUBS 7

C THE INPUT DECK AT OBJECT TIME IS THE FOLLOWING SET OF CARDS SUBS 8

C THE FIRST CARD IS A DICTIONARY OF THE ALPHABET STARTING WITH THE SUBS 9

C LETTER A IN CARD COL ONE, A LETTER B IN COL 2 AND SO FORTH. THE SUBS 10

C NUMBERS FOLLOW THE ALPHABET STARTING WITH ZERO. COL 38 CONTAINS SUBS 11

C THE PRINT OUT STRING DELIMITER. COL 47 CONTAINS A BLANK. SUBS 12

C THE SECOND CARD HAS A ZERO IN COL 2 IF NO CARDS ARE TO BE PUNCHED SUBS 13

C 1 IF THE PUNCH TAPE IS TO BE WRITTEN. THE NEXT 212 FIELDS ON THIS SUBS 14

C CARD. IF POSITIVE NON ZERO INTEGERS, CONTAIN THE IRTAPE NUMBER SUBS 15

C AND IPTAPE NUMBER, OTHERWISE THEY ARE SET TO IRTAPE=5 AND IPTAPE=3SUBS 16

C THE THIRD AND FOURTH CARDS ARE BOTH IN Al , 13 , 2A1 , 12 FORMATS. SUBS 18

C THE FIRST TWO FIELDS ARE IGNORED ON BOTH CARDS IN THIS VERSION. SUBS 19

C THE 3RD FIELD IS THE SHIFT TO UPPER CASE SYMBOL, THE 4TH IS SHIFT SUBS 21

C TO LOWER CASE SYMBOL, AND THE FIFTH IS THE SHIFT AND LOCK SWITCH SUBS 22

C THAT IS IF THE MODE IS NOT SHIFT AND LOCK AND 1 IF IT IS. SUBS 23

C CARDS FIVE ET SEQ CONTAIN THE LIST OF STRINGS TO BE EXCHANGED. SUBS 24

C ON EACH CARD THE OLD RECORD OR STRING APPEARS ON THE LEFT SIDE ANDSUBS 25

C THE NEW STRING ON THE RIGHT. THE CHARACTER WHICH APPEARS IN CARD SUBS 26

C COLUMN 1 IS THE STRING DELIMITER WHICH REMAINS IN FORCE FOR THAT SUBS 27

C CARD. IT MAY, HOWEVER, CHANGE FROM CARD TO CARD. SUBS 28

C THE FORMAT IS PRESCRIBED. A CHARACTER IN COL 1 DEFINES THE STARTSUBS 29

C OF A STRING. THE SAME CHARACTER MUST APPEAR AFTER THE END SUBS 30

C OF THE STRING. THE THIRD APPEARANCE OF THE COLUMN 1 CHARACTER ON SUBS 31

C THE CARD STARTS THE 2ND STRING AND THE FOURTH APPEARANCE ENDS IT. SUBS 32

C EXAMPLE SUBS 33

C /REAL/ /TRUE/ SUBS 34

C AFTER THE SUBSTITUTION LIST MUST COME A CARD WITH THE WORD FINIS SUBS 36

C STARTING IN CARD COLUMN ONE. SUBS 37

C SUBS 38

DIMENSION lA ( 86 ) , N { 1000 ) . IC ( 8000 ) , IB ( 999

)

SUBS 39

ITAPE=5 SUBS 40

I0TAPE=6 SUBS 41

IEND=0 SUBS 42

MAXIW=998 SUBS 43

IF (ITYPE) 20,20,560 SUBS 44

20 READ (ITAPE,840) ( lA ( J ) , J=l , 80

)

SUBS 45

WRITE (I0TAPE,890) ( IA( J ) , J=l , 80

)

SUBS 46

READ (ITAPE,850) ITEST , IRTAPE , IPTAPE SUBS 47

IF (IRTAPE) 30,30,60 SUBS 48

30 IRTAPE=5 SUBS 49

60 IF (IPTAPE) 70,70,100 SUBS 53

70 IPTAPE=3 SUBS 54

100 WRITE (I0TAPE,930) ITEST , IRTAPE , IPTAPE SUBS 58

50
150

C160

170

180

190

200

210

220

230

240

250

260

270

280

290

300

310

320

330

340

350

360

370

380

390

READ (ITAPE,860) lA (81 ) , IWIDEl , lA (83) , lA (85 ) , LOCKl

WRITE ( lOTAPE , 920 ) lA ( 81 ) , IWIDEl , lA ( 83 ) , lA ( 85 ) , LOCKl

READ (ITAPE.860) IA(82) , IWIDE2 , lA (84) . IA(86) , L0CK2

WRITE (I0TAPE,920) IA(82) . IWIDE2 , lA (84) , IA(86) , L0CK2

N1=0

N3=l

START OF READING IN SUBSTITUTE LISTS

READ (ITAPE,840) ( IB ( J ) , J=l , 80

)

N2=0

N22=0

IF (IB(i;

IF (IB(2;

IF (IB(31

-IA(6);

-IA(9)1

-IA(14)

IF

IF

:iBIB :4)-IA(9);

:5)-iA(i9:

210,170,210

210,180,210

) 210,190,210

210,200,210

I 210,440,210

DO 230 1=2,78

IF

IF

I)-IB(i: 230,220,230

160,160,240

270,280,270

290,300,290

(IBI

1N21 N2=I-1

J=N2+3

IF (J-79) 260,250,250

WRITE (I0TAPE,900) IBI GO TO 830

K=J+1

DO 270 I=J,79

IF (IB(I)-IB(i;

K=I+2

GO TO 250

DO 290 I=K,80

IF (IB(I)-IB(i;

N22=I-K+1

GO TO 250

Nl=Nl+2

N(N1-1)=N2

N(N1)=N22

N4=N3+N2-1

IF (N4-7920) 320,320,310

WRITE (I0TAPE,880) N4,N1

GO TO 830

IF (Nl-1000) 330,330,310

J=2

DO 340 I=N3,N4

IC(I)=IB(J)

J=J+1

N3=N3+N2

IF (N22) 370,370,350

N4=N3+N22-1

J=K

DO 360 I=N3,N4

IC(I)=IB(J)

J=J+1

IF (N2-38) 380,380,390

K=42

K1=K+N22-1

J=N2+3

DO 400 L=J,80

IB(I) ,i=i.8o;

SUBS 59

SUBS 60

SUBS 61

SUBS 62

SUBS 69

SUBS 70

SUBS 71

SUBS 72

SUBS 73

SUBS 74

SUBS 75

SUBS 76

SUBS 77

SUBS 78

SUBS 79

SUBS 80

SUBS 81

SUBS 82

SUBS 83

SUBS 84

SUBS 85

SUBS 86

SUBS 87

SUBS 88

SUBS 89

SUBS 90

SUBS 91

SUBS 92

SUBS 93

SUBS 94

SUBS 95

SUBS 96

SUBS 97

SUBS 98

SUBS 99

SUBSIOO

SUBSlOl

SUBS102

SUBS103

SUBS104

SUBS105

SUBS106

SUBS107

SUBS108

SUBS109

SUBSllO

SUBSlll

SUBS112

SUBS113

SUBS114

SUBS115

SUBS116

SUBS117

SUBS118

SUBS119

SUBS120

31
400 IB(L)=IA(47)

IB(1)=IA(38)

IB(N2+2)=IA(38)

IB(K-1)=IA(38)

IB(K1+1)=IA(38)

IF (N22) 430,430,410

410 DO 420 I=N3.N4

IB(K)=IC(I)

420 K=K+1

N3=N3+N22

430 WRITE (I0TAPE,890) (I

GO TO 160

440 IF (Nl-4) 550,450,450

450 N7=Nl+2

460 N3=l

IB(J) ,J=1,80)

SUBS121

SUBS122

SUBS123

SUBS124

SUBS125

SUBS126

SUBS127

SUBS128

SUBS129

SUBS130

SUBS131

SUBS132

SUBS133

SUBS134

SUBS135

K1=0

N7=N7-2

IF (N7-4) 470,480,480

470 N7=N7+2

480 DO 540 1=4, N7,

2

N2=N(I-3)+N(I-2)

N22=N(I-1)+N(I)

IF (N(I-3)-N(I-l) ) 500,490,490

490 N3=N3+N2

GO TO 540

500 N4=N(I-3)

N(I-3)=N(I-1)

N(I-1)=N4

N4=N ( I

)

N(I)=N(I-2)

N(I-2)=N4

K1=K1+1

N4=N3+N2-1

K=0

DO 510 J=N3,N4

K=K+1

510 IB(K)=IC(J)

DO 520 J=1,N22

K=N3+J-1

N6=N4+J

520 IC(K)=IC(N6)

N3=N3+N22

DO 530 J=1,N2

K=N3+J-1

530 IC(K)=IB(J)

540 CONTINUE

IF (Kl) 550,550,460

550 WRITE (I0TAPE,890) lA ( 6 ) , IA(9 ) , IA( 14) . lA (9 )

. lA ( 19)

GO TO 820

C START OF SUBSTITUTION

560 IF (IW-MAXIW) 580,580.570

570 WRITE (I0TAPE,940) IW ,MAXIW , ( IB ( I ) , 1=1 , IW

)

GO TO 830

580 CALL CHECKI ( lA , IB , ITEST , lOTAPE , IPTAPE , lEND , 1

)

IF (lEND) 830,590,830

590 N3=l

IB(IW+1)=IA(47)

IF (LOCKl) 600,610,600

32

SUBS136

SUBS137

SUBS138

SUBS139

SUBS140

SUBS141

SUBS142

SUBS143

SUBS144

SUBS145

SUBS146

SUBS147

SUBS148

SUBS149

SUBS150

SUBS151

SUBS152

SUBS153

SUBS154

SUBS155

SUBS156

SUBS157

SUBS158

SUBS159

SUBS160

SUBS161

SUBS162

SUBS163

SUBS164

SUBS165

SUBS166

SUBS167

SUBS168

SUBS169

SUBS170

SUBS171

SUBS172

SUBS173

SUBS174

SUBS175

SUBS176

' SUBS177

SUBS178
600 CALL SUNLK (lA.IB.IW.IOTAPE)

610 K2=l

ILK=0

620 N6=0

N7=0

DO 650 K=K2,IW

N3=l

DO 640 1-2, Nl, 

IF (IC ( N3 ) -IB ( K ) ) 640 , 625 . 640

625 N2=N(I-1)

N22=N(I)

IF (IW-K-N2+1) 640,631,631

631 Kl = K N4=N3+N2-1

DO 630 J=N3,N4

IF (IB(Kl)-IC(J) ) 640,630,640

630 K1=K1+1

K1=K1-1

N7=I

N6=N3

GO TO 660

640 N3=N3+N(I-1)+N(I)

650 CONTINUE

GO TO 800

660 IF (Kl-IW) 680,680,670

670 IW=K1

ILK=1

IF (IW-MAXIW) 680,680,790

680 K1=K

N2=N(N7-1)

N22=N(N7)

N3=N6+N2

N4=N3+N22-1

N5=N22-N2

IF (N5) 760,690,730

690 DO 700 J=N3,N4

IB(K1)=IC(J)

700 K1=K1+1

710 IB(IW+1)=IA(47)

IF (ILK) 720,720,800

720 K2=K1

IF (K2 - IW) 620,620,800

730 IF (IW+N5-MAXIW) 740,740,790

740 IW=IW+N5

K2=IW

DO 750 J=K1,IW

K9=K2-N5

IB(K2)=IB(K9)

750 K2=K2-1

GO TO 690

760 DO 770 J=K1,IW

K9=J-N5

770 IB(J)=IB(K9)

K9=IW+N5+1

DO 780 J=K9,IW

780 IB(J)=IA(47)

IW=IW+N5

IF (N22) 710,710,690

SB- -112 - 70 - 3 53

SUBS179 • SUBS180

SUBS181

SUBS182

SUBS183

SUBS184

SUBS185

SUBS186

SUBS1861

SUBS187

SUBS188

SUBS1885

SUBS189

SUBS190

SUBS191

SUBS192

SUBS193

SUBS194

SUBS195

SUBS196

SUBS197

SUBS198

SUBS199

SUBS200

SUBS201

SUBS202

SUBS203

SUBS204

SUBS205

SUBS206

SUBS207

SUBS208

SUBS209

SUBS210

SUBS211

SUBS212

SUBS213

SUBS214

SUBS2141

SUBS215

SUBS216

SUBS217

SUBS218

SUBS219

SUBS220

SUBS221

SUBS222

SUBS223

SUBS224

SUBS225

SUBS226

SUBS227

SUBS228

SUBS229

SUBS230

SUBS231

SUBS232

SUBS233
790

800

810

820

830

840

850

860

880

890

900

910

920

930

940

WRITE (I0TAPE,910) MAXIW

IF (L0CK2) 810,820,810

CALL SULOCK ( lA , IB , IW , lOTAPE

)

RETURN

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

170

180

190

STOP

FORMAT

FORMAT

FORMAT

FORMAT

SUBS234

SUBS235

SUBS236

SUBS237

SUBS238

(132A1) SUBS240

(4012) SUBS241

(lAl ,1I3,2A1,1I2) SUBS242

(33H LIST OF REPLACEMENTS IS TOO L0NG/67H MAXIMUM CHARACTERSUBS245

1 LENGTH IS 8000, MAXIMUM NUMBER OF PHRASES IS 400/20H CURRENT VALUSUBS246

2ES ARE ,2I6,6H STOP.) SUBS247

FORMAT (1X,131A1) SUBS248

FORMAT (16H THE CHARACTER ,1A1,48H DID NOT APPEAR 4 TIMES ON THE SUBS249

ICARD BELOW. STOP . /IX , 80A1

)

SUBS250

FORMAT (40H0THE LINE FOLLOWING WOULD HAVE EXCEEDED ,1I6,43H CHARACSUBS251

ITERS IS SUBSTITUTION HAD CONTINUED. ) SUBS252

FORMAT (1X,1A1,1I3,2A1,1I2)

FORMAT (IX, 5012)

FORMAT (19H STRING OF LENGTH =,1I6,43H

ISUBST. LENGTH =,1I6,6H STOP . / , IX , 120A1

;

END

SUBROUTINE SUNLK ( lA , IB , IW , lOTAPE

)

DIMENSION lA ( 86 ) , IB ( 999

)

MAXIW=998

L=0

J=0

K=0

DO 60 1=1, IW

IF (IB(I)-IA(83) ) 40,20,40

L=L+1

IF (L-J-1) 30,60,30

K=l

GO TO 60

IF (IB(I)-IA(85) ) 60,50,60

J=J+1

IF (L-J) 30,60,30

CONTINUE

IF (L-J) 80,70,90

IF (K) 80,120,80

WRITE (I0TAPE,280)

GO TO 150

IF (IA(83)-IA(85)

)

K=2*(L/2)-L

IF (K) 110,120,110

IW=IW+1

IB(IW)=IA(85)

J=l

IF (IB(J)-IA(83)

)

80,100,80

140,160,140

J=J+1

IF (J-(IW+1)) 130,150,150

RETURN

IF (IB(J+1)-IA(85) ) 190,170,190

J=J+2

DO 180 I=J,IW

IB(I-1)=IB(I)

GO TO 220

IF (IB(J+2)-IA(85) ) 230,200,230

SUBS253

SUBS254

TOO LONG FOR SUBROUTINE SUBS255

SUBS256

SUBS257-

SSUK 10

SSUK 20

SSUK 30

SSUK 40

SSUK 50

SSUK 60

SSUK 70

SSUK 80

SSUK 90

SSUK 100

SSUK 110

SSUK 120

SSUK 130

SSUK 140

SSUK 150

SSUK 160

SSUK 170

SSUK 180

SSUK 190

SSUK 200

SSUK 210

SSUK 220

SSUK 230

SSUK 240

SSUK 250

SSUK 260

SSUK 270

SSUK 280

SSUK 290

SSUK 300

SSUK 310

SSUK 320

SSUK 330

SSUK 340

SSUK 350

SSUK 360

34
200 J=J+3

DO 210 I=J,IW

210 IB(I-1)=IB(I)

220 IW=IW-1

IB(IW+1)=IA(47)

J=J-1

GO TO 130

230 IF ( (IW+1)-MAXIW) 250,250,240

240 WRITE (I0TAPE.270)

GO TO 150

250 IW=IW+1

J=J+3

K=IW

DO 260 L=J,IW

IB(K)=IB(K-1)

260 K=K-1

SSUK 370

SSUK 380

SSUK 390

SSUK 400

SSUK 410

SSUK 420

SSUK 430

SSUK 440

SSUK 450

SSUK 460

SSUK 470

SSUK 480

SSUK 490

SSUK 500

SSUK 510

SSUK 520

J=J-1 SSUK 530

IB(J)=IA(83) SSUK 540

GO TO 160 SSUK 550

270 FORMAT (116H0THE WORK ON THE FOLLOWING LINE WAS HALTED JUST BEFORESSUK 560

1 THE MAXIMUM CHARACTER LINE LIMIT WAS EXCEEDED IN SUNLK ) SSUK 570

280 FORMAT ( 69H0THE FOLLOWING LINE DID NOT CONTAIN A BALANCED SET OF SSSUK 580

IHIFT SYMBOLS. ) SSUK 590

END SSUK 600

SUBROUTINE SULOCK ( lA , IB , IW , lOTAPE

DIMENSION lA ( 86 ), IB ( 999

)

MAXIW=998

J=l

20 IF (IB(J)-IA(84) ) 30,60,30

30 J=J+1

IF (J-(IW+1)) 20,20,50

40 WRITE (I0TAPE,140)

50 RETURN

60 J=J+2

70 IF (IB(J)-IA(84) ) 110,80,110

80 IW=IW-1

DO 90 K=J,IW

90 IB(K)=IB(K+1)

IB(IW+1)=IA(47)

J=J+1

IF (J-IW) 70,70,100

100 IW=IW+1

IB(IW)=IA(86)

GO TO 50

110 IF (IW-MAXIW) 120,100,40

120 IW=IW+1

J=J+1

K=IW

IB(IW+1)=IA(47)

IB(IW+2)=IA(47)

IB(IW+3)=IA(47)

DO 130 L=J,IW

IB(K)=IB(K-1)

130 K=K-1

IB(J-1)=IA(86)

GO TO 20

140 FORMAT (116H0THE WORK ON THE FOLLOWING LINE WAS HALTED JUST

1 THE MAXIMUM CHARACTER LINE LIMIT WAS EXCEEDED IN SULOCK

END

35

SSLK 10 • S SSLK 20

SSLK 30

SSLK 40

SSLK 50

SSLK 60

SSLK 70

SSLK 80

SSLK 90

SSLK 100

SSLK 110

SSLK 120

SSLK 130

SSLK 140

SSLK 150

SSLK 160

SSLK 170

SSLK 180

SSLK 190

SSLK 200

SSLK 210

SSLK 220

SSLK 230

SSLK 240

SSLK 245

SSLK 246

SSLK 247

SSLK 250

SSLK 260

SSLK 270

SSLK 280

SSLK 290

BEFORESSLK 300

) SSLK 310

SSLK 320
20

SUBROUTINE CHECKI ( lA , IB . ITEST . lOTAPE . IPTAPE , K , J

;

DIMENSION IA(86) ,IB(999)

IF (K-1) 20,40,20

L=J-1

DO 30 1=1,26

L=L+1

IF (lA(I)-IB(L) ) 70,30.70

1=1, 80

;

30 CONTINUE

IF (K-2) 40,90,90

40 K=l

WRITE (lOTAPE.lOO) ( lA

IF (ITEST) 50,80,50

50 WRITE (IPTAPE. 110) ( lA

IF (IPTAPE-6) 80,80.60

60 END FILE IPTAPE

GO TO 80

70 K=0

80 RETURN

90 K=l

GO TO 80

100 FORMAT (1X.80A1)

110 FORMAT (80A1)

END

I) .1=1.80)

SSCK 10

SSCK 20

SSCK 30

SSCK 40

SSCK 50

SSCK 60

SSCK 70

SSCK 80

SSCK 90

SSCK 100

SSCK 110

SSCK 120

SSCK 130

SSCK 140

SSCK 150

SSCK 160

SSCK 170

SSCK 180

SSCK 190

SSCK 200

SSCK 210

SSCK 220

SSCK 230

36
SUBROUTINE AMATCH ( lA , ID , LENGTH , ITYPE , MATCH)

C

C IC() IS 1000 CHARACTERS LONG AND 40 MATCH STRINGS ARE ALLOWED.

AMAT 010 • t

AMAT 020

10

ID() CONTAINS THE STRING WHICH IS TO BE COMPARED WITH THE DICTIONARY

STRINGS.

LENGTH IS E LENGTH OF ID(). WHEN LENGTH IS

STRING, THERE IS NO MATCH.

IA() CONTAINS THE DICTIONARY OF SPECIAL

AMAT 030

AMAT 040

SMALLER THAN A DICTIONARYAMAT 050

AMAT 060

CHARACTERS NEEDED. AMAT 070

20

30

40

50

60

70

80

90

IA(47) IS A BLANK AND THE ALPHABET OCCURS BETWEEN lA ( 1 ) AND IA(26) AMAT

ITYPE IS THE ENTRY POINT, ZERO FOR READING IN THE MATCH STRINGS, ONE AMAT

FOR THE PROCESS OF MATCHING THE STRING ID() WITH THE DICTIONARYAMAT

MATCH IS ZERO IF A MATCH IS NOT FOUND, OTHERWISE MATCH CONTAINS THE AMAT

NUMBER OF THE MATCHED STRING. AMAT

lEND IS THE CHARACTER USED TO INDICATE THE END OF AN INPUT STRING. AMAT

IGN IS THE CHARACTER INDICATING A FIELD ON THE MATCH STRING IN WHICH AMAT

THE PRESENCE OF ANY CHARACTER IS ALLOWED. AMAT

INPUT FORMAT AMAT

THE FIRST CARD CONTAINS THE lEND AND IGN CHARACTERS IN THAT ORDER . AMAT

THE FIRST NONBLANK CHARACTER IS ASSUMED TO BE lEND AND THE SECOND AMAT

NONBLANK CHARACTERS TO BE IGN. IF NEITHER CHARACTERS ARE TO BE USED, AMAT

A BLANK CARD MUST BE INSERTED. AMAT

THE FOLLOWING CARDS CONTAIN A MATCH STRING PER CARD WITH EACH AMAT

STRING STARTING IN CARD COLUMN ONE. IF THE STRING IS NOT TO BE AMAT

TREATED AS BEING 80 CHARACTERS LONG, IT MUST BE TERMINATED BY AN lEND AMAT

CHARACTER. ANY CARD FIELD POSITIONS HAVING AN IGN CHARACTER WILL BE AMAT

CONSIDERED TO MATCH AUTOMATICALLY. AMAT

THE LAST CARD HAS STARTING IN CARD COLUMNS 1 TO 6 THE WORD FINIS AMAT

WITH THE lEND CHARACTER APPEARING IN CARD COLUMN 7 IF AN lEND WAS AMAT

SPECIFIED ON THE FIRST INPUT CARD. AMAT

DIMENSION IA(84) ,IB{80) ,IC(1000) ,ID(136) ,N(40;

ITAPEr35

I0TAPE=6

IF ( ITYPE

IGN0RE=2

N1=0

N3=l

READ (ITAPE,9) ( DO 20 1=1,80

IF (IB(I)-IA(47)

CONTINUE

IGN0RE=1

GO TO 80

IEND=IB(I)

K=I+1

IF (K-80) 40,40,

DO 50 I=K,80

IF (IB(I)-IA(471

CONTINUE

IGNORE=0

GO TO 80

IGN=IB(I) AMAT

WRITE (I0TAPE.39) ( IB(K) , K=l , I

)

AMAT

READ (ITAPE,9) ( IB ( J ) , J=l , 80

)

AMAT

N2=0 AMAT

IF (IB(1)-IA(6) ) 160,100,160 AMAT

300,10,300

080

090

100

110

120

130

140

150

160

170

180

190

200

210

220

230

240

250

260

270

280

AMAT 290

AMAT 300

AMAT 310

AMAT

AMAT

AMAT

AMAT

< H

IB(I) ,i=i,8o;

30,20,30

320

330

340

350

360

370

380

390

,60

70,50,70

AMAT

AMAT

AMAT

AMAT

AMAT 400

AMAT 410

AMAT 420

AMAT 430

AMAT 440

AMAT 450

AMAT 460

AMAT 470

AMAT 480

AMAT 490

500

510

520

530

540

37
100 IF (IB(2) -- IA(9) ) 160,110,160

110 IF (IB(3) -- IA(14) ) 160,120,160

120 IF (IB(4) -- IA(9)) 160,130,160

130 IF (IB(5) -- IA(19) ) 160,140,160

140 IF (IGNORE - 1) 150,240,150

150 IF (IB(6) -- lEND) 160,240,160

160 DO 180 1=1 80

IF (IB(I) -- lEND) 180,170,180

170 IF (N2) 90 90,190

180 N2==1 190 Nl =^Nl + 1

200

210

9999

220

230

240

1000

300

310

320

330

340

350

360

370

380

390

400

410

9

19

29

39

49

IF (Nl - 40) 200,200,210

N(N1)=N2

N4=N3+N2-1

IF (N4-1000) 220,220,210

WRITE (I0TAPE,29) N4,N1

STOP

J=l

DO 230 I=N3,N4

IC(I)=IB(J)

J=J+1

N3=N3+N2

WRITE (I0TAPE,19) (IB ( J ) , J=l , 80

)

GO TO 90

WRITE ( lOTAPE , 19 )( IB ( J ) , J=l , 80

)

RETURN

IF (N4) 340,340,310

IF (1000-N4) 340,320,320

IF (Nl) 340,340,330

IF (40 - Nl) 340,350,350

WRITE (I0TAPE,49)

GO TO 9999

N3=l

DO 410 J=1,N1

N2=N ( J

)

N4=N2+N3-1

IF (N2 - LENGTH) 360,360,410

K=l

DO 390 I=N3,N4

IF (IC(I) - ID(K)) 370,390,370

IF (IGNORE-1) 410,410,380

IF (IC(I) - IGN) 410,390,410

K=K+1

MATCH=J

GO TO 1000

N3=N3+N2

MATCH=0

GO TO 1000

FORMAT (136A1)

FORMAT (1X,135A1)

FORMAT (79H0SUBR0UTINE AMATCH WAS GIVEN TOO MANY STRINGS.

AMAT 550

AMAT 560

AMAT 570

AMAT 580

AMAT 590

AMAT 600

AMAT 610

AMAT 620

AMAT 630

AMAT 640

AMAT 650

AMAT 660

AMAT 670

AMAT 680

AMAT 690

AMAT 700

AMAT 710

AMAT 720

AMAT 730

AMAT 740

AMAT 750

AMAT 760

AMAT 770

AMAT 780

AMAT 790

AMAT 800

AMAT 810

AMAT 820

AMAT 830

AMAT 840

AMAT 850

AMAT 860

AMAT 870

AMAT 880

AMAT 890

AMAT 900

AMAT 910

AMAT 920

AMAT 930

AMAT 940

AMAT 950

AMAT 960

AMAT 970

AMAT 980

AMAT 990

AMATIOOO

AMATIOIO

AMAT1020

AMAT1030

AMAT1040

MAXIMUM AMAT1050

ISIZE IS 1000 CHARACTERS /34H OR 40 STRINGS, CURRENT VALUES ARE AMAT1060

2 , 216, 6H STOP.

)

AMAT1070

FORMAT (25H0SUBR0UTINE AMATCH INPUT //1X,80A1) AMAT1080

FORMAT (62H0SUBR0UTINE AMATCH WAS NOT CALLED ON TO READ IN STRINGSAMAT1090

1. STOP. ) AMATllOO

END AMATlllO

38
10

20

40

50

60

70

80

90

100

110

160

170

180

200

210

220

230

240

250

260

9

19

39

59

SUBROUTINE NPRINT ( K , ITEST , IC , IBLANK , lOTAPE , IPTAPE , lEND

)

THIS VERSION OF NPRINT USES A FORTRAN WRITE STATEMENT

SUBROUTINE NPRINT -NTRAN PRINT- PRINTS OUT RECORDS OF LENGTH

NCOUT FROM THE STRING IC -lAl FORMAT- THE CURRENT LENGTH OF

CHARACTERS IN IC IS K. IF K IS LESS THAN NCOUT NOTHING IS DONE

UNLESS THE LAST RECORD IS TO BE WRITTEN INDICATED BY IEND=1

WHEN IEND=-1 THE ENTIRE CONTENTS OF IC IS WRITTEN OUT BUT THE

TAPE IS NOT ENDFILED AND EACH RECORD IS NCOUT CHARACTERS LONG

WHEN IEND=1 THE LAST RECORD IS FILLED WITH IBLANKS FROM K+1 TO

NCOUT AND AN END OF FILE IS PLACED ON IPTAPE. ITEST IS NEGATIVE

FOR PRINTING, ZERO FOR PRINTING AND WRITING TAPE AND POSTIVE FOR

WRITING TAPE. lOTAPE IS THE SYSTEM PRINTER. IPTAPE IS THE TAPE.

DIMENSION IC(4100)

NC0UT=132

IF (K) 20,20,80

IF (lEND) 70,70,40

IF (ITEST) 60.50,50

ENDFILE IPTAPE

WRITE (I0TAPE,19) ( IC ( I ), 1=1 , NCOUT)

WRITE (I0TAPE,9)

RETURN

IF (lEND) 90,110,90

IF ( NCOUT* (K/NC0UT)-K)

K = NCOUT* ( (K/NCOUT) + IF (K-NCOUT) 20,160,160

N=N+1

IF (ITEST) 170,170,180

WRITE (I0TAPE,19) (IC(i;

WRITE (I0TAPE,59) N , NCOUT

IF (ITEST) 210,200,200

WRITE (IPTAPE, 39) ( IC ( I ) , 1=1 , NCOUT)

IF (K - NCOUT) 10,220,240

K=0

DO 230 1=1, NCOUT

IC(I)=IBLANK

GO TO 10

J=K

K=0

K1=NC0UT+1

DO 250 I=K1,J

K=K+1

IC(K)=IC(I)

K1=K+1

DO 260 I=K1,J

IC(I)=IBLANK

GO TO 110

FORMAT (45H0******

FORMAT (1X,100A1)

FORMAT (132A1)

FORMAT ( 27H0****** ABOVE IS RECORD NO

1 7H LONG. /)

END

100,110,100

1)

1=1 , NCOUT)

THE ABOVE IS THE LAST RECORD WRITTEN

116, 7H IT IS 116,

NPRI 10

NPRI 20

NPRI 30

NPRI 40

NPRI 50

NPRI 60

NPRI 70

NPRI 80

NPRI 90

NPRI 100

NPRI 110

NPRI 120

NPRI 130

NPRI 140

NPRI 150

NPRI 160

NPRI 170

NPRI 180

NPRI 190

NPRI 200

NPRI 210

NPRI 220

NPRI 230

NPRI 240

NPRI 250

NPRI 260

NPRI 270

NPRI 280

NPRI 290

NPRI 300

NPRI 310

NPRI 320

NPRI 330

NPRI 340

NPRI 350

NPRI 360

NPRI 370

NPRI 380

NPRI 390

NPRI 400

NPRI 410

NPRI 420

NPRI 430

NPRI 440

NPRI 450

NPRI 460

NPRI 470

NPRI 480

NPRI 490

NPRI 500

NPRI 510

NPRI 520

39

APl'bADIX II

This Appendix shows how the programs in Appendix I were modified for tlie ^'iiS IJNIVAC 1108 in order to take full advantage

of buffered tape read, buffered tape write, and labeled common. These changes should serve also as a guide for optimizing the programs when run under other systems.

41
SUBROUTINE NPRINT( K , ITEST , IC , IBLANK , lOTAPE , IPTAPE , lEND

) NTPR 10

C THIS VERSION OF NPRINT IS A BUFFERED WRITE USING NTRAN AT NBS

.

NTPR 15

C SUBROUTINE NPRINT -NTRAN PRINT- PRINTS OUT RECORDS OF LENGTH NTPR 20

C NCOUT FROM THE STRING IC -lAl FORMAT- THE CURRENT LENGTH OF NTPR 30

C CHARACTERS IN IC IS K. IF K IS LESS THAN NCOUT NOTHING IS DONE NTPR 40

C UNLESS THE LAST RECORD IS TO BE WRITTEN INDICATED BY IEND=1

C WHEN IEND=-1 THE ENTIRE CONTENTS OF IC IS WRITTEN OUT BUT THE TAPENTPR

C IS NOT ENDFILED AND EACH RECORD IS NCOUT CHARACTERS LONG

C WHEN IEND=1 THE LAST RECORD IS FILLED WITH IBLANKS FROM K+1 TO

C NCOUT AND AN END OF FILE IS PLACED ON IPTAPE. ITEST IS NEGATIVE

C FOR PRINTING, ZERO FOR PRINTING AND WRITING TAPE AND POSTIVE FOR

C WRITING TAPE. lOTAPE IS THE SYSTEM PRINTER. IPTAPE IS THE TAPE.

DIMENSION IC ( 4100 ) , IWORDS ( 500

)

NCOUT = 300

10 IF (K) 20,20,80

20 IF (lEND) 70,70,30

30 IF (L+1) 190,30,40

40 IF (ITEST) 60,50,50

50 CALL NTRAN (IPTAPE, 9)

60 WRITE (I0TAPE,39) ( IWORDS ( I ), 1=1 , NWOUT

)

WRITE (I0TAPE,9)

70 RETURN

80 IF (lEND) 90,110,90

90 IF ( NCOUT* (K/NCOUT)-K) 100,110,100

100 K = NCOUT* ( (K/NCOUT) + 1)

110 IF (K-NCOUT) 20,160,160

160 IF (ITEST) 170,170,180

170 WRITE (I0TAPE,19) ( IC ( I ) , 1=1 , NCOUT

)

N = N+1

WRITE (I0TAPE,59) N, NCOUT,

L

IF (ITEST) 210,180,180

180 IF (L+1) 190,180,200

190 WRITE (I0TAPE,29) L CALL NTRAN (IPTAPE, 22)

CALL NTRAN (IPTAPE, 9)

WRITE (I0TAPE,39) ( IWORDS ( I ), 1=1 , NWOUT)

WRITE (I0TAPE,49)

STOP

200 CALL PACK (NCOUT , NWOUT , IWORDS , IC , IBLANK)

CALL NTRAN (IPTAPE , 1 , NWOUT , IWORDS , L)

210 IF (K - NCOUT) 10,220,240

220 K=0

DO 230 1=1, NCOUT

230 IC(I)=IBLANK

GO TO 10

240 J=K

K=0

K1=NC0UT+1

DO 250 I=K1,J

K=K+1

NTPR 50

NTPR 60

NTPR 70

NTPR 80

NTPR 90

NTPR 100

NTPR 110

NTPR 120

NTPR 130

NTPR 140

NTPR 150

NTPR 160

NTPR 170

NTPR 180

NTPR 190

NTPR 200

NTPR 210

NTPR 220

NTPR 230

NTPR 240

NTPR 250

NTPR 260

NTPR 270

NTPR 280

NTPR 290

NTPR 300

NTPR 310

NTPR 320

NTPR 330

NTPR 340

NTPR 350

NTPR 360

NTPR 370

NTPR 380 « NTPR 390

NTPR 400

NTPR 410

NTPR 420

NTPR 430

NTPR 440

NTPR 450

NTPR 460

NTPR 470

NTPR 480

NTPR 490

42
9

19

29

39

49

59

THE ABOVE IS THE LAST RECORD WRITTEN

250 IC(K)=IC(I)

K1=K+1

DO 260 I=K1,J

260 IC(I)=IBLANK

GO TO 110

FORMAT (45H0******

FORMAT (IX.lOOAl)

F0RMAT(35H0****** NTRAN WRITE ERROR. STATUS= 116, 7H ****** ///)

FORMAT (1X,20A6)

FORMAT (//51H ****** ABOVE RECORD NOT WRITTEN DUE TO NTRAN ERROR

FORMAT ( 27H0****** ABOVE IS RECORD NO ,1I6,7H IT IS 116,

123H LONG. STATUS WORD IS 116 /)

END

SUBROUTINE PACK ( ICHAR , IWOUT . IWORDS , ISTRIN , IBLANK)

THIS SUBROUTINE CHANGES INFORMATION STORED IN (Al) FORMAT INTO WORDS

PACKED SIX CHARACTERS PER WORD ON A UNIVAC 1108.

ICHAR IS THE NUMBER OF BCD CHARACTERS TO BE PACKED.

IWOUT IS THE NUMBER OF WORDS CONTAINING THE PACKED INFORMATION

IWORDS (500) CONTAINS THE PACKED INFORMATION . IF ICHAR IS NOT A MULTIPLE OF SIX THE LAST WORD IS FILLED OUT WITH BLANKS.

ISTRIN (4000) CONTAINS THE UNPACKED INFORMATION

IBLANK CONTAINS AN UNPACKED BLANK CHARACTER

DIMENSION IW0RDS(500) , ISTRIN(4100 ) ,IX(6)

10

20

30

40

50

60

70

0, 6, IWORDS (IZ)

6,6, IWORDS (IZ)

IW=ICHAR

IF (ICHAR-6*(ICHAR/61

IW=6*(ICHAR/6)+6

L=ICHAR+1

K=0

DO 20 I=L,IW

K=K+1

IX(K)=ISTRIN(I)

ISTRIN(I)=IBLANK

IW0UT=IW/6

1=0

DO 40 IZ=1, IWOUT

1=1+1

FLD ( 1=1+1

FLD ( 1=1+1

FLD (12,6, IWORDS (IZ)

1=1+1

FLD ( 18, 6, IWORDS (IZ)

1=1+1

FLD (24,6, IWORDS (IZ)

1=1+1

FLD (30,6, IWORDS (IZ)

CONTINUE

IF ( ICHAR-6* ( ICHAR/6

K=0

DO 60 I=L,IW

K=K+1

ISTRIN(I)=IX(K)

RETURN

END

10,30,10

=FLD( 0,6, ISTRIN (I

=FLD( 0,6, ISTRIN (I

=FLD(0,6,ISTRIN(i:

=FLD(0,6,ISTRIN(i;

=FLD(0,6,ISTRIN(I'

=FLD(0,6,ISTRIN(i:

50,70,50

NTPR 500

NTPR 510

NTPR 520

NTPR 530

NTPR 540

NTPR 550

NTPR 560

NTPR 570

NTPR 580

NTPR 590

NTPR 600

NTPR 610

NTPR 620

PACK 10

PACK 20

PACK 30

PACK 40

PACK 50

PACK 60

PACK 70

PACK 80

PACK 90

PACK 100

PACK 110

PACK 120

PACK 130

PACK 140

PACK 150

PACK 160

PACK 170

PACK 180

PACK 190

PACK 200

PACK 210

PACK 220

PACK 230

PACK 240

PACK 250

PACK 260

PACK 270

PACK 280

PACK 290

PACK 300

PACK 310

PACK 320

PACK 330

PACK 340

PACK 350

PACK 360

PACK 370

PACK 380

PACK 390

PACK 400

PACK 410

PACK 420

45
SUBROUTINE TPNRD (TAPE READ USING NTRAN)

10

20

30

40

50

60

70

C80

90

100

110

120

130

140

150

160

170

180

C190

200

210

220

230

240

SUBROUTINE TPNRD

DIMENSION IA(84) ,IB(136)

COMMON /A/ ITEST,ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /B/ LENTH

COMMON /E/ IRD

COMMON /IID/ IB

DIMENSION IREC(IOO)

THIS PROGRAM USES NTRAN TO READ A RECORD FROM IRTAPE INTO IREC

.

IT THEN UNPACKS THE RECORD TO Al FORMAT PLACING IT INTO IB. ILEN = 100

JEND = 1 JE = ICHK =

IF (IRD) 20,70,100

IF (IRD+1) 30,10,10

IF (IRD+2) 80,40,80

JE=JE+1

WRITE (I0TAPE,190) JE

IF (JEND-JE) 50,50,60

RETURN

CALL NTRAN (IRTAPE, 22)

CALL NTRAN ( IRTAPE , 2 , ILEN , IREC , IRD

)

GO TO 10

READ ERROR

WRITE (I0TAPE,200) IRTAPE , IRD

CALL NTRAN ( IRTAPE , 22

)

IERR=IERR+1

CALL NTRAN (IRTAPE, 7,1)

IF (IERR-10) 70,90,90

WRITE (I0TAPE,210)

STOP

IW=6*IRD

IF (ICHK-2) 140,130,110

IRI=IRD+19

DO 120 JI1=1,IRI,21

JI2=JIl+20

WRITE (I0TAPE,220) ( IREC ( J ) , J=JI1 , JI2

)

WRITE (6,230) IRD , ITAPE , lOTAPE , IRTAPE , IPTAPE , IW

CALL CLOCK

J = 136

DO 150 1=1,

J

IB(I)=IA(47)

DO 160 I = 1, LENTH

J=I-((I-l)/6)*6

IZ=(I-l)/6+l

FLD ( , 6 , IB ( I )

) =FLD ( 6* ( J-1 ) , 6 , IREC ( IZ )

)

DO 170 J = 1. LENTH

K = LENTH-J+1

IF (IB(K) ) 180,170,180

IB(K) = IA(47)

WRITE (I0TAPE,240)

IERR=IERR+1

IF (IERR-10) 70,70,90

IW=K

CALL NTRAN ( IRTAPE , 2 , ILEN , IREC , IRD

)

RETURN

FORMAT (13H END OF FILE ,114)

FORMAT (25H INPUT/OUTPUT ERROR UNIT ,1I3,8H STATUS ,113)

FORMAT (39H NTRAN READ ERRORS REACHED LIMIT. STOP.)

FORMAT (1X,21A6)

FORMAT (IX, 13110)

FORMAT (23H RECORD WAS ALL BLANKS

END

NRD 10

NRD 15

NRD 20

NRD 25

NRD 30

NRD 35

NRD 40

NRD 50

NRD 60

NRD 70

NRD 72

NRD 74

NRD 76

NRD 80

NRD 90

NRD 100

NRD 110

NRD 120

NRD 130

NRD 140

NRD 150

NRD 160

NRD 170

NRD 180

NRD 190

NRD 200

NRD 210

NRD 220

NRD 230

NRD 240

NRD 250

NRD 260

NRD 270

NRD 280

NRD 290

NRD 300

NRD 310

NRD 320

NRD 330

NRD 340

NRD 350

NRD 360

NRD 370

NRD 380

NRD 390

NRD 400

NRD 410

NRD 420

NRD 430

NRD 440

NRD 450

NRD 460

NRD 470

NRD 480

NRD 490

NRD 500

NRD 510

NRD 520

NRD 530

NRD 540

NRD 550

NRD 560

NRD 570

NRD 580-

44
PATCHES TO SETLST

201

COMMON /A/ ITEST,ITAPE.IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /B/ LENGTH, MATCH

COMMON /C/ K COMMON /D/ K1,IEND,IBLANK

COMMON /E/ IRD

COMMON /lie/ IB COMMON /lie/ IC

COMMON /IID/ ID

ITYPE=0

IEND=0

IBLANK=IA(47)

CALL AMATCH

CALL SUBST

ITYPE=1

200 IF (IRTAPE-5) 196,410,405

405 CALL TPNRD

IF (IRD+1) 900,395,395

410 READ (IRTAPE,9,END=900,ERR=900) (ID( I) ,1=1, length;

395 CALL AMATCH

CALL SUBST

CALL NPRINT

IEND=1

CALL NPRINT

807

TYST 641

TYST 642

TYST 643

TYST 644

TYST 645

TYST 646

TYST 647

TYST 648

TYST146

TYST1461

TYST1462

TYST1463

TYST1464

TYST147

TYST157

TYST1571

TYST1572

TYST158

TYST159

TYST187 ] d

TYST194 ] e

TYST2

TYST2 i^] f

PATCHES TO KWIND

200

202

203

201

COMMON /A/ ITEST,ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /B/ LENGTH, MATCH

COMMON /C/ K COMMON /D/ K1,IEND,IBLANK

COMMON /E/ IRD

COMMON /IIB/ IB COMMON /lie/ IC

COMMON /IID/ ID

ITYPE^O

IEND=0

IBLANK=IA(47)

CALL AMATCH

CALL SUBST

ITYPE=1

IF (IRTAPE-5) 9999,203.202

CALL TPNRD

IF (IRD+1) 900,201,201

READ (IRTAPE,9,END=900,ERR=900;

N1=N(1)

N2=N(2)

CALL AMATCH

iD(i) ,1=1, length;

CALL SUBST

KWIC002

KWIC003

KWIC004

KWIC005

KWIC006

KWIC007

KWIC008

KWIC009

KWIC0827

KWIC0828

KWIC0829

KWIC0830

KWIC0831

KWIC0832

KWIC0850'

KWIC0851

KWIC0852

KWIC0860

KWIC0870

KWIC0871

KWIC0880

KWIC2032

g

]i

45
CALL NPRINT

IEND=1

CALL NPRINT

KWIC2050

KWIC2200

KWIC22

00 1

loj

PATCHES TO SUBST

C580

600

810

SUBROUTINE SUBST

COMMON /A/ ITEST, ITAPE,IOTAPE.IRTAPE,IPTAPE,ITYPE,IA

COMMON /C/ IW

COMMON /lie/ IB

READ (ITAPE,850) ITES , IRTAP , IPTAP

WRITE tI0TAPE,930) ITES , IRTAP , IPTAP

CONTINUE

CALL SUNLK

CALL SULOCK

PATCHES TO SUNLK

SUBROUTINE SUNLK

COMMON /A/ ITEST, ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /C/ IW

COMMON /lie/ IB

SUBST 10

SUBS 11

SUBS 12

SUBS 13

SUBS 47

" SUBS 48

SUBS 49

SUBS 53

SUBS 54

SUBS 58

SUBS

i

SUBS

174

] , 175 J

SUBS179 J I; SUBS236 J

I

SSUK 10

SSUK 11

SSUK 12

SSUK 13

PATCHES TO SULOCK

SUBROUTINE SULOCK

COMMON /A/ ITEST, ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /C/ IW

COMMON /lie/ IB

SSLK 10

SSLK 11

SSLK 12

SSLK 13

PATCHES TO

SUBROUTINE AMATCH

AMATCH

COMMON /A/ ITEST, ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /B/ LENGTH, MATCH

COMMON /IID/ ID

AMAT 10 ]

291

292

293

PATCHES TO NPRINT WITH FORTRAN WRITE

SUBROUTINE NPRINT

COMMON /A/ ITEST. ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /D/ K,IEND,IBLANK

COMMON /F/ NCOUT,NWOUT,IWORDS

COMMON /IIB/ IC

NPRI 10

NPRI 11

NPRI 12

NPRI 13

NPRI 14

46
PATCHES TO NPRINT WITH NTRAN

SUBROUTINE NPRINT

COMMON /A/ ITEST,ITAPE,IOTAPE,IRTAPE,IPTAPE,ITYPE,IA

COMMON /D/ K.IEND.IBLANK

COMMON /F/ NCOUT.NWOUT.IWORDS

COMMON /lie/ IC

\Q CALL PACK

NT PR 10

NT PR 11

NT PR 12

NT PR 13

NT PR 14

w

NTPR 380^ X

PATCHES TO PACK

SUBROUTINE PACK

COMMON /D/ K1,IEND,IBLANK

COMMON /F/ ICHAR,IWOUT,IWORDS

COMMON /IIB/ ISTRIN

PACK 10

PACK 11

PACK 12

PACK 13

47

U. S. GOVERNMENT PRINTING OFFICE : 1970 O - 367-112

NBS TECHNICAL PUBLICATIONS

PERIODICALS NONPERIODICALS

JOURNAL OF RESEARCH reports National

Bureau of Standards research and development in physics, mathematics, chemistry, and engineering.

Comprehensive scientific papers give complete details of the work, including laboratory data, experimental

procedures, and theoretical and mathematical analyses. Illustrated with photographs, drawings, and

charts.

Published in three sections, available separately: • Physics and Chemistry

Papers of interest primarily to scientists working in these fields. This section covers a broad range of physical and chemical research, with major emphasis on standards of physical measurement, fundamental

constants, and properties of matter. Issued six times a year. Annual subscription: Domestic, $9.50; for- eign, $11.75*. • Mathematical Sciences

Studies and compilations designed mainly for the mathematician and theoretical physicist. Topics in mathematical statistics, theory of experiment: design,

numerical analysis, theoretical physics and chemistry, logical design and programming of computers

and computer systems. Short numerical tables. Issued quarterly. Annual subscription: Domestic,

$5.00; foreign, $6.25*. • Engineering and Instrumentation

Reporting results of interest chiefly to the engineer

and the applied scientist. This section includes many

of the new developments in instrumentation resulting

from the Bureau's work in physical measurement,

data processing, and development of test methods.

It will also cover some of the work in acoustics,

applied mechanics, building research, and cryogenic

engineering. Issued quarterly. Annual subscription:

Domestic, $5.00; foreign, $6.25*.

TECHNICAL NEWS BULLETIN

The best single source of information concerning the Bureau's research, developmental, cooperative and

publication activities, this monthly publication is designed for the industry-oriented individual whose

daily work involves intimate contact with science and

technology

for engineers, chemists, physicists, re- search managers, product-development managers, and

company executives. Annual subscription: Domestic,

$3.00; foreign, $4.00*.

• Difference in price is due to extra cost of foreign mailing.

Applied Mathematics Series. Mathematical tables, manuals, and studies. Building Science Series. Research results, test methods, and performance criteria of building materials, components, systems, and structures. Handbooks. Recommended codes of engineering

and industrial practice (including safety codes) de- veloped in cooperation with interested industries,

professional organizations, and regulatory bodies. Special Publications. Proceedings of NBS conferences, bibliographies, annual reports, wall charts,

pamphlets, etc. Monographs. Major contributions to the technical

literature on various subjects related to the Bureau's

scientific and technical activities. National Standard Reference Data Series.

NSRDS provides quantitive data on the physical

and chemical properties of materials, compiled from

the world's literature and critically evaluated. Product Standards. Provide requirements for sizes, types, quality and methods for testing various industrial products. These standards are developed cooperatively with interested Government and industry groups

and provide the basis for common understanding of product characteristics for both buyers and sellers. Their use is voluntary.

Technical Notes. This series consists of communications and reports (covering both other agency and

NBS-sponsored work) of limited or transitory interest. Federal Information Processing Standards Publications. This series is the official publication within

the Federal Government for information on standards

adopted and promulgated under the Public Law

89-306, and Bureau of the Budget Circular A-86

entitled. Standardization of Data Elements and Codes

in Data Systems.

CLEARINGHOUSE

The Clearinghouse for Federal Scientific and

Technical Information, operated by NBS, supplies

unclassified information related to Government-generated science and technology in defense, space, atomic energy, and other national programs. For

further information on Clearinghouse services, write: Clearinghouse

U.S. Department of Commerce

Springfield, Virginia 22151

Order NBS publications from: Superintendent of Documents

Government Printing Office

Washington, D.C. 20402
U.S. DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20230

OFFICIAL BUSINESS POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE