A111D3 DaTbSS

NATL INST OF STANDARDS & TECH R.I.C.

A1 11 03089655

Lyon, Gordon E/COBOL Instrumentation and QC100 .U57 NO.500-26, 1978 C.2 NBS-PUB-C MCE & TECHNOLOGY

COBOL

INSTRUMEIMTATIOIM AND

DEBUGGIIMG:

A CASE STUDY

iiiill

NBS Special Publication 500-26

U.S. DEPARTMENT OF COMMERCE

National Bureau of Standards
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards^ was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology and facilitate their effective application for public benefit. To this end, the Bureau conducts research and provides: (1) a basis for the Nation's physical measurement system, (2) scientific and

technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to pro- mote public safety. The Bureau consists of the Institute for Basic Standards, the Institute for Materials Research, the Institute for Applied Technology, the Institute for Computer Sciences and Technology, the Office for Information Programs, and the

Office of Experimental Technology Incentives Program.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United States of a complete and consist- ent 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 the Office of Measurement Services, and the following center and divisions: Applied Mathematics — Electricity — Mechanics — Heat — Optical Physics — Center for Radiation Research — Laboratory Astrophysics" — Cryogenics^ — Electromagnetics" — Time and Frequency'.

THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to improved methods of measurement, standards, and data on the properties of well-characterized materials needed by industry, commerce, educational insti- tutions, and Government; provides advisory and research services to other Government agencies; and develops, produces, and

distributes standard reference materials. The Institute consists of the Office of Standard Reference Materials, the Office of Air and Water Measurement, and the following divisions:

Analytical Chemistry — Polymers — Metallurgy — Inorganic Materials — Reactor Radiation — Physical Chemi.stry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services developing and promoting the use of avail- able technology; cooperates with public and private organizations in developing technological standards, codes, and test methods; and provides technical advice services, and information to Government agencies and the public. The Institute consists of

the following divisions and centers: Standards Application and Analysis — Electronic Technology — Center for Consumer Product Technology: Product

Systems Analysis: Product Engineering —• Center for Building Technology: Structures, Materials, and Safety; Building

Environment; Technical Evaluation and Application — Center for Fire Research; Fire Science; Fire Safety Engineering.

THE INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research and provides technical services designed to aid Government agencies in improving cost effectiveness in the conduct of their programs through the selection, acquisition, and effective utilization of automatic data processing equipment; and serves as the principal focus wthin the executive branch for the development of Federal standards for automatic data processing equipment, techniques, and computer

languages. The Institute consist of the following divisions: Computer Services — Systems and Software — Computer Systems Engineering — Information Technology.

THE OFFICE OF EXPERIMENTAL TECHNOLOGY INCENTIVES PROGRAM seeks to affect public policy and process

to facilitate technological change in the private sector by examining and experimenting with Government policies and practices in order to identify and remove Government-related barriers and to correct inherent market imperfections that impede

the innovation process. THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination and accessibility of scientific information generated within NBS; promotes the development of the National Standard Reference Data System and a system of in- formation analysis centers dealing with the broader aspects of the National Measurement System; 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 — Office of Information Activities — Office of Technical Publications — Library —

Office of International Standards — Office of International Relations.

^ Headquarters and Laboratories at Gaithersburg, Maryland, unless otherwise noted; mailing address Washington, D.C. 20234.

' Located at Boulder, Colorado 80302.
lOF STANDiUaDS

m 1 0 ^978

COMPUTER SCIENCE & TECHNOLOGY:

^ COBOL Instrumentation and Debugging:

A Case Study ^

Gordon Lyon

Systems and Software Division

Institute for Computer Sciences and Technology

National Bureau of Standards

Washington, D.C. 20234

U.S. DEPARTMENT OF COMMERCE, Juanita M. Kreps, Secretary

Dr. Sidney Harman, Under Secretary

Jordan J. Baruch, Assistant Secretary for Science and Technology

U , NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Acting Director

Issued January 1978

i
Reports on Computer Science and Technology

The National Bureau of Standards has a special responsibility within the Federal

Government for computer science and technology activities. The programs of the

NBS Institute for Computer Sciences and Technology are designed to provide ADP

standards, guidelines, and technical advisory services to improve the effectiveness of

computer utilization in the Federal sector, and to perform appropriate research and

development efforts as foundation for such activities and programs. This publication

series will report these NBS efforts to the Federal computer community as well as to interested specialists in the academic and private sectors. Those wishing to receive

notices of publications in this series should complete and return the form at the end

of this publication.

National Bureau of Standards Special Publication 500-26

Nat. Bur. Stand. (U.S.), Spec. Publ. 500-26, 33 pages (Jan. 1978) CODEN: XNBSAV

Library of Congress Catalog Card Number: 77-608347

U.S. GOVERNMENT PRINTING OFFICE

WASHINGTON; 1978

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

Page

1. INTRODUCTION 1

2. LgUIPWENT AND SOFTWARE 2

3. PROtaRAWiViING THE TEST PRObLEW 4

4. perfoki-iance Indications 4

5. OBSERVATIONS ON TlhiNO 7

b. CONCLUSIONS 7

b.l Files and Interactive Support ti

6.2 Run-Time Debugging Recommendations 8

6.3 Good Compiler Diagnostics 9

7. REFERENCES Ik)

8. APPENDIX A 12

-iii-

COBOL Instrumentation and Debugging: A Case Study

Gordon Lyon

Traditionally COBOL has been run in batch execution and debugged through abnormal terminations; indeed, whole books have been devoted to

deciphering COBOL core dumps, with modern equipment there is little excuse for writing COBOL

source code this way. A carefully chosen example

(a COBOL program to tally reserved words and

cross-reference other tokens) is used as a vehicle

for an examination of a contemporary COBOL coding

experience. COBOL can be written quite fast interactively, and COBOL programs can be easily

tuned if good timing facilities are available.

Strengths and limitations of a current debugging

pacKage are highlighted in the case study.

Key words: COBOL; execution monitoring; symbolic

debugging; timesharing.

1. INTRODUCTION

Studies of program measurement have been increasingly

evident in recent years. Slowly an appreciation has been

rebuilding for the value of measurement in program debugging, testing, and execution tuning. A paper by Knuth [5]

was quite instrumental in triggering the revival of monitoring techniques (6,8j, although most of the techniques themselves had been used in early days of computing (14].

Because COBOL is widely used commercially, there are

many packages available to the COBOL programmer for debugging and checkout [4]. An interactive, symbolic debugging

and development package has been chosen for examination from

among the many packages such as cross-reference generators,

"short form" macro expanders, and "neateners." There are

several reasons why this choice seems a good one: (1) COBOL

users often tend to ignore the enormous power of interactive

programming; (2) A symbolic interactive facility frees programmers from reading tedious memory dumps (which should be

obsolete for higher level languages); (3) Timing facilities

and rapid recompilation encourage a programmer to check program pieces incrementally for both correctness and execution

efficiency. The implications of these points are that one

should use a modern computing facility to perform program

-1-
development, and in particular, one with timesharing and a good file system.

In general, the programming public seems to prefer instrumentation for monitoring run-time performance when given

a choice of debugging tools. The author heard a very vocal

expression of this at an open discussion session at CIPS-75

llj . Tne vehicle for discussion througnout will be a program, written in COBOL, that tallies LObOL reservea words

ana provides a crude program cross reference on non-reserved

toKens, It is a fairly interesting program, and examination

of the problems in "toKen accounting" provides a good

demonstration of COBOL strengths sucn as binary bEARCh and

external bOKT. The example serves well in that it uncovers

a problem inherent in the chosen debugging package, as well

as being a handy utility in its own right, A complete listing appears in Appendix A.

It is sensible to approach COBOL from an interactive

perspective because timesharing, or equivalently , cheap

stand-alone minicomputers, are surely the current wave. Not

only is program development in batch mode slow—it is often

wasteful of both machine and programmers' time. Whole dumps

are taken to isolate a single variable value which is buried

in octal or hexadecimal [2]. Progress can be slow; readin^-j

a iiiemory dump is often not very productive. A terminal and

a symbolic breakpoint facility are far better; the programmer can catch a run at a vital point and check variables by

a query such as "INTEREST ?" The system would reply, "INTEREST $4.31" which if incorrect can be changed, say, by

"SET INTEREST $4.00." All of this is done symbolically and

fast. The only catch is that the programmer must have written an understandable program so that he doesn't spend forty

minutes between queries. Experienced programmers appear to

debug at rates fifty to three hundred percent faster when

on-line 112, p.6J

2. EUUIPWENT AND SOFTWARE

The work described herein was performed using a catnode

ray display terminal (CRT) linked directly to a port of a time sharing, medium sized computer. No telephone dial connections were necessary, although acoustic couplers are now

readily available to allow terminals to use ordinary telephones. The advantage of direct connection was line speed,

in this case, 2400 baud (roughly, bits/sec) which is convenient with a fast CRT character display.

-2-
The CRT display was twenty-four eighty-character lines.

An attached keyboard was comfortable ana quiet, so that a programmer could share an office without annoying others.

The chosen computer system offers a large amount of

on-line disK storage, so a user has no reason to carry card

decks and paper tape between runs. Indeed, no system card

reader is available —only a moderate speed paper tape

reader. Two distinct types of magnetic tape storage are

also provided. Enough information is kept on files in the

system that a user can ask that a source file (of say,

COBOL) be executed; if a relocatable version dated after the

last source editing exists, it is loaded and execution begins. Otherwise the more recent source code is recompiled,

loaded and executed.

Programs are scheduled according to their resource

demands. Because timesharing emphasizes user interaction,

there is a definite penalty in the scheduling for programs

which become compute-bound. Monopolyzing the CPU cannot be

allowed since terminal response then suffers. The environment is excellent for programming and checkout. Longer production runs can be made in a batch (or "background") mode.

Since files are crucial to a timesharing environment,

the system has several editors. The one used in programming

tne token scanner can list selected file lines, move sequentially through the text, or search on context. Context

searching has a point worth mentioning which emphasizes

differences in interactive versus batch programming styles.

In batch programming it is a good idea to set variables

which will be program parameters, e.g. LINEwD = bid, INCKE = 50. This can lead to some confusion if parameter TWO is

later set to three. Context searching allows one to use

literals freely in statements, and to find them again easily

if they need changing; named parameters thereby become less

important. The editor can replace whole lines, pieces of

lines, or read pieces of other files into the current one.

File modification is easy, even for longer programs which as

card decks would be difficult to handle. For insurance the

user can copy his files to small reels of magnetic tape if

he desires. In any event, the system also provides a file

backup to within the last week.

The debugger is invoked in lieu of a compilation or run

request. The programmer can (symbolically) set program

variables to new values, assign or clear breakpoints where

execution will pause for interrogation, display variable

values, set a paragraph name trace on, and request a histogram of time in paragraphs. These few but well chosen services are sufficient to support interactive debugging and

"tuning".

-3-
3. PROGKAI^MING Tti£ TEST PKOBLEM

h CObOL reserved word tailier (listed in Appendix A)

was chosen as the example program. Farts of the proceoure

division were borrowed from another program, supplemented

and rearranged. This initial cut-and-paste was easily accomplished in about tit teen minutes using the online editor.

The MOKKING-STUKA(^E SECTION could have been extremely tedious to write, consisting as it does of about three hundred

and fifty FILLER items. In fact, the convenience of interactive programming greatly eased the problem. First, all

the reserved key words were typed into a file and sorted. A

short program was written to read the key word file and generate a file of COBOL source code (called KT in the listing

in Appendix A) suitable for binary SEARCHing. Mhen the text

was checked and consistent, it was edited into the program

WORKING STORAGE section.

The PROCEDURE DIVISION isolates non-blank strings of

characters. Termination of a line counts as a blank, so

multi-line scans are not made. Once a non-literal token is

found, it is looked up in the appropriate table KTx, where x is the token length. If the item is not a token in KTx, it

is written along with a line number on the file NKEYS. When

input is exhausted the contents of KT are printed, and the

file mKEYS is sorted and also displayed. Non-reserved words

(tokens) written througn data record T-REC are filtered

sligntly prior to transmission to NKEYS. This eliminates

some extraneous text fragments. The final output is a collection of reserved word counts, statistics on non-reserved

words and a cross reference table.

4. PERFORMANCE INDICATIONS

After the program began running, the histogram feature

was used to investigate execution behavior. A typical report appears in Figure 1. Most notable is the fact that

small sections EXT-NON-BLANK-LOOP and EXT-CUR-L00P2 consume

a preponderance of running time. These sections are, of

course, entered a disproportionate number of times since

they scan all input characters. Table searching (L1-L15)

and printing (P1-P15) cause no problem. The external SORT

of non-reserved tokens (XREF) is efficient and fast. It is

interesting to note that once the frequencies of the

reserved words were known, tables L1-L15 were rearranged by

descending frequencies for sequential SEARCHing. There was

little difference between the latter and the binary SEARCH
used in Appendix A. Text for the test was the analyzer itself. Results appear oelow in Figure 1:

HISTORY REPORT

COBDDT HISTOGRAM FOR CSNARK

LhoLL

START

mLmST

Rbb

tXTRACT-TOKEN

LXT-lMOW-HLAiMK-LOOP

tXT-MON-BLAWK-FOUND

LXT-CHR-LOOP

LXT-CHR-L00P2

EXT-TOKEN-END

EXT-M-W-LITERAL

EXT-N-N-LIT-END

EXT-EXIT

EXT-EXT

CLASSIFY-TOKEN

LI

L2

L3

L4

L5

L6

L7

L8

L9

Llki

Lli

L12

Li3

L14

Lib

MEXIT

CLASTOK-EXIT

PI

P2

ENTRIES CPU ELAPSED

SECS Tli'lE

1 k) . u7 U . 3^

7b9 4.6k) 14.91

6530 12.22 46.64

653kl lKl.b9 36.54

33653 1:09. 87 4:39.78

5769 12.35 1:03.13

5769 9.82 29.33

24485 59.81 3:13.84

5433 10.30 2:03.47

2927 7.97 58.79

336 0.83 1.96

5433 9.97 1:42.78

6530 11.60 43.31

5433 9.38 35.55

955 4.27 10.89

974 5.95 18.16

1038 5.10 25.81

372 2.67 15.22

1259 8.17 22.89

493 3.34 15.72

114 0.77 3.48

55 0.41 0.78

104 0.54 2.51

13 0.04 0.11

8 0.01 0.18

23 0.15 0.30

9 0.06 0.08

3 0.01 0.01

8 0.00 0.00

3751 9.49 37.94

5433 9.98 26.81

7 0.05 0.11

24 0.16 0.41
P3

P4

P5

P6

P7

P8

P9

Pib

Pli

P12

Pi3

P14

Pi5

PP

21

47

38

37

36

3k)

18

16

9

9

8

3

3

7

1

0.15

kt.29

0.23

0.19

0.16

0.11

0.07

k).06

0.03

0.04

0.03

0.01

0.02

0.14

17.26

14.91

6.70

7.15

0 .43

6.61

6.68

k).15

U.ll

0 .06

0 .06

6.51

U .05

0.01

0.05

6.63

32.28

1144 5:14.80

Figure 1. Timing Report .

Examination of the paragraph £XT-NON-BLANK-LOOP underscores what can be a fundamental limitation in a program

tuning package, either because of limitations imposed by the

operating system or failures within the package itself. The

histogram indicates that the code for skipping blanks consumes twenty-two percent of execution even though it is

quite brief:

If IN-COL (IN-PTK) IS NOT EQUAL TO SPACE

GO TO EXT-JNiON-BLANK-t'OUND.

ADD 1 TO li>l-PTR.

IP IN-PTK IS £40T OKEATEK TiiAN 72

OO TO EXT-WOW-SLAWK-LOOP.

MOVE 0 TO TOKEN-SIZE.

00 TO EXT-EXT.

uefinition of tne array IN-COL is similarly transparent:

The above sections of code were rewritten in more compact forms in an effort to improve execution. RIN-COL was

redrafted as

EXT-NON-BLANK-LOOP

01

01

DATA RECORDS ARE CARD, RIN-COL.

CARD PIC X(80)

RIN-COL.

02 IN-COL PIC X(l) OCCURS 80 TIMES.

01 RIN-COL.

02 IN-COL PIC X(l) OCCURS 72 TIMES

-6-
INOEX£0 BY IN-PTH.

02 FILLER PIC (8)

The corresponding procedure section CXT-NON-BLANK-LOOP was

changed to

EXT-NON-BLANK-LOOP

SEARCH IN-COL VARYING IN-PTR AT END

MOVE 0 TO TOKEN-SIZE, GO TO EXT-EXT;

WHEN IN-COL (IN-PTR) IS NOT EQUAL TO SPACE

NEXT SENTENCE.

Histograms for the new program show immediate improvement. The new 'LOOP code is entered about one fifth as often and consumes one third the cpu time of the first version

of the section. Unfortunately, the new program when run

without the debugging option is about one percent slower.

Even after allowing for vagaries in tne system clocK, tnis

indicates tnat section timings in the nistogram pacicage are

not compensated correctly for overhead. Fast, constantly

invoKed code has timings that reflect many artifacts of tne

timing package itself. LooKing at tne listing in Appendix

A, the section XREf—called once for a sizable

computation—is probably accurately measured. On tne other

nand, lxT-CHR-LOOP is heavily used for snort periods, so

timings for EXT-ChR-LOOP can be thought somewnat doubtful.

5. OBSERVATIONS ON TIMING

The problem of designing a good timing package is not

always easily solved. Hardware can supply variations [3,

15J . Some operating systems do not allow easy access to the

user or program state , but rather lump together system overhead such as memory management operations, device completion

notices, and scheduling time. Attempts to compensate for

various overheads can be frustrating, since with sufficient

variance there is always the possible embarassment of having

too much compensation, thereby getting negative results.

6. CONCLUSIONS

Results of programming tne token recognizer in LuaOL

lead to specific recommendations for a COBOL environment.
b.i Files and Interactive bupport

Tfte programming system should oe interactive. A quicK

response allows tne task to move along; the programmer is

not distracted by juggling many jobs to fill up his otherwise unused time between batch runs. His train o£ thought

remains uninterrupted.

Corollary to a requirement for interaction, the system

needs a good file facility. An indication of features of

such files can be found in Ritchie and Thompson [ 11 J

5.2 Run-Time Debugging Recommendations

Any interactive debugging package should allow transactions to be carried out in terms of names defined and meaningful within the CubOL source program in question. Care

should oe exercised to avoid forcing a programmer to resort

to absolute or relocatable aadresses. using symoolic names

m the source text, the following features are recoauiienaeo

(1) oLT and Lbt-AR program breaKpoints so tnat program

execution can oe selectively halted ana KLbxARiea

(^) uli> fLAi and Ktibbi of variables in a simplified notation related to tneir initial definition, tor

example RLbLT X = ltf.j4i.

(3) TRACLALL and TRACtbKPTS that are set on all paragraph names or selected trace and timing points in

PRUCLLURE DIVIblOW.

These first three items are more or less self explanatory

they are designed principally to replace dependence upon

memory dumps.

A second set of debugging feature recommendations is

to:

(4) Provide execution timings and counts of paragraph

traver sals

(5) i^llow selective counts and timings inaepenaent of

PRUCbuUKt blVlblOw labels by navmg special

deougg ing-only labels.

Tne special names for timings mentionea m (b) could oe distinguisnea comments such as "Tilsit. <laDel>".
benchraarK test sections of COBOL should be preparea to

test reliabilities of any Histogram pacKaye, thus:

(G) test the accuracy of the timing pacKage.

as the example has amply demonstrated, tests are necessary.

One test must oe some snort piece of fast but heavily called

cooe. comparisons of the test section witn a tew extra

statements tnrown in will quiCKly snow if tne instrumentation has a 'yreat amount of uncom^^ensated overiieau tor eacn

tally point. 'lo illustrate this point tne neavily-usea

fdragrapn tiAT-ivuiNi-oLAi^K-Looi' was expanaed to twice its normal iengtn ana retimea. Tne new segment of coue was;

CXT-wuN-ULHwrv-LOUf

********************* *(j^jjjjj[jy code enclosed below.

It Ii\J-COL (Iw-PTK) lb L^\jhL TO bP/iCL

Abb 1 TO DUHWy,

IF IW-PTK lij OREATEk THAW 7 2

WOVE id TO TOKt.W-bUwwy

**********************(-ly{{ji(]y code enclosed above.

IF IW-COL (IN-PTK) IS NOT LQOAL TO SPACL

00 TO EXT-iMON-BLANK-FOUND.

Abb 1 TO IN-PTK.

IF IN-PTR IS NOT OKLATEH THLN 72

00 TO EXT-NOW-BLAwK-LOOP.

rtOVE ^ TO TOKEN-SIZE.

GO TO EXT-EXT.

Notice tnat to avoid new timing points it was necessary to

write tne "dummy" code without labels ana oo TO's. inaicatea c.p.u. time for tne aoove (rougnly aouolea) paragrapn was

sixty-six seconds. Since the previous run tooK l:wy.o7, it

is clear that most of tne indicated time tor tne paragrapn

is measur ement error . Tne timing entries tor Kt-o (1^.^/)

ana ijXTKACT-TOtvLw (Ito.tiy) furtner unaerscore tne tact tnat

tne timing is not of very nigti quality.

b.3 ijooa compiler diagnostics

The last recommendation is that the compiler used for

aeougging be tested for accuracy of error diagnostics and

recovery

(1) have a debugging compiler that gives good diagnostics.

-9-
In those cases where the debug package is integral to the

compilation support there is little a user can do. In other

instances compilation is a distinct step. It may be fruitful to run programs with stock (known) errors to check

recovery accuracy {7,10]. One older COBOL compiler on a timesharing service was somewhat notorious for the avalanche

of clutter and confusion it emitted for trivial early errors

(prior to the PkOCLDUKE DIVISION). Also very useful is an

interpretive diagnostic compiler that can catch items such

as uninitialized variables. Available for years with JcOKTtAS^, these useful debugging translators are now commercially supported for COBOL.

7 . KEJr'LKENCbS

Hi Canadian Information Processing Society (CIPS) National

Conference, Kegina, Sask«, June 1975.

[2] Boar, B.H. Abend Debugging for COBOL Programmers . (John iMiley & Sons, Inc., 1976).

(3J Gentleman, W.M. and wickman, B.A. Timing on computers.

SIGARCH Computer Architecture News 2, (October,

1973) , 20-23.

[41 ICP Reference Ser ies Software Directory Volume 1^, Data

Processing Management , International Computer Programs, Inc., 1976.

15 J Knuth, D.E, An empirical study of FORTRAN programs.

SOFTWARE; Practice & Exper ience 1^, (1971) , 105-133.

16J Knuth, D.E., and Stevenson, F.R. Optimal measurement

points for program frequency counts. H'i.'^* Al»

(1973) , 313-322.

17] Litecky, C.R., and Davis, G.B. A study of errors,

error-proneness , and error diagnosis in COBOL,

coram. ACM. 19, KJanuary, 1976), 33-37.

[8] Lyon, G.E., and Stillman, R.B. Simple transforms for

instrumenting FORTRAN decks. SOFTWARE ; Practice &

Experience 5, (1975), 347-358.

lil Operator 's Handbook—OMRON 8025 . OMRON Information

Products Division, Sunnyvale , Calif., 1974.

-10-
liioj Presser, L. and benson, J. Evaluation ot cooipilec

statistics. Computer Journal 17 , 2(1974),

121-123.

lllj Kitcnie, U.H., and Thompson, K. Tne Unix time-sharing

system. Comm. ACM 17, 7(July, 1974), 3b!>-375.

[12J Sackman, h., et.al. Exploratory experimental studies

comparing online and offline programming performance. Comm . ACM. 11, KJanuary 1968), 3-11.

113] Thompson, K. and Ritchie, D.M. UNIX Programmer "s

Manual . Bell Telephone Laborator ies, 1975. See

the command "cbd" for a debugging package that requires little advance planning.

[14] Wilkes, M. Software engineering and structured programming. IEEE Transactions on Software

Engineering SE -2, 4(December, 1976), 274-276.

115] wortman, David B. A study of high-resolution timing.

IEEE Transactions on Software Eng ineer ing SE-2

,

2(June, 1976) , 135-137.

-11-
8. APPENDIX A

IDENTIFICATION DIVISION.

* KEYWORD SEEKER AND XREF SEPT. 10, 1975. ********** THIS VERSION FILTERS N-R'S , SEE "NEXIT" . ***** PROGRAM-ID. CSNARK.

REMARKS. TALLYS RESERVED WORDS. SOME STAT ON NON-RES 'D.

ENVIRONMENT DIVISION,

INPUT-OUTPUT SECTION.

irlLE-CONTROL.

SELECT NKEYS ASSIGN TO DSK RECORDING MODE IS ASCII.

SELECT TXT ASSIGN TO DSK RECORDING MODE IS ASCII.

SELECT SORT-FILE ASSIGN To DSK, DSK, DSK, DSK, DSK.

DATA DIVISION.

FILL i>ECTION.

Su SORT-FILE.

SORT-RECORD.

kJ2 A PIC X(i5) . 02 B PIC S9 (5) . FD TXT

LABEL RECORDS ARE STANDARD

VALUE OF ID IS "ABC

DATA RECORDS ARE CARD, RIN-COL.

01 CARD PIC X(80)

01 RIN-COL.

02 IN-COL PIC X OCCURS 80 TIMES.

FD NKEYS

LABEL RECORDS ARE STANDARD

VALUE OF ID IS "NKEYS TST"

DATA RECORD IS T-REC.

01 T-REC.

02 TTOKK PIC X(15)

02 TLEN PIC S9(4)

WORKING-STORAGE SECTION.

01 KW-STAT.

1^2 Kwl PIC S9(5) OCCURS 7 TIMES.

02 KW2 PIC S9(5) OCCURS 24 TIMES.

02 Kw3 PIC S9(5) OCCURS 21 TIMES.

02 KW4 PIC S9(5) OCCURS 47 TIMES.

102 Kw5 PIC S9(5) OCCURS 38 TIMES.

02 Kw6 PIC S9(5) OCCURS 37 TIMES.

u2 Kw7 PIC S9(5) OCCURS 36 TIMES.

02 KWb PIC S9(5) OCCUkS 30 TIMES

02 Kw9 PIC S9(5) OCCURS 18 TIMES.

02 KMl0 tlL S9(5) OCCURS 18 TIMES.

02 KWll PIC S9(5) OCCURb 9 TIMES.

02 KW12 PIC S9(5) OCCURS 9 TIMES.

02 KW13 PIC S9(5) OCCURS 8 TIMES.

02 KW14 PIC S9(5) OCCURS 3 TIMES.

-12-
02 Kwl5 PIC Sy(5) OCCURS 3 TIMES

*

*

*

kil

TAbLLS aLLuvi AKL i'iACKO-i:.APAuSIONS

FkOiyi TABLL-OtMLKATlWO COUL WKlTTLlNJ

iMTEhACTlVtLi iJN» Ai90l-6kJ.

KT

k)2 KTl

02 STRl

0 2 KT2

02 STR2

0 2 KT3.

03 FILLhk

b3 FILLER

03 FILLER

0 3 FILLER

0 3 FILLER

03 FILLER

03 FILLER

REDEFINES

INDEXED BY

PIC X{1) VALUE

PIC X(i) VALUE "»'• PIC X(l) VALUE

PIC X(i) VALUE V"

PIC X(l) VALUE "<"

PIC X(l) VALUE

PIC X(l) VALUE ">".

KTl OCCURS 7 TIMES

TABINXr ASCENDING KEY Kl

04 Kl PIC X(l) •

03 FILLER PIC X(2) VALUE • 03 FILLER PIC X(2) VALUE "AT" . 03 FILLER PIC X(2) VALUE "BY" . 03 FILLER PIC X(2) VALUE "CD" . 03 FILLER PIC X(2) VALUE "CF" . 03 FILLER PIC X(2) VALUE "CH".

03 FILLER PIC X(2) VALUE "dl".

03 FILLER PIC X(2) VALUE "FD".

03 FILLER PIC X(2) VALUE "GO".

03 FILLER PIC X(2) VALUE "IF".

03 FILLER PIC X(2) VALUE "IN".

u3 FILLER PIC X(2) VALUi:. "IS".

03 FILLER PIC X(2) VALUE "wo"

03 FILLER PIC X(2) VALUt. "OF".

03 FILLER PIC X(2) VALUE "ON".

03 FILLER PIC X(2) VALUE "OR" . 03 FILLER PIC X(2) VALUE "PF" . 03 FILLER PIC X(2) VALUE "Pri".

03 FILLER PIC X(2) VALUE "RD".

03 FILLER PIC X(2) VALUE "RF".

03 FILLER PIC X(2) VALUE "RH" . 03 FILLER PIC X(2) VALUE "SD" . 03 FILLER PIC X(2) VALUE "TO".

03 FILLER PIC X(2) VALUE "UP" . REDEFINES KT2 OCCURS 24 TIMES

INDEXED BY TABINX,

04 K2 PIC X(2)

ASCENDING KEY K2.

03

03

03

03

03

FILLER

FILLER

FILLER

FILLER

FILLER

PIC

PIC

PIC

PIC

PIC

X(3)

X(3)

X(3)

X(3)

X(3)

VALUE

VALUE

VALUE

VALUE

VALUE

"ADD"

"ALL"

"AND"

"ARE"

"DAY"

-13-
fc}3 FILLER PIC X(3) VALUE "EGI".

03 FILLER PIC X(3) VALUE "EMI".

03 FILLER PIC X(3) VALUE "END"

03 FILLER PIC X(3) VALUE "EOP"

03 FILLER PIC X(3) VALUE "ESI".

03 FILLER PIC X(3) VALUE "FOR".

03 FILLER PIC X(3) VALUE "I-O".

03 FILLER PIC X(3) VALUE "KEY".

03 FILLER PIC X(3) VALUE "NOT".

03 FILLER PIC X(3) VALUE "OFF".

03 FILLER PIC X(3) VALUE "PIC".

03 FILLER PIC X(3) VALUE "RUN"

03 FILLER PIC X(3) VALUE "SET"

03 FILLER PIC X(3) VALUE "SUM"

03 FILLER PIC X(3) VALUE "TOP".

03 FILLER PIC X(3) VALUE "USE".

0 2 STK3 Kt;D^FlM£S KT3 OCCURS 21 TIMES

02 KT4

Indexed by tabinx, ascending key k3

"ALSO"

"AREA"

"CALL"

"CODE"

"COMP"

"COPY"

"CORR"

"DATA"

"DATE"

"DOWN"

"ELSE"

"EXIT"

"FILE"

"FROM" , "INTO"

"JUST"

"LAST".

"LEFT",

"LESS".

"LINE"

"LOCK"

"MODE"

"MOVE"

"NEXT"

"OPEN"

"PAGE",

"PLUS",

"kead" , "SAME" , "SEND"

"SIGN"

k)4 K3 PIC X(3J .

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X (4) VALUE

03 FILLER PIC X [4) VALUE

03 FILLER PIC X [4) VALUE

03 FILLER PIC XI[4) VALUE

03 FILLER PIC XI[4) VALUE

03 FILLER PIC XI[4) VALUE

03 FILLER PIC X [4) VALUE

03 FILLER PIC X [4) VALUE

03 FILLER PIC XI[4) VALUE

03 FILLER PIC XIi4) VALUE

03 FILLER PIC XI 4) VALUE

03 FILLER PIC X( 4) VALUE

k>3 FILLER PIC X( 4) VALUE

03 FILLLR PIC X( 4) VALUE

03 FILLER PIC X( 4) VALUE

u3 FILLER PIC X( 4) VALUE

03 FILLER PIC Xi 4) VALUE

03 FILLER PIC X( 4) VALUE

03 FILLER PIC XI 4) VALUE

03 FILLER PIC X( 4) VALUE

-14-
0 2 STR4

02 KT5.

03 FILLER PIC X(4) VALUE "SIZE"

03 FILLER PIC X(4) VALUE "SORT"

03 FILLER PIC X(4) VALUE "STOP"

03 FILLEK PIC X(4) VALUE "SYNC"

03 FILLER PIC X(4) VALUE "lAPE"

03 FILLER PIC X(4) VALUE "TEXT"

03 FILLER PIC X(4) VALUE " TriAW "

03 FILLER PIC X(4) VALUE " ThKU "

03 FILLER PIC A(4) VALUE "TIME"

03 FILLER PIC X(4) VALUE "TYPE"

03 FILLER PIC X(4) VALUE "UNIT"

03 FILLER PIC X(4) VALUt. "UPON"

03 FILLER PIC X(4) VALUE "WHEN"

03 FILLER PIC X(4) VALUE "WITH"

03 FILLER PIC X(4) VALUE "ZERO".

K£D£FIN£S KT4 OCCURS 4 7 TIMES

INDEXED by TABINX, ASCENDING KEY

04 K4 PIC X(4) •

03 FILLER PIC X(5) VALUE "AFTER"

03 FILLER PIC X(5) VALUE "ALTER"

03 FILLER PIC X(5) VALUE "AREAS"

03 FILLER PIC X(5) VALUE "BLANK"

03 FILLER PIC X(5) VALUE "BLOCK"

03 FILLER PIC X(5) VALUE "CLOSE"

03 FILLER PIC X(5) VALUE "COBOL"

03 FILLER PIC X(5) VALUE "COMMA"

03 FILLER PIC X(5) VALUE "COUNT"

03 FILLER PIC X(5) VALUE

03 FILLER PIC X(5) VALUE "EguAL"

03 FILLER PIC X(5) VALUE "ERROR"

03 FILLER PIC X(b) VALUE "EVERY"

03 FILLER PIC X(5) VALUE "FINAL"

03 FILLER PIC X(5) VALUE " FIR5T"

03 FILLER PIC X(5) VALUE "CROUP"

03 FILLER PIC X(b) VALUE "INDEX"

03 FILLER PIC X(b) VALUE "INPUT"

03 FILLER PIC X(5) VALUE "LABEL"

03 FILLER PIC X(5) VALUE "LIMIT"

03 FILLER PIC X(5) VALUE "LINES"

03 FILLER PIC X(5) VALUE "MERCE"

03 FILLER PIC X(5) VALUE "QUEUE"

03 FILLER PIC X(5) VALUE "QUOTE"

03 FILLER PIC X(5) VALUE "RERUN"

03 FILLER PIC X(5) VALUE "RESET"

03 FILLER PIC X(5) VALUE "RIGHT"

03 FILLER PIC X(5) VALUE "SPACE"

03 FILLER PIC X(5) VALUE "START"

03 FILLER PIC X(5) VALUE "TABLE"

03 FILLER PIC X(5) VALUE "TIMES"

03 FILLER PIC X(5) VALUE "UNTIL"

03 FILLER PIC X(5) VALUE "USAGE"

-15-
02 STR5

02 KT6

0 2 KT7

03 FILL£R

03 FILLER

03 FILLER

03 FILLER

03 FILLER

REDEFINES

INDEXED BY

04 K5 PIC

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

Kt3 FILLER

k)3 FILLER

k)3 FILLER

03 FILLER

03 FILLER

U3 FILLER

K)3 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 eiLLI^k

03 FILLER

ki3 FILLER

INDEAED

04 Kb ^IC

PIC X(5)

PIC X(5)

PIC X(S)

PIC X(5)

PIC X(5)

VALUE

VALUE

VALUE

'USINb-

VALUE"

'WORDS" . VALUE "WRITE'

VALUE ZEROS'

KT5 OCCURS 38 TIMES

TABINXr ASCENDING KEY K5.

X(5) . PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC X

PIC X

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

(6

(6

(6

(6

(6

(6

(6

(6

(b

(6

(t>

(t> (6

(b

(b

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(6

(b

KTb OCC

TAbINX

X(6) .

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

UkS 37 TI

, AbCENDI

"ACCEPT"

"ACCESS"

"ASSIGN"

"AUTHOR"

"BEFORE"

"BOTTOM"

"CANCEL"

"COLUMN"

"DELETE"

"DETAIL"

"DIVIDE"

"ENABLE"

"EXTEND"

"FILLER"

"GIVING"

"LENGTh"

"LIMITS"

"LINAGE"

"MEMORY"

"NATIVE"

"NUMBER"

"OCCURS"

"OUTPUT"

"QUOTES"

"RANDOM"

"RECORD"

"REPORT"

"RETURN"

"REWIND"

"SEARCH"

"SELECT".

"SOURCE"

"SPACES"

"STATUS"

,

"STRING"

"VALUES"

"ZEROES"

Mt.S

NG KEY K(>

03

k)3

FILLER

FILLER

PIC X(7)

PIC X(7)

VAl-UE "compute"

VALUE "COWTROL"

-16-
03 FILLER PIC X (7) VALUE "DISABLE"

03 FILLER PIC X J) VALUE "DISPLAY"

03 FILLER PIC X J) VALUE "DYNAMIC"

TM^ • •••••• A # 03 FILLER PIC X J) VALUE "FOOTING"

03 FILLER PIC X [1) VALUE "GREATER"

u3 FILLER PIC X (7) VALUE "ttEADiNG"

03 PIC X [1) VALUE "INDEXED"

03 FILLER PIC X 17) VALUE "Initial" . 03 FILLER PIC X 17) VALUE "INSPECT"

u3 filllr PIC X 17) VALUE "INVALID"

1^3 FILLER PIC X [7) VALUE "leading" . 03 FILLER PIC X 117) VALUb "linkage" . 1^3 FILLER PIC XI17) VALUE "MESSAGE"

03 FILLER PIC X 1 7) VALUE "WODULES "

03 FILLER PIC X 7) VALUE "numeric" . 03 FILLER PIC X 7) VALUE "omitted" . 03 FILLER PIC XI 7) VALUE "PERFORM"

03 FILLER PIC X 7) VALUE "PICTURE"

03 FILLER PIC X 7) VALUE " POINTER"

03 FILLER PIC X 7) VALUE "PROCEED"

03 FILLER PIC X 7) VALUE "PROGRAM"

03 FILLER PIC X 7) VALUE "RECEIVE"

03 FILLER PIC Xi 7) VALUE " RECORDS "

03 FILLER PIC Xi 7) VALUE "RELEASE"

03 FILLER PIC X 7) VALUE "REMOVAL"

03 FILLER PIC X 7) VALUE "RENAMES"

03 FILLER PIC X J) VALUE "REPORTS"

03 FILLER PIC x< 7) VALUE "RESERVE"

03 FILLER PIC X 7) VALUE "REWRITE"

03 FILLER PIC Xi 7) VALUE "ROUNDED"

03 FILLER PIC Xi 7) VALUE "SECTION"

03 FILLER PIC Xi 7) VALUE "SEGMENT"

03 FILLER PIC x< 7) VALUE "THROUGH"

03 FILLER PIC XI 7) VALUE "VARYING"

0 2 STR7 REDEFINES RT7 OCCURS 36 TIMES

t>Y TAbINX, ASCENDING k^EY K7.

k(2 KTb.

k)4 K7 pic A(7) •

03 FILLER PIC A(b) VALUE "CODE-SET"

03 FILLER PIC X(tf) VALUE "CONTAINS"

03 FILLER PIC X(b) VALUE "CONTROLS"

03 FILLER PIC X(b) VALUE "CURRENCY"

03 FILLER PIC X(8) VALUE "DIVISION"

03 FILLER PIC X(8) VALUE "GENERATE"

03 FILLER PIC X(8) VALUE "INDICATE"

03 FILLER PIC X(8) VALUE "INITIATE".

03 FILLER PIC X(8) VALUE "MULTIPLE"

03 FILLER PIC X(8) VALUE "MULTIPLY"

03 FILLER PIC X(8) VALUE "NEGATIVE"

03 FILLER PIC X(8) VALUE "OPTIONAL"

03 FILLER PIC X(8) VALUE "OVERFLOW"

03 FILLER PIC X(8) VALUE "POSITION"

-17-
k}3 k'lLLtlR PIC

U3 FILLEK PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

03 FILLER PIC

0 2 STR8 REDEFIMES KT8

INDEXED BY TABINX,

kl4 K& PIC X(8) . 0 2 KT9.

03 FILLER PIC X(d

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(^

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

k>3 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

03 FILLER PIC X(9

02 STR9 REDEFINES KT9 OCCURS

INDEXED BY TABINX,

04 K9 PIC X(9)

02 KT10.

03 FILLER PIC X(10)

03 FILLER PIC X(10)

03 FILLER PIC X(10)

03 FILLER PIC X(10)

03 FILLER PIC X(10)

03 FILLER PIC X(I0)

03 FILLER PIC X(I0)

03 FiLLLK PIC X(ild)

k^3 FILLER PIC X(ik))

1^3 FILLER PIC X(10)

X(&) VALUE

X(&) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

X(8) VALUE

OCCURS 30 TIMES

ASCENDING KEY

"POSITIVE

"PRINTIWO

"RELATIVE

"REVERSED

"SECURITY

"SENTENCE

"SEPARATE

"SEQUENCE

"STANDARD

"SUBTRACT

"SUPPRESS

"SYMBOLIC

"TALLYING

"TERMINAL

"TRAILING

"UNSTRING

K8

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

18 TI

ASCENDI

"ADVANCING"

"ALTERNATE"

"ASCENDING"

"CtiARACTER"

"COLLATING"

"DEBUGGING"

"DELIMITED".

"DELIMITER"

"DEPENDING"

"EXCEPTION"

"JUSTIFIED"

"LOW-VALUE".

"PROCEDURE"

"REDEFINES"

"REMAINDER"

"REPLACING".

"REPORTING"

"TERMINATE"

MES

NG KEY K9.

VALUE "ALPHABETIC

VALUE "CHARACTERS

VALUE "DEBUG-ITEM

VALUE "DEBUG-LINE

VALUE "DEBUG-NAME

VALUE "DEBUG-SUBi

VALUE "DEBUG-SUB2

VALUE "DEBUG-SUB3

VALUE "DESCENDING

VALUE "DUPLICATES

-id-
PIC

PIC

PIC

PIC

PIC

PIC

PIC

PIC

X(10)

X(lt))

X(10)

x(ia)

X(lk))

K(lki)

X(lk))

X(lk))

KTIkJ OCC

TAblWX,

X(lld) .

id 3 FILLER

k)3 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

02 STR10 REUEFINEb

i^lDEXED bY

04 K10 PIC

0 2 KTii.

03 FILLER PIC A

03 FILLER PIC X

03 FILLER PIC X

03 FILLER PIC X

03 FILLER PIC X

03 FILLER PIC X

03 FILLER PIC X

03 FILLER PIC X

03 FILLER PIC X

02 STRli REDEFINES KTli

INDEXED BY TABI

04 Kll PIC X(ll

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

URS lb

ASCEUDI

"HICh-VALUE'

"LOW-VALUES'

"PROCEDURES'

"PROCRAM-ID'

"REFERENCES'

"SEUUENTIAL'

"SORT-MERGE'

"STANDARD-1'

TIMES

NO KEY K10.

(11) VALUE

(11) VALUE

(11) VALUE

(11) VALUE

(11) VALUE

(11) VALUE

(11) VALUE

(11) VALUE

(11) VALUE

OCCURS ^ TIMES

NX, ASCENDING KEY Kll

) .

"CLuCK-UwlTS

"DESTINATION

"END-OF-PA(aE

"ENVIRONMENT

"tllGtt-VALUES

"I-O-CONTROL

"SUB-UUEUE-1

"SUB-^UEUE-2

"SUB-UUEUE-3

02 KT12

0 2 STRl

02 KT13

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

03 FILLER PIC X(

2 REDEFINES KT12

INDEXED BY TABIN

04 K12 PIC X(12)

12)

12)

12)

12)

12)

12)

12)

12)

12)

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

VALUE

OCCURS 9 T

X« ASCENDI

"DATE-WRITTEN"

"DECLARATIVES'

"FILE-CONTROL'

"INPUT-OUTPUT'

"INSTALLATION'

"LINE-COUNTER'

"ORGANIZATION'

" PAGE-COUNTER'

"SYNCHRONIZED*

IMES

NG KEY K12.

^3 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

03 FILLER

02 STR13 REDEFINES

INDEXED BY

04 K13 PIC

PIC X(13) VALUE

PIC X(13) VALUE

PIC X(13) VALUE

PIC X(13) VALUE

PIC X(13) VALUE

PIC X(13) VALUE

PIC X(13) VALUE

PIC X(13) VALUE

KT13 OCCURS 8 TIMES

TABINX, ASCENDING KEY K13.

X(13)

" CUMMUN

Cat I ON

"COMPUTATIONAL'

"CONFIL.URATIUN'

"CORRESPONDIwG'

"uATt-CUMPlLED'

"DECIMAL-POINT'

"SEGMENT-LIMIT'

"SPECIAL-NAMES'

02 KT14

03 FILLER PIC X(14) VALUE

03 FILLER PIC X(14) VALUE

'DEBUG-CONTENTS"

'IDENTIFICATION"

-19
iJ3 FILLER eiQ X(i4) VALUL "LiWAGL-COOWTLK"

k)2 bTKl4 KLDLFIMES KT14 UCCUKS j 'i'II4Lb

U4 Ki4 PIC X(i4) .

Id 2 KT15

03

03

03

VALUE

VALUE

VALUE

"UbJECT-CUMPUTEK"

"SOUKCE-COWPUTEK"

"WOKKINii-bTUKAbE"

02

FILLER PIC X(15)

FILLER PIC X(I5)

FILLER PIC X(15)

STR15 REDEFINES KT15 OCCURS 3 TIMES

INDEXED bY TABINX, ASCENDING KE^ K15.

04 K15 PIC X(15)

01 TOKEN-RECORD.

02 TOKEN-LEN PIC S9(5) COMP SYNC.

02 TOKEN-SIZE PIC S9(5) COMP SYNC.

0 2 TOKEN.

03 TOKEN-CaR PIC X OCCURS

03 TOKEN-PUNC PIC X.

01 TMASK-RECORD REDEFINES TOKEN-RECORD.

02 TMASK-LEN PIC S9(5) COMP SYNC.

02 TMASK-SI2E PIC S9(5) COMP SYNC.

02 TMASK.

TMASK-CtiR PIC X(50).

TTl REDEFINES TWASK-CHR.

50 TIMES

03

03

0 3 TT2

03 TT3

0 3 TT4

03 TT5

03 TT6

0 3 TT7

13 TT8

03 TT9

0 3 TT10

04 Tl PIC

04 FILLER

REDEFINES

04 T2 PIC

04 FILLER

REDEFIi^ES

0 4 T3 PIC

04 FILLER

REDEFINES

04 T4 PIC

04 FILLER

REDEFINES

04 T5 PIC

04 FILLER

REDEFINES

04 T6 PIC

04 FILLER

REDEFINES

04 T7 PIC

04 FILLER

REDEFINES

04 T8 PIC

04 FILLER

REDEFINES

04 T9 PIC

04 FILLER

REDEFINES

X(l) . PIC X(49)

TWASK-CriR.

X(2) . PIC X(4b)

TMASK-CHR.

X(3) . PIC X(47)

TMASK-CtiR.

X(4) , PIC X(46)

TMASK-CiiR.

X(5) . PIC Xi45)

TMASK-CHR.

X(6) . PIC X(44)

TMASK-ChR.

X(7) . PIC X(43)

TMASK-CtiR.

X(8) . PIC X(42)

TMASK-CHR.

X(9) . PIC X(41)

TMASK-ChR.

04 T10 PIC X(l0)

04 FILLER PIC X(40)

-2w-
03 TTll REDEFINES TMASK-CHR.

04 Til PIC X(ll)

04 FILLER PIC X(39)

03 TT12 REDEFINES TMASK-CHR.

04 T12 PIC X(12)

04 FILLER PIC X(38)

03 TT13 REDEFINES TMASK-CHR.

04 T13 PIC X(13)

04 FILLER PIC X(37)

03 TT14 REDEFINES TMASK-CHR.

kJ4 T14 PIC X(14) . 04 FILLER PIC X(3b)

03 TTiS REDEFINES TmASK-CHR.

04 Tib PIC X(lb)

04 FILLER PIC X(35)

0 3 TMASK-PUNC PIC X.

01 MISC-STAT.

0 2 NSENT

02

02

02

02

02

01 OUT-TEXT.

02 0-ST.

PiC Sy(lW) CUMP SYwC.

NRESw PIC S^dw) CUMP S^nC.

Ni^RESkv PIC b^(ly) CUMP o^NC.

SUMNRL PIC S9(lW) CUMP SYNC.

SUMNRL2 PIC S!^(10) CUMP SYNC

CARDCT PIC S9(4) CUMP SYNC.

PERIOD TERMINATES

IN ALL.

03 FILLER PIC X(40)

VALUE " SENTENCES

03 FILLER PIC X(40)

VALUE " RESERVED WORDS

03 FILLER PIC X(40)

VALUE " NON-RESERVED TOKENS,

03 FILLER PIC X(40)

VALUE " AVERAGE N-R

03 FILLER PIC X(40)

VALUE " VARIANCE IN

03 FILLER PIC X(40)

VALUE " TOTAL RESVD

1^3 FILLER PIC X(40)

VALUE " CARD IMAGES

CALLED N-R BELOW

LENGTH.

LENGTH OF N-R TOKENS

WORDS AND N-R TOKENS

02

U2

U-SM REDEFINES U-ST

UCCURS 7 TIMES

u-b PIC Si^ (10) vi^yi^y

UCCURS 7 TIMES

PIC

READ.

X(4id)

INDEXED bY I INDEXED E^ I Ul PEINE.

02

U2

L PIC X(bl)

LXL REDEFINES L.

W3 P-TUK PIC X(15)

U3 L-REST UCCURS y

04 L-FIELD

TIMES ItiULHiLU

PIC Z (4) . bY PCTR.

7 7 PCTR PIC S9(7) CUMP SYNC.

7 7 P-T0K2 PIC X(15)

-21-
77 IN-CtiK PIC X.

7 7 iW-PTii PIC Sy(5) COiyiP SYNC.

77 I PIC Sy(5) COWP SYWC.

77 'iOKEW-istb PIC by (5) COHP SYiNiC.

77 TOKEN-PTk PIC i>y(5) CUwP SYImC.

77 TAblWX, PIC Syy, CUWPUTATIUNAL SYwC.

7 7 'It.WPK PIC Sy(ib) CUWP 5YWC.

77 w'l^ ^i*- sy(5)vyy cuhp sywc.

77 yTi PIC sy(i0)vyyyy cuwp sywc.

77 wT2 PIC sy (ikj) vyyyy cuwp sywc.

PROCEDURE DIVISION.

Note: Use of DISPLAY is system-dependent,

as is COMP SYNC above.

START.

*

NEWST.

MISC-STAT (COMP SYNC) AUTO SET TO 0 'S

WOVE ZEROES TO KW-STAT.

OPEN OUTPUT NKEYS.

OPEN INPUT TXT.

WOVE 1 TO IN-PTR.

READ TXT RECORD INTO CARD AT END

PERfORW PI VARYING I FROW 1 BY i UNTIL

PERPORW P2 VARYING I FROW 1 BY 1 UNTIL

PERFORW Pi VARYING I FROW i bY 1 UNTIL

PERFORW P4 VARYING I FROW i BY i UNTIL

PERFORW P5 VARYING I FROW i t>Y i UNTIL

PERFORi'i P6 VARYING I FROW 1 BY 1 UNTIL

PERFORW P7 VARYING I FROW I BY i UNTIL

PERF0Ri4 Ptt VARYING I FROW 1 BY i UNTIL

PERFORIN Py VARYING i FROW I eY i UNTIL

PERFORW Plk^ VARYING I FROW i BY I UNTIL

PERFORW Pli VARYING I FROW i BY i UNTIL

PERFORW PI 2 VARYING I FROW 1 BY 1 UNTIL

PERFORi>l Pi 3 VARYING I FROW 1 BY 1 UNTIL

PERFORM P14 VARYING I FROM 1 BY 1 UNTIL

PERFORW Pi5 VARYING I FROW 1 BY 1 UNTIL

MOVE NSENT TO 0-S (1)

,

MOVE NRESW TO 0-S (2),

MOVE NNRESW TO 0-S (3)

,

DIVIDE SUMNRL BY NNRESW GIVING gT0

,

MOVE gT0 TO 0-S ( 4 )

,

MULTIPLY QT0 BY QT0 GIVING QTl,

DIVIDE SUWNRL2 BY NNRESW GIVING QT2,

SUBTRACT QTl FROW QT2 GIVING 0-S (5)

,

ADD NRESW« NNRESW GIVING 0-S (6)

,

WOVE CARDCT TO 0-S (7),

PERFORW PP VARYING I FROW 1 BY 1 UNTIL I

7,

24,

^i,

47,

36,

37,

3b,

3u

,

itt,

lb,

9,

9,

Q,

3,

3,

> 7,

22-
PERFORM XREF,

GO TO N-TERM.

ADD 1 TO CARDCT.

* DISPLAY CARD.

REG.

PERFORM EXTRACT-TOKEti.

IF IN-PTR IS GREATER THAN 72 GO TO NEWST

ELSE GO TO REG.

EXTRACT-TOKEN SECTION.

EXT-NON-BLANK-LOOP

IF IN-COL (IN-PTR) IS NOT LgUAL TO SPACE

GO TO EXT-NON-BLANK-FOUND.

ADD 1 TO IN-PTR.

IF IN-PTR IS WOT GREATER THAN 7 2

GO TO EXT-NON-BLANK-LOOP.

MOVE k) TO TOKEN-bliE.

TO EXT-EXT.

bXT-WOW-BLANK-FUUWU

WOVE Iw-CUL (IN-PTR) TO IN-CttR.

WOVE IN-PTR TO TOKEN-BUd.

MOVE SPACES TO TOjvEN.

MOVE i TO I

MOVE k) TO TOKEN-PTR.

EXT-CttR-LOOP.

IF IN-CBR IS EgUAL TO ^UOTE

GO TO EXT-N-N-LITERAL.

EXT-CHR-L00P2.

IF IN-CBR IS EQUAL TO SPACE

OR IN-ChR IS EQUAL TO '

,

' OR

IN-CHR IS EQUAL TO ';'

OR IN-CHR IS EQUAL TO '

.

ADD 1 TO IN-PTR

GO TO EXT-TOKEN-END.

ADD 1 TO TOKEN-PTR.

MOVE IN-CHR TO TOKEN-CHR (TOKEN-PTR)

ADD 1 TO IN-PTR.

IF IN-PTR IS NOT GREATER THAN 72

WOVE IN-COL (IN-PTR) TO IN-CHR

IF IN-CHR IS NOT EQUAL TO '('

GO TO EXT-CHR-L00P2

ELSE

IF TOKEN-CHR (TOKEN-PTR) IS EQUAL TO '('

GO TO EXT-CHR-L00P2.

WOVE SPACE TO iN-CtlR.

EaT-TUKEN-END.

IF iN-CHR IS EQUAL TO '.'

AWU IN-PTR IS NOT GiiEATER THAN 72

IF iw-COL (IN-PTR) IS NUMERIC

UR IN-COL (IN-PTk)

IS EQUAL TO 'e'

ADD i TO TOKEN-PTR

MOVE IN-CHR TO TOKEN-CHR (TOKEw-PTR)

-23-
WOVE IN-CQL (IN-PTR) TO IN-CHK

GO TO £.XT-ChK-LOOP2

,

LLbE ADD 1 TO IMSLMT.

WOVE iN-ChK TO TOKEN-PUnC.

MOVE TOKEN-PTK TO TOKEM-LEW.

hUu TOKEiM-LEN I OIVliNKa T0KEW~SI2.E.

IF TOKEW-PUI^^C IS WOT EWUAL TO bPACE

ADD i TO TOKEM-blZE.

bO TO EXT-i:.XlT.

EAT-W-lM-LiTEKAL

ADu i TO TOKEW-PTK.

rtuVE IN-CriK TO TOJS.EU-Chi< (TOKEN-PTK) . ADD 1 TO IlM-PTk.

If IW-PTR lb GKEATEK TriAM 72

GO TO EXT-N-N-LIT-EWD.

If IN-ChR EUUALS OCiOTE

If IN-COL (IN-PTR) EgUALS QUOTE

ADD 1 TO IN-PTR

ELSE IF TOKEN-PTR GREATER

ThAN 1 GO TO EXT-N-N-LIT-END.

WOVE IN-COL (IN-PTR) TO IN-CHR.

GO TO EXT-N-N-LITERAL.

EXT-N-N-LIT-END.

MOVE SPACE TO TOKEN-PUNC.

MOVE TOKEN-PTR TO TOKEN-LEN.

ADD TOKEN-LEN 1 GIVING TOKEN-SIZE.

PERfORM NEXIT.

GO TO EXT-EXT.

EXT-EXIT.

PERfORM CLASSIf Y-TOKEN.

EXT-tXT.

EXIT.

CLASSIf Y-TOKEN SECTION.

If TOKEN-LEW IS LiREATER ThAN lb

GO TO NEXIT

ELSE GU TO Li, L2, L3, L4, L5, Lb, L7 , L6 , L'^

,

LikI, LIT, Li2, LiJ, Ll4, Lib

DEPEWDIWG ON TOKEN-LEW.

Li.

SEARCh ALL STRi, AT EWD MOVE TO TASINX,

GO TO WEXIT; WHEN Ki (TAblWX) = Ti

ADD i TO Kwi (TABINX) , ADD 1 TO NRESw, GO TO CLASTOK-EXIT

L2.

SEARCd ALL STR2 , AT END MOVE 0 TO TABINX,

GO TO NEXIT; fevHEN K2 (TABINX) = T2

ADD i TO KW2 (TABINX)

,

ADD i TO NRESW, GO TO CLASTOK-EXIT.

L3.

SEARCH ALL STR3 , AT END MOVE 0 TO TABINX,

GO TO NEXIT; WHEN K3 (TABINX) = T3

ADD 1 TO KW3 (TABINX)

,

-24-
hUU 1 TU iMKESW, GO TO CLAbTUK-LXIT.

L4.

bEAKCH ALL STK4 , AT LWD WUVL id TO TABIWX,

GO TO NEXIT; V«HEW K4 (TAbINX) = T4

ADD 1 TO KW4 (TABINX)

,

ADD 1 TO NKESW, GO TO CLASTOK-EXIT

L5.

SEARCH ALL STR5 , AT END MOVE 0 TO TABINX,

GO TO NEXIT; WHEN K5 (TABINX) = T5

ADD 1 TO KW5 (TABINX)

,

ADD 1 TO NKESW, GO TO CLASTOK-EXIT

L6.

SEARCh ALL STR6 , AT END MOVE k) TO TAbINX,

GO TO NEXIT; WHEN Kb (TABINX) = To

ADD i TO Kwfa (TABINX)

,

ADD 1 TO NRESW, GO TO CLASTOK-EXIT.

L7.

SEARCH ALL STk7 , AT END HOVE TO TABINa,

TO NEXIT; WHEN K7 (TAbINX) = T7

ADU 1 TO KW7 (TAbliMX) , ADD i TU WRESw, KjU TU CLASTOK-tXlT,

L6.

SEARCH ALL STR8, AT END HOVE ki TO TABlwX,

GO TO NEXIT; WHEN Kb (TABINX) = Tb

ADD 1 TO RWti (TABINX)

,

ADD i TO NRESW, GO TO CLASTOK-EXIT.

Lb^.

SEARCH ALL STR9 , AT END MOVE 0 TO TABINX,

GO TO NEXIT; WHEN K9 (TABINX) = T9

ADD 1 TO KW9 (TABINX)

,

ADD 1 TO NRESW, GO TO CLASTOK-EXIT.

L10.

SEARCH ALL STR10, AT END MOVE 0 TO TABINX,

GO TO NEXIT; WHEN K10 (TABINX) = T10

ADD 1 TO KW10 (TABINX)

,

ADD 1 TO NRESW, GO TO CLASTOK-EXIT.

Lll.

SEARCH ALL STRll, AT END MOVE 0 TO TABINX,

GO TO NEXIT; WHEN Kll (TABINX) = Til

ADD 1 TO KWll (TABINX)

,

ADD 1 TO NRESW, GO TO CLASTOK-EXIT.

L12.

SEARCH ALL STR12, AT END MOVE 0 TO TABINX,

GO TO NEXIT; wHEw K12 (TABINX) = Tl^

ADD 1 TO KW12 (TABINX)

,

ADD 1 TO NRESw, GO TO CLASTOK-EXIT.

L13.

SEARCtt ALL STR13, AT cND MOVE 0 TU TABlWA,

OO TO NEXIT; WHEN Kli (TabIwX) = TlJ

ADD 1 TO KW13 (TABINX)

,

ADD 1 TO NRESW, GO TO CLASTOK-EXIT.

-25-
L14.

Lib.

SEARCH ALL STR14, AT £ND HOVE 0 TO TABINX,

GO TO NEXIT; WHEN Ki4 (TABINX) = T14

ADD 1 TO KW14 (TABINX)

,

ADD 1 TO WRESW, 00 TO CLASTOK-EXIT

SEARCh ALL STR15, AT EMD HOVE k) TO TABINX,

OU TO NEXIT; WhEN Ki5 (TABINX) ^ T15

ADD 1 TO KM 15 (TABINX)

,

OO TO CLABTOK-EXIT.

NEXIT.

It Ti > "(g" AND Ti < "I"

ADD 1 TO MNREBM,

ADD TOKEN-LEN TO SUMNKL,

MULTIPLY TOKEN-LEN BY TOKEN-LEN OIVINO TEHPR,

ADD TEHPR TO SUMNRL2,

WOVE T15 TO TTOKK,

WOVE CARDCT TO TLEN,

WRITE T-REC.

CLASTOK-EXIT.

EXIT.

PRETTY-PRINT SECTION.

PI.

P2.

P3.

P4.

P5.

Pb.

p7.

Pti.

PS^

PXk).

Pli.

P12.

P13.

P14.

P15.

IF KWl { > 0 DISPLAY STRl (I V M ...

n ,KW1 (I

IF KW2 1[I) > 0 DISPLAY STR2 (I V n ...

n ,KW2 (I

IF KW3 1 > 0 DISPLAY STR3 (I ...

II ,KW3 (I

IF KW4 1 > 0 DISPLAY STR4 (I ...

•1 rKW4 (I

IF KW5 1 > 0 DISPLAY STR5 (I ...

II ,KW5 (I

IF Kw6 < > 0 DISPLAY STRb (I . • « H rKMb (I

IF Km7 ( > 0 DISPLAY STR7 (I ...

H ,Km7 (I

IF KMb ( > 0 DISPLAY STRti (I ...

H rKwb (I

IF KMi^ ( > U DISPLAY STR9 (I \ M ...

H rKWi^ (I

IF KMi0 (I) > 0 DISPLAY BTR10 (I) It # • . " ,Km10

IF KMll (I) > 0 DISPLAY STRll (I) H

t • ,KWll

IF KW12 (I) > 0 DISPLAY STR12 (I) n

1 • .",KW12

IF KWl 3 (I) > 0 DISPLAY STR13 (I) N

/ •

. ",KW13

IF KW14 (I) > 0 DISPLAY STR14 (I) N

f • .••,KW14

IF KWl 5 (I) > 0 DISPLAY STR15 (I) II

, " ,KW15

-26
UlSPLAY U-b (I), 0-SW (I),

Hhi^f SLCTIOM.

CLOSE NKLYS,

SOKT SORT-FILE ASCENDING KEY A,b

USING NKEYS GIVING NKEYS

,

OPEN INPUT NKEYS.

MOVE 0 TO PCTR.

MOVE SPACES TO P-T0K2.

MOVE SPACES TO L.

XK.

READ NKEYS INTO T-REC AT END

IF PCTR > k) DISPLAY PEINE, GO TO N-TERil

ELSE GO TO N-TERM.

IF TTOKK = P-T0K2

IF PCTR = 9

DISPLAY PEINE,

WOVE SPACES TO L,

MOVE 1 TO PCTR,

MOVE TLEW TO L-FIELD (PCTR)

,

ELSE ADD i TO PCTR,

WOVE TLEw TU L-FILLD (PCTR)

DISPLAY t^LlNE,

WuVE SPACES TO L,

WOVE TTOKK TO P-TOK

,

WOVE TTOKK TO P-TOK2

,

WOVE 1 TO PCTR,

MOVE TLEN TO L-FlELD (PCTR)

GO TO XR.

N-TERM

DISPLAY "*** NORMAL TERi«lINATION ***•*.

STOP RUN.

ill -27-
NBS-1 14A (REV. 7-73)

U.S. DEPT. OF COMM. BIBLIOGRAPHIC DATA

SHEET

1. PUiiLK A ] ION OR KEPORT NO. NBS SP 500-26

2. Gov't Accession

No.

3. Recipient's Accession No.

4. TITl.l-; AND SUBI ITIJ';

COBOL Instrumentation and Debugging: A Case Study

5. Publication Date January 1978

6. Performing Organization Code

7. AUTHOR(S) ^1 T Gordon Lyon 8. Performing Organ. Report No.

9. PERFORMING ORGANIZATION NAME AND ADDRESS

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

10. Proiect/ 1 ask/Work Unit No.

1!. Contract/Grant No.

12. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP)

Same as 9.

13. Type of Report & Period Covered Final

14. Sponsoring Agency Code

IS. SUPPLEMENTARY NOTES

Library of Congress Catalog Card Number: 77-608347

16. ABSTRACT" (A 200-word or less (actual summary ot most sigpificant information. II document includes a significant

bibliography or literature survey, mention it here.) Traditionally COBOL has been run in batch execution and debugged through abnormal

terminations; indeed, whole books have been devoted to deciphering COBOL core

dumps. With modern equipment there is little excuse for writing COBOL source

code this way. A carefully chosen example (a COBOL program to tally reserved

words and cross-reference other tokens) is used as a vehicle for an examination

of a contemporary COBOL coding experience. COBOL can be written quite fast

interactively, and COBOL programs can be easily tuned if good timing facilities

are available. Strengths and limitations of a current debugging package are highlighted in the case study.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper name; separated by semicolons

)

COBOL; execution monitoring; symbolic debugging; timesharing.

18. AVAILABILITY [X] Unlimited

For Official Distribution. Do Not Release to NTIS

pV"! Order From Sup. of Doc, U.S. Government Printing Office Washington. D.C. 20402. SD Cat. No. C13. 10:500-26

1 1 Order From National Technical Information Service (NTIS)

Springfield, Virginia 221')1

19. SECURITY CLASS

(THIS REPORT)

UNCL ASSIFIED

21. NO. OF PAGES

33

20. SECURITY CLASS

(THIS PAGE)

UNCLASSIFIED

22. Price

USCOMM-DC 29042-P74
There's

anew

look

to.,.

. . . the monthly

magazine of the National Bureau of Standards.

Still featured are special articles of general interest on

current topics such as consumer product safety and building

technology. In addition, new sections are designed to . . . PROVIDE

SCIENTISTS with illustrated discussions

of recent technical developments and

work in progress . . . INFORM INDUSTRIAL

MANAGERS of technology transfer activities in Federal and private labs. . . DESCRIBE TO MANUFACTURERS advances in the field of voluntary and

mandatory standards. The new DIMENSIONS/NBS also

carries complete listings of upcoming conferences to be

held at NBS and reports on all the latest NBS publications,

with information on how to order. Finally, each issue carries

a page of News Briefs, aimed at keeping scientist and consumalike up to date on major developments at the Nation's physical sciences and measurement laboratory.

(please detach here) SUBSCRIPTION ORDER FORM

Enter my Subscription To DIMENSIONS/NBS at $12.50. Add $3.15 for foreign mailing. No additional postage is required for mailing within the United States or its possessions. Domestic remittances should be made either by postal money order, express money order, or check. Foreign remittances should be made either by international money order, draft on an American bank, or by UNESCO

coupons.

Send Subscription to:

Q Remittance Enclosed (Make checks payable

to Superintendent of Documents)

n Charge to my Deposit Account No.

NAME-FIRST, LAST

COMPANY NAME OR ADDITIONAL ADDRESS LINE

STREET ADDRESS

I I I I I I I I I I I I I I I I I I I

MAIL ORDER FORM TO:

Superintendent of Documents Government Printing Office Washington, D.C. 20402

PLEASE PRINT

ANNOUNCEMENT OF NEW PUBLICATIONS ON

COMPUTER SCIENCE & TECHNOLOGY

Superintendent of Documents,

Government Printing Office,

Washington, D. C. 20402

Dear Sir:

Please add my name to the announcement list of new publications to be issued in the series: National Bureau of Standards Special Publication 500-.

Name

Company

Address

City State Zip Code

(Notification key N-503)

NBS TECHNICAL PUBLICATIONS

PERIODICALS

I JOURNAL OF RESEARCH—The Journal of Research

of the National Bureau of Standards reports NBS research and development in those disciplines of the physical and

engineering sciences in which the Bureau is active. These

include physics, chemistry, engineering, mathematics, and computer sciences. Papers cover a broad range of subjects, with major emphasis on measurement methodology, and

the basic technology underlying standardization. Also in- cluded from time to time are survey articles on topics closely

related to the Bureau's technical and scientific programs. As

a special service to subscribers each issue contains complete

citations to all recent NBS publications in NBS and non- NBS media. Issued six times a year. Annual subscription: domestic $17.00; foreign $21.25. Single copy, $3.00 domestic;

'$3.75 foreign. Note: The Journal was formerly published in two sections: Section A "Physics and Chemistry" and Section B "Mathematical Sciences." DIMENSIONS/NBS

This monthly magazine is published to inform scientists, engineers, businessmen, industry, teachers, students, and

consumers of the latest advances in science and technology,

with primary emphasis on the work at NBS. The magazine

highlights and reviews such issues as energy research, fire protection, building technology, metric conversion, pollution

abatement, health and safety, and consumer product per- formance. In addition, it reports the results of Bureau pro- grams in measurement standards and techniques, properties

of matter and materials, engineering standards and services, instrumentation, and automatic data processing.

Annual subscription: Domestic, $12.50; Foreign $15.65.

Monographs—Major contributions to the technical liter- ature on various subjects related to the Bureau's scientific and technical activities. Handbooks—Recommended codes of engineering and industrial practice (including safety codes) developed in cooperation with interested industries, professional organizations, and regulatory bodies. Special Publications—Include proceedings of conferences sponsored by NBS, NBS annual reports, and other special

publications appropriate to this grouping such as wall charts, pocket cards, and bibliographies.

Applied Mathematics Scries—Mathematical tables, manuals, and studies of special interest to physicists, engineers,

chemists, biologists, mathematicians, computer programmers,

and others engaged in scientific and technical work.

National Standard Reference Data Series—Provides quantitative data on the physical and chemical properties of

materials, compiled from the world's literature and critically evaluated. Developed under a world-wide program co- ordinated by NBS. Program under authority of National

Standard Data Act (Public Law 90-396).

NOTE: At present the principal publication outlet for these data is the Journal of Physical and Chemical Reference Data (JPC'RD) published quarterly for NBS by the American Chemical Society (ACS) and the American Institute of

Physics (AIP). Subscriptions, reprints, and supplements

available from ACS, 1155 Sixteenth St. N.W., Wash., DC

20056.

Building Science Scries—Disseminates technical information developed at the Bureau on building materials, components,

systems, and whole structures. The series presents research

results, test methods, and performance criteria related to the structural and environmental functions and the durability and safety characteristics of building elements and systems. Technical Notes—Studies or reports which are complete in themselves but restrictive in their treatment of a subject.

Analogous to monographs but not so comprehensive in scope or definitive in treatment of the subject area. Often

serve as a vehicle for final reports of work performed at NBS under the sponsorship of other government agencies.

Voluntary Product Standards—Developed under procedures

published by the Department of Commerce in Part 10, Title 15, of the Code of Federal Regulations. The purpose

of the standards is to establish nationally recognized require- ments for products, and to provide all concerned interests with a basis for common understanding of the characteristics of the products. NBS administers this program as a supple- ment to the activities of the private sector standardizing

organizations.

Consumer Information Series—Practical information, based on NBS research and experience, covering areas of interest

to the consumer. Easily understandable language and

illustrations provide useful background knowledge for shopping in today's technological marketplace.

Order above NBS publications from: Superintendent of Documents, Government Printing Office, Washington, D.C.

20402. Order following NBS publications—NBSIR's and FIPS from

the National Technical Information Services, Springfield, Va. 22161.

Federal Information Processing Standards Publications (FIPS PUB)—Publications in this series collectively constitute the Federal Information Processing Standards Register.

Register serves as the official source of information in the Federal Government regarding standards issued by NBS

pursuant to the Federal Property and Administrative Services Act of 1949 as amended, Public Law 89-306 (79 Stat. 1127), and as implemented by Executive Order 11717

(38 FR 12315, dated May 11, 1973) and Part 6 of Title 15 CFR (Code of Federal Regulations).

NBS Interagency Reports (NBSIR)—A special series of

interim or final reports on work performed by NBS for outside sponsors (both government and non-government).

In general, initial distribution is handled by the sponsor;

public distribution is by the National Technical Information

Services (Springfield, Va. 22161) in paper copy or microfiche form.

BIBLIOGRAPHIC SUBSCRIPTION SERVICES

The following current-awareness and literature-survey bibli- ographies are issued periodically by the Bureau:

Cryogenic Data Center Current Awareness Service. A litera- ture survey issued biweekly. Annual subscription: Domestic, $25.00; Foreign, $30.00.

Liquified Natural Gas. A literature survey issued quarterly.

Annual subscription: $20.00.

Superconducting Devices and Materials. A literature survey

issued quarterly. Annual subscription: $30.00. Send subscription orders and remittances for the preceding bibliographic

services to National Bureau of Standards, Cryogenic Data

Center (275.02) Boulder, Colorado 80302.
U.S. DEPARTMENT OF COMMERCE

IMational Bureau of Standards

Washington. D C. 20234

OFFICIAL BUSINESS

Penalty for Private Use, $300

POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE COM-2 1 5

SPECIAL FOURTH-CLASS RATE BOOK