Works Records System
Encyclopedia
The Works Records System (WRS) , was an IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

 mainframe
Mainframe
Mainframe may refer to either of the following:* Mainframe computer, large and powerful data processing systems* Mainframe Entertainment, a Canadian computer animation and design company* Mainframe , a 1980s Electropop band...

 based spreadsheet
Spreadsheet
A spreadsheet is a computer application that simulates a paper accounting worksheet. It displays multiple cells usually in a two-dimensional matrix or grid consisting of rows and columns. Each cell contains alphanumeric text, numeric values or formulas...

 designed by Dr. Robert Mais, then an employee of ICI
Imperial Chemical Industries
Imperial Chemical Industries was a British chemical company, taken over by AkzoNobel, a Dutch conglomerate, one of the largest chemical producers in the world. In its heyday, ICI was the largest manufacturing company in the British Empire, and commonly regarded as a "bellwether of the British...

 Mond Division in the UK and developed for the company to monitor chemical plant
Chemical plant
A chemical plant is an industrial process plant that manufactures chemicals, usually on a large scale. The general objective of a chemical plant is to create new material wealth via the chemical or biological transformation and or separation of materials. Chemical plants use special equipment,...

 operations at Runcorn
Runcorn
Runcorn is an industrial town and cargo port within the borough of Halton in the ceremonial county of Cheshire, England. In 2009, its population was estimated to be 61,500. The town is on the southern bank of the River Mersey where the estuary narrows to form Runcorn Gap. Directly to the north...

 and elsewhere in the group. The design was unusual at that time, since it allowed chemical engineers (who were not programmers) to design and create their own interactive applications using a "kit of components" that incorporated mathematical formulae directly linking input fields to calculated output fields in WYSIWYG
WYSIWYG
WYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product...

 fashion.

Overview

The WRS was implemented in 1974 by a team that included Ken Dakin, author of several successful CICS
CICS
Customer Information Control System is a transaction server that runs primarily on IBM mainframe systems under z/OS and z/VSE.CICS is a transaction manager designed for rapid, high-volume online processing. This processing is mostly interactive , but background transactions are possible...

 debugging products that were used extensively during its development crucially to ensure the highest possible performance by detecting "hot spots" (high execution locations) during code execution.
All operations were performed using "double precision
Double precision
In computing, double precision is a computer number format that occupies two adjacent storage locations in computer memory. A double-precision number, sometimes simply called a double, may be defined to be an integer, fixed point, or floating point .Modern computers with 32-bit storage locations...

" floating point arithmetic and user specified formulae that performed calculations and linked cells together. These cells could be in the same sheet (I/O screen) or in completely separate, "remote" spreadsheets in a different application. Formulae could be entered on multiple lines to aid comprehension and used a syntax similar to Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

 (using the familiar infix
Infix notation
Infix notation is the common arithmetic and logical formula notation, in which operators are written infix-style between the operands they act on . It is not as simple to parse by computers as prefix notation or postfix notation Infix notation is the common arithmetic and logical formula notation,...

 notation but with numeric DIR identifiers taking the place of symbolic variable names).

The "Shunting yard algorithm
Shunting yard algorithm
The shunting-yard algorithm is a method for parsing mathematical expressions specified in infix notation. It can be used to produce output in Reverse Polish notation or as an abstract syntax tree...

" invented by Edsger Dijkstra
Edsger Dijkstra
Edsger Wybe Dijkstra ; ) was a Dutch computer scientist. He received the 1972 Turing Award for fundamental contributions to developing programming languages, and was the Schlumberger Centennial Chair of Computer Sciences at The University of Texas at Austin from 1984 until 2000.Shortly before his...

, was used to parse these formulae into Reverse Polish notation
Reverse Polish notation
Reverse Polish notation is a mathematical notation wherein every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as Postfix notation and is parenthesis-free as long as operator arities are fixed...

 (RPN). The resulting RPN formulae were converted (compiled) to machine language snippet
Snippet
A snippet is defined as a small piece of something, it may in more specific contexts refer to:* Sampling , the use of a short phrase of a recording as an element in a new piece of music...

s "on the fly
On the fly
-Colloquial usage:In colloquial use, on the fly means something created when needed. The phrase is used to mean:# something that was not planned ahead# changes that are made during the execution of same activity: ex tempore, impromptu.-Automotive usage:...

" on first use and then stored for subsequent executions (see Memoization
Memoization
In computing, memoization is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously processed inputs...

).This technique is now known as Just-in-time compilation
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

 (JIT) or, more specifically, "incremental compilation
Incremental compiler
The term incremental compiler may refer to two different types of compiler.-Imperative programming:In imperative programming and software development, an incremental compiler is one that when invoked, takes only the changes of a known set of source files and updates any corresponding output files ...

" - but given no label at the time.The instructions were all "built" and executed in CICS dynamic  storage - unique for each transaction
Transaction processing
In computer science, transaction processing is information processing that is divided into individual, indivisible operations, called transactions. Each transaction must succeed or fail as a complete unit; it cannot remain in an intermediate state...

 ("thread
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

" - single user instance of input/processing/output) - to comply fully with the requirements for CICS applications to be quasi-reentrant
Reentrant
In computing, a computer program or subroutine is called reentrant if it can be interrupted in the middle of its execution and then safely called again before its previous invocations complete executing. The interruption could be caused by an internal action such as a jump or call or by an...

.

Optimized calculations

Unlike today's desktop or web-based spreadsheets, multiple input cells could be keyed before committing the central processor
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 to beginning a new task (thread) and performing the more complex validity checks (involving multiple input cells for instance) and calculation or re-calculation. This only ever occurred when the enter key
Enter key
In computer keyboards, the enter key in most cases causes a command line, window form, or dialog box to operate its default function...

 was pressed and only after the modified data was transmitted from the terminal to the mainframe. Thus the overall transaction rate for the CICS transaction processor was significantly reduced, by delays inherent in any manual data entry system, without a corresponding drop in speed of data entry.

If any prerequisite data values were missing (perhaps because a particular tank measurement was unavailable at the time), calculations were postponed until the data was entered. This resulted in a cascade of background calculations that automatically updated (identified) dependent calculated values as soon as that missing input value was keyed. These background calculations were executed asynchronously as CICS "transient data" initiated tasks (therefore only affecting users who might happen to be looking at the particular dependent results at that time).

Historical data

Historical data accumulated organically to form a database of earlier periods on a shift/day/week/year basis - which in turn fed naturally into cumulative sheets for larger periods. This automatically imbued the spreadsheets with depth. Data including "aged" values was stored using a combination of a BDAM and an Adabas
Adabas
ADABAS is Software AG’s primary database management system.- History :First released in 1970, ADABAS is considered by some to have been one of the earliest commercially available database products...

 database (described as a “relational like" database in the Wikipedia article about Adabas, although its relational properties were not fundamental to the operation of the system). The user could examine historical data and even enter earlier "missing" data from earlier periods, causing automatic re-calculations in subsequent sheets (to more accurately reflect a chemical plants actual efficiency for instance).

Data that was entered in a particular sheet effectively resided independently of the input sheet it was entered on, as did the formulae (known as "function groups"). The concept of separation of data, input and calculation fully presaged the method used in Lotus Improv
Lotus Improv
Lotus Improv was a spreadsheet program from Lotus Development that attempted to re-define the way a spreadsheet should work. Instead of treating the grid as the system for referencing data, Improv made all data exist in named ranges. Operations on the data then referred to these names, rather than...

 - 16 years later and considered at the time (in 1990) a major revelation.

(Similar functionality can be achieved with today's spreadsheets but only by using repetition of rows/columns or sheets together with considerable duplication of formulae for each of the periods to be covered - however "future" periods need to be anticipated or added later - as extra rows/columns or sheets.)

Histograms

The 3270 workstation did not support full graphic capability but histogram displays of culmulative column data was optionally provided by displaying vertical columns of X's in response to a program function key
Function key
A function key is a key on a computer or terminal keyboard which can be programmed so as to cause an operating system command interpreter or application program to perform certain actions...

 toggle.

Hardware

The IBM 3270
IBM 3270
The IBM 3270 is a class of block oriented terminals made by IBM since 1972 normally used to communicate with IBM mainframes. As such, it was the successor to the IBM 2260 display terminal. Due to the text colour on the original models, these terminals are informally known as green screen terminals...

 workstation chosen for its implementation at the time was a new "breed
Breed
A breed is a group of domestic animals or plants with a homogeneous appearance, behavior, and other characteristics that distinguish it from other animals or plants of the same species. Despite the centrality of the idea of "breeds" to animal husbandry, there is no scientifically accepted...

" of not so dumb terminals which had some basic built-in hardware validity checking such as 'numeric only' input fields. The 3270 hardware also came equipped, as standard, with the ability to "physically" update a small section of the remote screen buffer (including its text colour, background, input behaviour and other attributes) using a "Write" (modified) command, instead of needing to retransmit the entire screen buffer on every change (anticipating Ajax
Ajax (programming)
Ajax is a group of interrelated web development methods used on the client-side to create asynchronous web applications...

 software technology that re-emerged some 22 years later for web 2.0
Web 2.0
The term Web 2.0 is associated with web applications that facilitate participatory information sharing, interoperability, user-centered design, and collaboration on the World Wide Web...

 based applications and now utilized for online spreadsheets and most other recent applications for similar reasons).

The 3270 Model 2 had 24 rows of 80 columns (1920 characters) and, ignoring rows/column headers, the WRS therefore permitted up to around 160 ten digit data values (e.g. 9999999.99) to be displayed simultaneously on the screen (this contrasts with the later Visicalc
VisiCalc
VisiCalc was the first spreadsheet program available for personal computers. It is often considered the application that turned the microcomputer from a hobby for computer enthusiasts into a serious business tool...

 spreadsheet implementation for the Apple II
Apple II
The Apple II is an 8-bit home computer, one of the first highly successful mass-produced microcomputer products, designed primarily by Steve Wozniak, manufactured by Apple Computer and introduced in 1977...

 that had only a 25 x 40 window for displaying values and a single data entry field on the command line). Data could be keyed directly into, in a genuine WYSIWYG manner, or output to, any one or more of these (3270 attribute tabbed) fields.

Programming

All of the WRS was programmed in IBM Basic assembly language and the operating environment was initially that of a "standard" Macro level CICS
CICS
Customer Information Control System is a transaction server that runs primarily on IBM mainframe systems under z/OS and z/VSE.CICS is a transaction manager designed for rapid, high-volume online processing. This processing is mostly interactive , but background transactions are possible...

 pseudo conversational application running on a typical IBM System/370 MVS
MVS
Multiple Virtual Storage, more commonly called MVS, was the most commonly used operating system on the System/370 and System/390 IBM mainframe computers...

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

. As keyed data was read from the 3270 device, it was routed to a specifically related "DIR record" (essentially a cell variable). After all input was processed for the particular I/O screen, a "function group" (a list of formulae pre-compiled to a single concatenated executable machine code string - using the shunting yard algorithm - as in the example below), was executed to update other dependant DIR records. In this simple illustration, the three relevant 8 byte DIR values ([1],[2] and [3]), are considered to be located in contiguous memory locations (and pointed to by general purpose register 1). The example shows first addition then subtraction to create DIR#3. The machine code string was "loaded" dynamically into thread storage (dynamic memory) and "called" using the equivalent of a BALR 14,15 instruction (after setting the address of the start of the string in R15).

Example snippet code (Add
Addition
Addition is a mathematical operation that represents combining collections of objects together into a larger collection. It is signified by the plus sign . For example, in the picture on the right, there are 3 + 2 apples—meaning three apples and two other apples—which is the same as five apples....

 and Subtract
Subtraction
In arithmetic, subtraction is one of the four basic binary operations; it is the inverse of addition, meaning that if we start with any number and add any number and then subtract the same number we added, we return to the number we started with...

)

ADD "[3]=[1]+[2]"...... (c=a+b) SUBTRACT "[3]=[1]-[2]"...... (c=a-b)

  • Floating point registers 2(/3) and 4(/5) participate in the addition

HEX snippet (16 bytes), R15 points to start
68201000 LD 2,0(1) load Op1 (long FPR 2/3) - DIR#1
68401008 LD 4,8(1) load Op2 (long FPR 4/5) - DIR#2
2A24 ADR 2,4 Add double, Op2 to Op1, normalized
60201010 STD 2,16(1) store result from Op1 - DIR#3
07FE BR 14 return

  • Floating point registers 2(/3) and 4(/5) participate in the subtraction

HEX snippet (16 bytes), R15 points to start
68201000 LD 2,0(1) load Op1 (long FPR 2/3) - DIR#1
68401008 LD 4,8(1) load Op2 (long FPR 4/5) - DIR#2
2B24 SDR 2,4 Subtract double, Op2 from Op1, normalized
60201010 STD 2,16(1) store result from Op1 - DIR#3
07FE BR 14 return

Trigonometric and logical operations

As well as the basic arithmetic operators (+,-,*,/) , the WRS also supported trigonometric functions - square root
Square root
In mathematics, a square root of a number x is a number r such that r2 = x, or, in other words, a number r whose square is x...

, sin
Sin
In religion, sin is the violation or deviation of an eternal divine law or standard. The term sin may also refer to the state of having committed such a violation. Christians believe the moral code of conduct is decreed by God In religion, sin (also called peccancy) is the violation or deviation...

 & cosine as well as logical operations. Intermediate results were always held within the floating point registers and the final results only updated at the end of a function group. These pre-assembled concatenated machine code snippets might therefore include loops and conditional tests as appropriate, all built in JIT
JIT
JIT may refer to:* Various meanings of Just In Time:** Just-in-time compilation - a technique for improving the performance of virtual machines in computing.** Just-in-time - a business inventory strategy.* Jabber ICQ Transport....

 fashion, "on-the-fly", as the function group is first keyed, compiled and perhaps then altered by the user; then ultimately saved for re-use (memoization
Memoization
In computing, memoization is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously processed inputs...

).

Capacity

Because the WRS held its data cells independently of the screen mapped data (identified by a unique integer; its 'DIR' number), there was no theoretical limit to the number of "cells" that could be supported by any one spreadsheet (application). The practical limit was simply the physical file capacity made available for the particular application. Similarly, there was no theoretical limit to the number of "sheets" (I/O screens) that could be linked to forming the complete application.

Dataflow

The output from any WRS application (e.g. a single chemical plant calculation) could be utilized as input to any other WRS application, providing distributed data flow
Distributed data flow
Distributed data flow refers to a set of events in a distributed application or protocol that satisfies the following informal properties:* Asynchronous, non-blocking, and one-way...

 across the connected systems. This is made possible simply because each datum was identifiable by its unique DIR number. Input was alternatively also allowed from pre-existing batch systems via an externally programmed interface that directly updated specific DIR's.
Function groups that updated calculated DIR's (rather than directly keyed) were automatically triggered when all the relevant input data was available from the various sources.

Screen design

Despite the limitations of the 3270 device, the input/output screens (or sheets) could nevertheless be designed interactively by non programmers by using simple "<" and ">" as "field" (cell) delimiters during "the design phase" (building the spreadsheet) as markup
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...

s. As with modern day word processors, these "tab characters" would not normally be visible during normal usage. The same technique was used to define "on screen" the layouts of printed reports that were not limited to the 80 column screen width of the 3270.
Column and row headers were uniquely identified as stored text words (or phrases) and could appear anywhere on the I/O screen.

Error detection

The system was capable of detecting some illogical operations because of a "units" attribute (such as "kilograms" , "ounces", "feet" or "inches") for numeric values (analogous to currency
Currency
In economics, currency refers to a generally accepted medium of exchange. These are usually the coins and banknotes of a particular government, which comprise the physical aspects of a nation's money supply...

 symbol attributes in today's spreadsheets). It was impossible therefore to multiply kilograms by ounces or commit similar logic errors. (By contrast, today's commercial spreadsheets will allow a column of mixed currencies such as pounds & dollars), to be summed or multiplied without even a warning!)

Significance

The Works records system, which went "live" in 1974 represented the first known use of:-
  • an interactive online spreadsheet,
  • a three dimensional spreadsheet and
  • a shared public spreadsheet

since it allowed multiple users to access multiple linked (or "remote") spreadsheets across a private online network covering many remote locations and also used time as a "3rd dimension" to give sheets depth. The System was also an early example of a fully interactive 4GL language - before the term was coined - since a user entered the symbolic language that went on to generate the code to be executed in real time.

External Links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK