XIV-1

XIV.

Bean's Automatic Tape Manipulator — A Description,and Operating Instructions
Jeffrey Bean1.

General Description
BATMAN is a generalized updating program for handling BCD card

images on tape, in either unblocked form, or in FAP type blocks ofsixteen cards per record.

It contains facilities for serializing theoutput in several different ways, monitoring the output by simultaneous
printing using fairly sophisticated methods for tape positioning.
It has been constructed with several ideas in mind:

1.

Ease of operation.

This is seen in the use of control

cards with a flexible format, and in the fact that almost
nothing is illegal.

No matter what happens, the program

makes some attempt to continue.

Program stops occur only

when an end of file is read on the system input tape, andwhen a tape writing error is detected.
2.

Speed.

All of the principal I/O is double buffered.

Under normal circumstances, the program should be able
to operate at the maximum speed of tape motion.
3.

Ease of modifications.

The program is built up of a setof more or less independent modules which communicate
via a set of switches.

New control cards are aasily

defines by adding entries to a pair of expandable tables.
Since the program is not intended to be loaded along withany other decks, no attempt has been made to conserve corewith the result that the logic of the program is relatively
simple to follow.

XIV-22.

Operating Instructions
The composition of the control cards is more easily appreciated

if one understands the logic behind the control card interpreter.

Thisinterpreter operates on the basis of certain keywords which may be locatedanywhere on the card, in any order, delimited either by blanks or by commas.
A table is maintained of these keywords, in which every word on the card
is looked up.

If the word is not found, it is ignored and has no effecton the interpretation of the control card.

Thus, the control card may haveany number of "padding" words as long as they are not keywords.
keyword is found, a bit is turned on in a "key".

When aThus, repetitive

occurrences of keywords have no effect beyond the first occurrence.

When

all the words have been looked up, the "key" itself is looked up inanother tables from which the address of the appropriate routine is obtained.
If the "key" is not found, the control card is ignored and a message isprinted out to this effect.

Any numbers on the card are taken in orderand placed in a last-in-last-out-list.

Serial numbers, which may consistof from one to eight digits and alphabetic characters enclosed in parentheses,
are right shifted with leading zeroes added (blanks are considered to bezeroes) and put on a separate last-in-last-out-list.
Thus, control cards are defined according to which keywords occur init.

If numbers or serial numbers are required for the interpretation of thecard, these are used in the order in which they occur.
ignored.

Anything else is

In the following list of control cards and their meanings, keywords

have been underlined, and numbers are represented by 'XX1; serial numbers
represented by ' ( . . . ) ' .

Optional portions are enclosed in /'s.

Reasonablepadding word:? have been added in order to suggest the meaning of the card.

XIV-3

DEFINE LOGICAL TAPE XX AS THE INPUT TAPE
This defines (or redefines) the input tape.

Its effect ismaintained until the input tape is redefined by a similar control card.
If the tape has not yet been used as an input tape, it will be automaticallyrewound.

It is unnecessary to specify whether the input is in blocked orunblocked form (or mixed form).

If the tape has been used before, it will

be both logically and physically in the same position in which it wasleft, even in the middle of a blocked record.

BLOCKED
DEFINE LOGICAL TAPE XX AS THE — — ! ~ ~ T O OUTPUT TAPE——~UNBLOCKEDThis defines (or redefines) the output tape.

Its effect ismaintained until the output tape is redefined by a similar control card.
If the tape has not yet been used as an output tape, it will be automatically rewound.

If the tape has been used before, it will continue on

from the position at which it was left.

If the output tape is defined

to be logical tape 6, the mode will be automatically set to unblocked
regardless of whether it was specified to be blocked or unblocked.
Furthermore, carriage control for single spacing will automatically beincluded in the output.

GO T£ FILE NUMBER XXThis causes the input tape to be positioned at the beginning of
the file specified, where the files are numbered consecutively startingwith 1.

If this control card is encountered while the input tape isXIV-4

positioned in the middle of a file, the remainder of the file will be either
deleted or copied depending on whether the last data transmission instruction
was a "copying" or "deleting" one, respectively.

If no suck instruction

was executed since the input tape was last positioned at the beginning orend of a file, the remainder of the file will be deleted.

COPY XX FILES
DELETE XX FILES
These instructions cause the number of files specified to be copied
or deleted as specified.

This does not include the file in which the input

tape is now positioned, unless it is positioned at the beginning of the filein which case it is included.

Again, the remainder of the current file will

be copied or deleted depending on the last data transmission card.

COPY XX CARDS
DELETE XX CARDS
These instructions cause the number of cards specified to be copied
or deleted as specified.

If an end of file mark is encountered on the input

tape while executing the instruction, no more cards will be copied or deleted,and the next control card will be interpreted.

If the next control card isalso a data transmission instruction, the program will continue on past thefile mark.

When the file mark is encountered, a file mark will be written

on the output tape unless otherwised specified by the appropriate controlcard.

XIV-5COPY UP_ TO (...)
DELETE U£ TO (...)
Cards will be copied from the current position of the input tapeup to a ^d including the card with matching serialization.

If no card withmatching serialization exists, the program will continue up to but not including a card with higher serialization (remember:to be zeroes).

blanks are considered

If the current position of the input tape indicates thatthe sought for serial number has already been passed, the input tape will
be backspaced to the beginning of the file and the search will continue.
Again, if an end of file mark is encountered, data transmission will ceaseand the next control card will be read.

COPY FROM () TO (...)
DELETE FROM (...) TO (...)
Essentially, these are shorthand notations for two of the precedingcontrol cards.

'COPY FROM (.
. . . ) TO I...)' is equivalent to "DELETE UP TO(...)' followed by 'COPY UP TO (...)', and similarly for 'DELETE FROM(...)

TO (...)'.

COPY THE REST OF THE FILE
DELETE THE REST OF THE FILE
These instructions are obvious.

INSERT THE FOLLOWING CARDS
Cards will be read from the system input tape and copied onto theoutput tape until a card with '*NEXT' in columns 1 through 5 is found.
latter is not copied onto the output tape.

TheXIV-6

INSERT THE FOLLOWING CARDS AFTER(...)

This is equivalent to a 'COPY UP TO (...)' followed by the normal
insertion instruction.

WRITE AN EOFWRITE A *STOPThese instructions are obvious (EOF = end of file).

SERIALIZE ON TEXTS, KEYED ON XX COLUMNS, STARTING WITH COLUMN XX
This causes output to be serialized in columns 73-80.

Serializationconsists of two four digit concatenated numbers, with leading zeroes.

The

first number represents the text number, while the second number represents
the line number within the text.

Whenever a card about to be written out

contains a '*' in column 1, the contents of the columns specified (maximum
number of colums:algorithm.

six) are converted to an integer according to the following

The first two binary bits of each character are multiplied by 10

to the power m+n, where m is the number of columns being converted, and n is
the number of characters to the right of the character under consideration.
The last four binary bits of the character are multiplied by 10 to the powern.

These numbers are summed for each character and become the result.
Examples:in a three-digit field
123 becomes 0123
00A becomes 1001
OJA becomes 21011
SJA becomes 321211

This integer is truncated to four digits from the left and is used as thefirst four columns of the serialization for the remainder of this text.

TheXIV-7

last four columns begin with 0000 and are incremented by 10 for each lineof text.

Thus, a text headed by *TEXT 23D would be serialized 12340000,12340010, etc.

SERIALIZE STARTING WITH (...)

AND INCREMENTED BY XX

This causes output to be serialized in columns 73-80, the firstserial number being as specified, and succeeding cards being serialized bynumbers incremented by the amount specified.

DO NOT SERIALIZE
This causes columns 73-80 of the output to be blanked out.

COPY THE OLD SERIALIZATIONThis causes the serialization on each input card to remain unchangedon output.

Note that this may result in incorrectly ordered serializationon the output tape.

/DO NOT/ COPY *STOPS
Whenever a card to be written out contains *STOP in the first fivecolumns, it will be written or not as specified.
copy the*STOPS.

Normal procedure is toThis instruction is useful when concatenating one ormore files.

/DO NOT/ COPY EOFS
Whenever an end of file mark is encountered on the input tape, afile mark is written on the output tape, or not, as specified.
procedure is to copy the eofs.

NormalXIV-8PRINT TAPE XX, XX FILESThis causes the tape specified to be printed until the number of filemarks specified have been encountered.
tape is currently positioned.

This includes the file in which theThe tape is left in the position where it

stopped when encountering the last file mark.
position in which it started.

It is not returned to theThis instruction has no effect on the defin-

ition of the normal input and output tapes.

PRINT TAPE XX, XX CARDSThis causes the number of cards specified to be printed from the tapespecified unless an end of file mark is encountered first, in which case, thenext control card is read.

Again, this instruction has no effect on the de-finition of the normal input and output tapes.

PRINT TAPE XX, FILE XX, XX CARDSThis causes the tape specified to be positioned at the specified file,and then the requisite number of cards printed.

The same remarks as for theother PRINT instructions apply.

PRINT TAPE XX, FILE XX, FROM C. . . ) TO (.
.••)
This causes the tape specified to be positioned at the specified file,and then the requisite cards are printed.
FROM (...)

TO (...)' instruction.

Operation is similar to the 'COPY

The same remarks apply as for the other

PRINT instructions.
NOTE:

In the above instructions, several numbers must appear on the control

XIV-9card.

These numbers must appear in the order specified or confusion

will result.

/DO NOT/ PRINT SIMULTANEOUSLY WITH THE OUTPUT
This causes (or prevents), each card being written on the output tape
to be written also on the system print tape with automatic carriage control
for single spacing.

Normal procedure is not to print simultaneously.

When-ever the output tape is defined to be logical tape 6, the operation of this
instruction is suspended, but resumes when the output tape is redefined as
something else.

This provides automatic protection against double printing.

FINISHThis instruction must be the last one in the deck.

It designatesthat the run has been completed, and causes any input and output tapes
which have been used, with logical tape numbers higher than 7 to be rewound.

Notes:
1.

In order to rewind an input tape, the following commandshould be used:2.

G(j) T<t> FILE

If the output tape is 6, the command D(J) N(j)T PRINT (j)UTPUT
produces an error.

3.

The break characters for BATMAN control cards are blank,
period and comma, only.