Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-06 - decus/20-153/rpgint.rnd
There is 1 other file named rpgint.rnd in the archive. Click here to see a list.
.RIGHT MARGIN 70
.title RPGII Internal Documentation
.fg 10
.center
DECsystem-10 RPGII Internal Documentation
.fg 3
.center
Date:#9#May#1977
.CENTER
Revision:#2
.fg 24
.lower
^COPYRIGHT (^C) 1976, 1977
.BR
^CERRITOS ^COMMUNITY ^COLLEGE ^DISTRICT AND ^ROBERT ^CURRIER
.FG 2
^THIS SOFTWARE IS FURNISHED UNDER LICENSE FOR USE ONLY ON A SINGLE
COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION OF THE
ABOVE COPYRIGHT NOTICE. ^THIS SOFTWARE, OR ANY OTHER COPIES
THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES
TO THESE LICENSE TERMS. ^TITLE TO AND OWNERSHIP OF THE SOFTWARE
SHALL AT ALL TIMES REMAIN WITH ^CERRITOS ^COMMUNITY ^COLLEGE ^DISTRICT AND ^ROBERT ^CURRIER.
.FG 1
^THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY EITHER ^CERRITOS ^COMMUNITY
^COLLEGE ^DISTRICT OR ^ROBERT ^CURRIER.
.BR
.upper
.page
.center
Table of Contents
.bl 2.lm 24
.I -24;INTRODUCTION
.BL
.I -24;CHAPTER		1	COMPILER OVERVIEW
.BL
.I -24;		1.1	COMPONENTS OF RPG II ....................#1-1
.bl

.I -24;CHAPTER		2	COMPILER FILE STRUCTURE
.BL
.I -24;		2.1	CONTENTS OF SRC .........................#2-2
.I -24;		2.2	CONTENTS OF LST .........................#2-2
.I -24;		2.3	CONTENTS OF BIN .........................#2-2
.I -24;		2.4	CONTENTS OF ERA .........................#2-2
.I -24;		2.5	CONTENTS OF GEN .........................#2-3
.I -24;		2.5.1	###Operators ............................#2-3
.I -24;		2.5.2	###Operands, Other than Literal .........#2-3
.I -24;		2.5.3	###Operands, Literal ....................#2-3
.I -24;		2.6	CONTENTS OF CPY .........................#2-3
.I -24;		2.7	CONTENTS OF CAL .........................#2-4
.I -24;		2.8	CONTENTS OF AS1, AS2, AS3 ...............#2-4
.I -24;		2.8.1	###Addresses ............................#2-4
.I -24;		2.8.2	###Address Increments ...................#2-4
.I -24;		2.8.3	###Instructions .........................#2-5
.I -24;		2.8.4	###Byte Pointers ........................#2-5
.I -24;		2.8.5	###XWD ..................................#2-6
.I -24;		2.8.6	###Constants ............................#2-6
.I -24;		2.8.7	###Miscellaneous ........................#2-6
.I -24;		2.8.8	###Instruction Codes ....................#2-7
.bl
.I -24;CHAPTER		3	COMPILER INTERNAL TABLE STRUCTURE
.BL
.I -24;		3.1	FILTAB - THE FILE TABLE .................#3-1
.I -24;		3.2	DATAB - THE DATA ITEM TABLE .............#3-3
.I -24;		3.3	IDTTAB - THE INDICATOR CHAIN TABLE ......#3-6
.I -24;		3.4	PROTAB - THE TAG TABLE ..................#3-7
.I -24;		3.5	LITAB - THE LITERAL TABLE ...............#3-7
.I -24;		3.6	VALTAB - THE VALUE TABLE ................#3-8
.I -24;		3.7	NAMTAB - THE NAME TABLE .................#3-8
.I -24;		3.8	EXTAB - THE EXTERNAL NAME TABLE .........#3-8
.bl.i -24
CHAPTER		4	RUNTIME SYSTEM OVERVIEW
.BL
.I -24;		4.1	COMPONENTS OF RPGLIB ....................#4-1

.I -24;		4.2	INPUT/OUTPUT IN RPGLIB ..................#4-2
.I -24;		4.2.1	###RPGIO ................................#4-2
.I -24;		4.2.2	###CBLIO ................................#4-2
.BL 1.I -24
CHAPTER		5	RUNTIME SYSTEM INTERNAL TABLE STRUCTURE
.BL.I -24
.I -24;		5.1	CHNTAB - THE CHANNEL TABLE ..............#5-1
.I -24;		5.2	OTFTAB - THE OBJECT TIME FILE TABLE .....#5-2
.I -24;		5.3	FTBTAB - THE CBLIO FILE TABLE ...........#5-3
.I -24;		5.4	ICHTAB - THE INPUT CHAIN TABLE ..........#5-6
.I -24;		5.5	OCHTAB - THE OUTPUT CHAIN TABLE .........#5-8
.I -24;		5.6	ARRTAB - THE ARRAY TABLE ................#5-9
.BL.I -24
APPENDIX	A	REFERENCE TABLES
.BL
.I -24;		A.1	INDICATOR VALUES ........................#A-1
.lm 0.page
.break.page.fg 9
.center
Introduction
.blank 3
This manual is intended to assist the programmer that must maintain or
modify the DECsystem-10 RPGII system. While all attempts have been made
to assure the accuracy of this manual, the final authority is always
the program listings themselves. This manual is designed to be used in
conjunction with a set of listings, rather than just by itself. In
appropriate parts, references have been made to particular program 
modules that contain further documentation of a particular feature.
.bl 1
Programmers that are familiar with the DECsystem-10 COBOL system will notice
many similarities in RPGII. This is both good and bad. The programmer that
has been deep into COBOL and found his way out, should not get lost in
the RPGII system. However, such a programmer, being overly smug about
having a vague understanding of how COBOL works, may get overconfident
and not notice some of the subtle changes that have been made. Contrary
to appearences, these changes have not been made just to trap unwary programmers,
but were made for what, at the time, seemed to be good reasons.
.chapter Compiler Overview
The RPG#II compiler consists of seven major phases:
.bl.lm 24
.i -16;RPGIIA		Initialization
.i -16;RPGIIB		Header, File, Extension and Line counter specification
scanner
.i -16;RPGIIC		Input and Output specification scanner
.i -16;RPGIID		Calculation specification scanner
.i -16;RPGIIE		Table builder and code generator
.i -16;RPGIIF		Listing
.i -16;RPGIIG		Final assembly
.lm 0.bl
In addition there is a phase which dumps core and the contents of
the scratch files whenever a catastrophic error occurs in the compiler. This
phase in RPGIIK.
.bl
If a multi-segment compiler (ONESEG=0) is generated, the seven major
phases and RPGIIK are grouped into six high segments:
.bl.lm 24
.i -24;	RPGII.SHR	RPGIIA, RPGIIB
.I -24;	RPGIIC.SHR	RPGIIC
.I -24;	RPGIID.SHR	RPGIID
.I -24;	RPGIIE.SHR	RPGIIE
.I -24;	RPGIIF.SHR	RPGIIF, RPGIIG
.I -24;	RPGIIK.SHR	RPGIIK
.bl.lm 0
If a single segment compiler (ONESEG=1) is generated, all eight phases are
stored in RPGII.SHR.
.hl 1 Components of RPG II
Each phase of the compiler also contains an impure segment (IMPURE.MAC) and
one or more of the following routines. All of these routines are collected into
the library LIBA.REX. The extenstion of "REX" is for historical
reasons.
.bl.lm 24
.i -16;CLEANT		Clean up tables to gain more free core
.i -16;DIAGS		Define diagnostics tables
.i -16;GENCOM		Common routines used by Phase E
.i -16;GETASY		Read from AS1FIL, AS2FIL, AS3FIL
.i -16;GETCPY		Read from CPYFIL
.i -16;GETERA		Read from ERAFIL
.i -16;GETGEN		Read from GENFIL
.i -16;GETSRC		Read from the source file and perform some editing
.i -16;IMPURE		Define the impure storage area
.i -16;INTERM		Universal file to define default switches
.i -16;LOOKUP		Generate code for the LOOKUP operation
.i -16;PREDIT		Pre-edit the edit words
.i -16;PURAB		Pure constants for Phases A _& B
.i -16;PUREC		Pure constants for Phase C (multi-segment compilers only)
.i -16;PURED		Pure constants for Phase D (multi-segment compilers only)
.i -16;PUREE		Pure constants for Phase E (multi-segment compilers only)
.i -16;PURFG		Pure constants for phases F _& G
.i -16;PUTAS1		Write AS1FIL
.i -16;PUTAS2		Write AS2FIL
.i -16;PUTAS3		Write AS3FIL
.i -16;PUTBIN		Write BINFIL
.i -16;PUTERA		Write ERAFIL
.i -16;PUTGEN		Write GENFIL
.i -16;PUTLST		Write LSTFIL
.i -16;RPGASM		Universal file to define option switches
.i -16;RPGCOM		Common routines used by all phases
.i -16;RPGERR		Define error messages
.i -16;RPGIIA		Initialization and command scanner
.i -16;RPGIIB		H, F, E, and L specification scanner
.i -16;RPGIIC		I and O specification scanner
.i -16;RPGIID		C specification scanner
.i -16;RPGIIE		Code and table generation phase
.i -16;RPGIIF		Listing generator
.i -16;RPGIIG		Assembly phase
.i -16;RPGIIK		Error dump phase
.i -16;RPGIIP		Parameter definition fil
.i -16;RPGUNV		Universal file used by many routines
.i -16;SRTTAB		Sort tables (primarily ERAFIL)
.i -16;STINFL		Set up input file
.i -16;TRYNAM		Interface to NAMTAB
.i -16;XPAND		Expand a table
.i -16;XPNPPL		Handle error traps
.lm 0
.chapter Compiler File Structure
The RPG#II compiler uses three files specified by the user. These files
can be on any device which supports the type of data contained in the file.
The three files are:
.list.le;SRC#-#The RPG#II source program.
.le;LST#-#The listing.
.le;BIN#-#The relocatable binary produced by the compiler.
.end list;.bl
The compiler also uses several data files for temporary storage. All of
these files are stored on disk, and are deleted at the end of each compilation.
All files have the user's job number as the first three characters of the
filename, and the extension ".TMP". The three characters that are appended to
the job number to form the six character filename are given below with a brief
description of each file:
.list
.le;ERA#-#Diagnostics to be output with the listing file.
.le;GEN#-#Output of the syntax parsing phase.
.le;CPY#-#A copy of the source with line numbers assigned.
.le;CAL#-#A copy of the calculation specifications used to delay calculation
spec processing until after output processing.
.le;AS1#-#Intermediate language containing assembly information for the
data storage and table definition areas of the object program.
.le;AS2#-#Intermediate language containing assembly information for the
detail calculation area of the object program.
.le;AS3#-#Intermediate language containing assembly information for the
total calculation and literal areas of the object program.
.bl.end list
.hl 1 Contents of SRC
SRC is the ASCII file containing the program to be compiled. It
is primarily manipulated by the routines contained in the "GETSRC" module.
.hl 1 Contents of LST
The listing file is broken down into two subsections: A copy of the
source with line numbers assigned and error messages imbedded; and a
listing of the generated object output if the user has requested it
via the _/A switch.
.hl 1 Contents of BIN
This file contains the relocatable binary data generated
by the compiler. This relocatable binary code is designed to be loaded
with LINK-10. A description of it's contents can be found in the LINK-10
Programmer's Reference Manual (DEC-10-ULKMA-B-D).
.hl 1 Contents of ERA
The diagnostic file contains a one-word entry for each error or warning
detected by the compiler. The file is written by Phases B, C, D, and E,
and read by Phase F. The entries are defined as follows:
.bl.lm 24
.i -16;Bit 0		Always zero to aid sorting of the file.
.i -16;Bit 1		A zero if this diagnostic is to be imbedded in
the source listing, a one if the diagnostic is to be listed
seperately.
.i -16;Bits 2-14	The line number of the line in error. This is used
to determine where in the listing the error message should go.
.i -16;Bit 21		A zero if this is a warning, a one if this is a fatal
error.
.i -16;Bits 22-25	The compiler phase which generated the diagnostic.
(1=Phase A,...,5=Phase E).
.i -16;Bits 26-35	A number identifying the error message. The messages
are defined in the module "RPGERR.MAC".
.bl.lm 0
.hl 1 Contents of GEN
The generator input file consists of operators and operands put out by
the parsing phases B, C and D. Each operator entry is two words, all
others are one word.
.hl 2 Operators
.lm 24.i -18;Word 1:
.bl.i -24;OP.OPR	Bit 0		A zero to identify this as an operator
.i -24;OP.OP	Bits 1-8	A code for identifying the operator
.i -24;	Bits 9-15	Misc flags required for code generation
.i -24;OP.LN	Bits 16-28	Source line number to use if error found
.bl.i -18;Word 2:
.bl.i -24;OP.IND	Bits 0-17	Link to conditioning indicator chain
.i -24;OP.RES	Bits 18-35	Resulting indicator chain link
.lm 0
.hl 2 Operands, Other than Literals
.lm 24.i -18;Word 1:
.bl.i -24;OP.OPR	Bit 0		A one to identify this as an operand
.i -24;OP.LIT	Bit 1		A zero to identify this as other than a literal
.i -24;OP.AC	Bit 2		Operand is TEMP of AC's
.i -24;OP.LNK	Bits 18-35	Table link to operand
.lm 0
.hl 2 Operands, Literal
.lm 24.i -18;Word 1:
.bl.i -24;OP.OPR	Bit 0		A one to identify this as an operand
.i -24;OP.LIT	Bit 1		A one to identify this as a literal
.i -24;OP.NUM	Bit 2		A one to identify this as a numeric literal, a zero to
identify this as non-numeric
.i -24;OP.FIG	Bit 3		A one if a figurative constant
.i -24;OP.LNK	Bits 18-35	Table link to literal (if OP.FIG = 0)
.lm 0
.hl 1 Contents of CPY
This file contains a copy of the source file with line numbers assigned
and some editing done. There is a one word entry for each line which
contains:
.lm 24.bl
.i -24;	Bits 0-6	The printer control character for the preceding line
(form-feed or line-feed)
.i -24;	Bit 7		Always zero
.i -24;	Bits 8-20	The assigned line number for this line
.i -24;	Bits 21-24	The first two characters of the source line
.i -24;	Bit 35		Always one to identify this as a header word
.bl.lm 0
The remaining words for each line contain the ASCII characters copied from
the source file.
.hl 1 Contents of CAL
This file contains a copy of the calculation specifications copied from
the source file. This copy is used to delay processing of the calculation
statements until after the output statements have been processed. The
file is just an ASCII copy from the source, with no editing done.
.hl 1 Contents of AS1, AS2, AS3
The output of Phase E is a set of files containing directions
for the assembly phase. Each entry in the file consists of a header
word followed by one or more words of more definitive data.
.hl 2 Addresses
The header data words may contain an address. That address has a type
code in its first three bits, followed by an address relative to some
table. The type codes are:
.bl.lm 24
.i -24;AS.CNS		0	The remainder of the address is a constant
.i -24;AS.ICH		1	The address is relative to the start of ICHTAB
.i -24;AS.PRO		2	The address is relative to PROTAB
.i -24;AS.EXT		3	The address is relative to EXTAB
.i -24;AS.FTB		4	The address is relative to FTBTAB
.i -24;AS.OCH		5	The address is relative to OCHTAB
.i -24;AS.CNB		6	The increment (see 2.8.2) is a constant
.i -24;AS.MSC		7	Miscellaneous (see 2.8.2)
.lm 0.hl 2 Address Increment
Occasionally the address must be modified by some increment. The increment
has a type code in its first three bits, followed by a constant amount
to increment by.
.tp 10.bl;The values for the type codes are:
.bl.lm 24
.i -24;AS.ABS		0	Add constant to the address
.i -24;AS.OTB		1	Add constant to OTFBAS
.i -24;AS.OCB		2	Add constant to OCHBAS
.i -24;AS.LIT		3	Add constant to base of the literal pool
.i -24;AS.ICB		4	Add constant to ICHBAS
.i -24;AS.DOT		5	Add constant to current location
.i -24;AS.TMP		6	Add constant to base of runtime impure area
.i -24;AS.DAT		7	Add constant to base of data storage area
.lm 0
.hl 2 Instruction
.lm 24.i -18;Word 1:
.bl
.i -24;	Bit 0		Always zero to identify this as an instruction
.i -24;	Bit 1		If there is an increment word following this, this
bit is a one
.i -24;	Bits 2-8	Operation code (see 2.8.8)
.i -24;	Bits 9-12	Accumulator field for the instruction
.i -24;	Bit 13		Indirect bit for instruction
.i -24;	Bits 14-17	Index field for the instruction
.i -24;	Bits 18-35	The address (see 2.8.1)
.bl.i -18;Word 2:
.bl
.lm 8
This word exists only if bit 1 of word 1 was a one. It has zero in
the left half, and an increment (see 2.8.2) in the right half.
.lm 0
.hl 2 Byte Pointer
.lm 24.i -18;Word 1:
.bl
.i -24;	Bits 0-2	Always 4
.i -24;	Bits 3-17	Not used
.i -24;	Bits 18-35	Address (see 2.8.1)
.bl.i -18;Word 2:
.bl
.i -24;	Bits 0-17	The left half of the byte pointer, as generated by
the MACRO-10 psuedo-op.
.i -24;	Bits 18-35	Increment (see 2.8.2)
.lm 0
.hl 2 XWD
.lm 24.i -18;Word 1:
.bl
.i -24;	Bits 0-2	Always 5
.i -24;	Bits 3-17	Not used
.i -24;	Bits 18-35	Number of following two word entries
.lm 0.bl
The header word is followed by one or more two word entries as follows:
.bl.lm 24.i -18;First Word:
.bl
.i -24;	Bits 0-17	Address increment for left half of the XWD
.i -24;	Bits 18-35	Address for the left half of the XWD
.bl.i -18;Second Word:
.bl
.i -24;	Bits 0-17	Address increment for right half of the XWD
.i -24;	Bits 18-35	Address  for the right half of the XWD
.lm 0
.hl 2 Constant
.lm 24.i -18;Word 1:
.bl
.i -24;	Bits 0-2	Always 6
.i -24;	Bit 3		ASCII constant
.i -24;	Bit 4		SIXBIT constant
.i -24;	Bit 5		One-word decimal constant
.i -24;	Bit 6		Two-word decimal constant
.i -24;	Bit 7		Floating point constant
.i -24;	Bit 8		Octal constant
.i -24;	Bits 9-12	Not used
.i -24;	Bits 13-17	Number of characters in the floating point mantissa
.i -24;	Bits 18-35	Number of words containing the constant
.lm 0.bl
Following the header word is the value constant, in as many words as
is necessary. Floating point constants are two words apiece: the first
word is the tens exponent in binary; the second word is the mantissa,
four bits per digit.
.hl 2 Micellaneous
.lm 24.i -18;Word 1:
.bl
.i -24;	Bits 0-2	Always 7
.i -24;	Bit 3		Paragraph or section name (for listing pruposes)
.i -24;	Bit 4		Special tag (for listing purposes)
.i -24;	Bit 5		RELOC psuedo-op
.i -24;	Bits 6-16	Not used
.i -24;	Bit 17		Increment word follows
.bl.i -18;Word 2:	Present only if bit 17 of word 1 is a 1
.bl
.i -24;	Bits 0-17	Not used
.i -24;	Bits 18-35	Address increment (see 2.8.2)
.lm 0
.hl 2 Instruction Codes
A complete list of the instruction codes and their compiler symbols can
be found in the module "GENCOM.MAC".
.chapter Compiler Internal Table Structure
The RPGII compiler makes use of a great many internal tables during the
compilation process. This chapter is intended to be a description of those
tables. A complete, and up to date, listing of the tables and their
entries may be found in the module PURE_.MAC.
.hl 1 FILTAB - The File Table
FILTAB consist of one 8 word entry for each file used by the object
program. These entries are arranged as follows:
.bl.lm 24.indent -18
Word 1:
.bl.indent -16
Bits 0-2	Always 0 to identify table.
.indent -24;FI.NAM	Bits 3-17	Relative pointer to NAMTAB entry for this file.
.i -24;FI.TYP	Bits 18-20	File Type as follows:
.i -8;000 = Input
.i -8;001 = Output
.i -8;010 = Update
.i -8;011 = Combined
.i -8;100 = Display
.i -24;FI.DES	Bits 21-23	File Designation:
.i -8;000 = Primary
.i -8;001 = Secondary
.i -8;010 = Chained
.i -8;011 = Record Address
.i -8;100 = Table or Array
.i -8;101 = Demand
.i -8;110 = Blank (Output or Display)
.i -24;FI.PRO	Bits 24-26	Processing Mode:
.i -8;000 = Consecutive
.i -8;001 = By ADDRout
.i -8;010 = Sequential by key
.i -8;011 = Sequential within limits (not supported)
.i -8;100 = Random by relative record
.i -8;101 = Random by Record Key
.i -24;FI.ORG	Bits 27-28	File Organization:
.i -8;00 = One I/O area (sequential or direct)
.i -8;10 = Indexed file
.i -8;11 = ADDRout file (if not and FI.DES = 011, is limits file)
.i -24;FI.RAF	Bits 29-30	Record Address Format
.i -8;00 = Unpacked
.i -8;01 = Binary (not supported)
.i -8;10 = Packed (not supported)
.i -8;11 = None
.i -24;FI.DEV	Bits 31-34	Device Name:
.i -21;_.FIMF1	0 = MFCU input hopper 1
.i -21;_.FIMF2	1 = MFCU input hopper 2
.i -21;_.FICDR	2 = READ01 (CDR:)
.i -21;_.FILPT	3 = PRINTER (LPT:)
.i -21;_.FILP2	4 = PRINTR2 (obsolete)
.i -21;_.FITTY	5 = CONSOLE (TTY:)
.i -21;_.FIDSK	6 = DISK (DSK:)
.i -21;_.FIMTA	7 = TAPEn (MTAn:)
.i -24;FI.EOF	Bit 35		Program may end only after all records from this file
have been processed when this bit is set.
.bl.i -18;Word 2:
.bl.i -24;FI.KYP	Bits 0-11	Relative key position within record
.i -24;FI.BKL	Bits 12-23	Block length
.i -24;FI.RCL	Bits 24-35	Record length
.bl.i -18;Word 3:
.bl.i -24;FI.SEQ	Bits 0-1	Sequence checking option:
.i -8;00 = No checking
.i -8;01 = Ascending order
.i -8;10 = Descending oreder
.i -24;FI.BUF	Bits 2-8	Tape buffer offset
.i -24;FI.AST	Bit 9		ASCII File flag
.i -24;FI.REW	Bits 10-11	Tape rewind option:
.i -8;00 = Rewind at EOF
.i -8;01 = Unload at EOF
.i -8;10 = Leave tape at EOF
.i -24;FI.EXT	Bits 12-17	Number of extents
.i -24;FI.ADD	Bits 18-19	File addition option:
.i -8;00 = No additions
.i -8;01 = Ordered additions
.i -8;10 = Unordered additions
.i -24;FI.OVI	Bits 20-27	Overflow indicator
.i -24;FI.ADF	Bit 28		Record Address link flag
.i -24;FI.LPP	Bits 29-35	Lines per Page
.bl.indent -18;Word 4:
.bl.i -24;FI.OVL	Bits 0-5	Overflow line
.i -24;FI.UNT	Bits 6-9	Unit number for TAPE
.i -24;FI.KYL	Bits 12-16	Length of key field
.i -24;FI.EXI	Bits 17-24	External Indicator
.bl.indent -18;Word 5:
.bl.i -24;FI.COR	Bits 0-17	Core index size (not implemented)
.i -24;FI.ADL	Bits 18-35	Link to ADDRout or Limits file
.bl.i -18;Word 6:
.bl.i -24;FI.DAT	Bits 0-17	Link to primary DATAB item
.i -24;FI.LIN	Bits 18-29	Line number of defining file specification
.bl.i -18;Word 7:
.bl.i -24;FI.PHY	Bits 0-35	Physical (SIXBIT) name of file
.bl.i -18;Word 8:
.bl.i -24;FI.OTF	Bits 0-17	Link to corresponding OTFTAB item
.lm 0.tp 10.hl 1 DATAB - The Data Item Table
DATAB, the data item table, consists of a series of 13 word entries linked
together in such a manner as to represent the input and output data
structures defined in the user's program. It also contains descriptions
of data items defined in the calculation specifications and not used in
either the input or output sections.
.bl
For each input or output file there is a corresponding FILTAB entry as defined
above. This entry contains a pointer (FI.DAT) to the first DATAB item in
the input or output chain. This first item contains the data defining
the first record. If there are additional input or output records they
are linked together via the DA.MAJ pointer. Each record also contains a
pointer to those data items contained within the record. These data
items are chained together via the DA.BRO link.
.bl
Another linkage of importance is the same name (DA.SNM) linkage. Via this
pointer all items that have a common name are linked together. This link
is useful for compiling composite information on a field.
.bl
The remainder of the DATAB items are defined as follows:
.bl.lm 24.i -18;Word 1:
.bl.i -16;Bits 0-2	Always 01 to identify the table
.i -24;DA.NAM	Bits 3-17	NAMTAB link
.i -24;DA.MAJ	Bits 18-35	Link to next major (record) item
.bl.i -18;Word 2:
.bl.i -24;DA.BRO	Bits 0-17	Link to next minor (field) item
.i -24;DA.IND	Bits 18-35	Link to conditioning indicators
.bl.TP 10.i -18;Word 3:
.bl.i -24;DA.VAL	Bits 0-17	Link to literal value of field
.i -24;DA.COR	Bits 18-35	Pointer to assigned core location
.bl.i -18;Word 4:
.bl.i -24;DA.NPS	Bits 0-1	Number of entries per sequence type:
.i -8;00 = Sequence not checked
.i -8;01 = 1 record/type
.i -8;10 = n records/type
.i -24;DA.RTR	Bit 2		Record type is required
.i -24;DA.TRA	Bit 3		Trailer item (not supported)
.i -24;DA.LHI	Bit 4		Look-ahead item
.i -24;DA.STS	Bits 5-7	MFCU stacker select
.i -24;DA.FLD	Bits 8-9	Field type:
.i -8;00 = Alphanumeric
.i -8;01 = Packed decimal (not supported)
.i -8;10 = Packed binary (not supported)
.i -8;11 = Unpacked numeric
.i -24;DA.SIZ	Bits 10-21	Size of field
.i -24;DA.DEC	Bits 22-25	Number of decimal positions
.i -24;DA.PRI	Bit 26		Print and punch MFCU (not supported)
.i -24;DA.PRO	Bit 27		Punch only MFCU (not supported)
.i -24;DA.STR	Bit 28		Sterling sign (not supported)
.i -8;0 = not used
.i -8;1 = postion stored in DA.STP
.i -24;DA.RES	Bits 29-34	Byte residue for core pointer (DA.COR)
.i -24;DA.IMD	Bit 35		Array index is immediate
.bl.i -18;Word 5:
.bl.i -24;DA.RII	Bits 0-7	Record identifying indicator
.i -24;DA.CLI	Bits 8-15	Control level indicator
.i -24;DA.FPL	Bits 16-23	Positive field indicator
.i -24;DA.STP	Bits 24-35	Sterling position (not supported)
.bl.i -18;Word 6:
.bl.i -24;DA.ORT	Bits 0-1	Output record type:
.i -8;00 = Heading
.i -8;01 = Detail
.i -8;10 = Total
.i -8;11 = Exception
.i -24;DA.ARC	Bit 2		Add record
.i -24;DA.FOV	Bit 3		Fetch overflow
.i -24;DA.SPA	Bits 4-5	Space after count
.i -24;DA.SKA	Bits 6-12	Skip after line number
.i -24;DA.EDT	Bits 13-16	Edit Code:
.i -8;1 = "1"		11 = "J"
.i -8;2 = "2"		12 = "K"
.i -8;3 = "3"		13 = "L"
.i -8;4 = "4"		14 = "M"
.i -8;5 = "A"		15 = "X"
.i -8;6 = "B"		16 = "Y"
.i -8;7 = "C"		17 = "Z"
.i -9;10 = "D"
.i -24;DA.BLA	Bit 17		Blank field after printing
.i -24;DA.SPB	Bits 18-19	Space before count
.i -24;DA.END	Bits 20-31	Field end position in output record
.i -24;DA.LDC	Bit 32		Table/array loads at compile time
.i -24;DA.LDR	Bit 33		Table/array loads at pre-execution time
.i -24;DA.LDE	Bit 34		Table/array loads at execution time
.i -24;DA.DMP	Bit 35		Table/array dumps at end of job
.bl.i -18;Word 7:
.bl.i -24;DA.OCC	Bits 0-14	Number of occurs (Max index) of table/array
.i -24;DA.ALT	Bit 15		Alternate table
.i -24;DA.INF	Bit 16		Input section flag (this item seen in input section)
.i -24;DA.RND	Bit 17		Round (Half-adjust) the result
.i -24;DA.ALL	Bits 18-35	Table link to alternate table
.bl.i -18;Word 8:
.bl.i -24;DA.EPR	Bits 0-9	Number of entries per record
.i -24;DA.SEQ	Bits 10-11	Sequence checking:
.i -8;00 = No check
.i -8;01 = Ascending sequence
.i -8;10 = Descending sequence
.i -24;DA.ARE	Bit 12		This item an array entry
.i -24;DA.ADD	Bit 13		Add record
.i -24;DA.FMT	Bits 14-17	Field data format:
.i -8;0 = SIXBIT
.i -8;1 = ASCII
.i -8;2 = EBCDIC
.i -24;DA.LDP	Bits 18-35	Table link to file this table/array loads from
.bl.i -18;Word 9:
.i -24;DA.DPP	Bits 0-17	Table link to file this table/array dumps to
.i -24;DA.SNM	Bits 18-35	Table to link to item with same name
.bl.i -18;Word 10:
.i -24;DA.FRP	Bits 0-11	From relative field location
.i -24;DA.TOP	Bits 12-23	To relative field location
.i -24;DA.MAT	Bits 24-31	Matching indicator
.i -24;DA.TAB	Bit 32		Table flag (valid for OCHTAB linked items only)
.bl.i -18;Word 11:
.bl.i -24;DA.FMN	Bits 0-7	Negative field indicator
.i -24;DA.FBZ	Bits 8-15	Blank or zero field indicator
.i -24;DA.SKB	Bits 16-22	Skip before line number
.i -24;DA.FRR	Bits 23-30	Field record relation indicator
.i -24;DA.DUN	Bit 31		This item processed by Phase E
.i -24;DA.NDF	Bit 32		This item not fully defined (used?)
.i -24;DA.FLS	Bit 33		This item defined in file section
.bl.TP 4.i -18;Word 12:
.bl.i -24;DA.ICH	Bits 0-17	Pointer to related ICHTAB item
.i -24;DA.ARP	Bits 18-35	Pointer to array this item references
.bl.i -18;Word 13:
.bl.i -24;DA.INP	Bits 0-17	Pointer to index (or index itself if DA.IMD = 1)
.i -24;DA.LIN	Bits 18-30	Line number of defining line (for errors)
.i -24;DA.LTF	Bit 31		Literal flag
.i -24;DA.RSV	Bits 32-35	Reserved word flag/code (set up by Phase E):
.i -8;1 = UDATE		5 = PAGE
.I -8;2 = UDAY		6 = PAGE1
.I -8;3 = UMON		7 = PAGE2
.I -8;4 = UYEAR
.bl.i -18;Word 14:
.bl.i -24;DA.ISZ	Bits 0-11	Size of item to be used in ICHTAB entry
.lm 0.tp 10.hl 1 IDTTAB - The Indicator Table
The indicator table consists of a series of 1 word entries linked together
form an equivalent of the indicator checks used in the user's program.
Rather than actually being linked, consecutive entries are used until the
ID.END flag is seen, indicating the end of the chain.
.bl
In addition to using IDTTAB to link together indicator checks for output
records and calculations, it is also used to link together checks for
record identifying indicators in the input specs. When used for this,
only OR lines contain an indicator, which is placed in ID.RII rather
than in the usual ID.IND. Placed in ID.IND instead, is the character
that is to be looked for in column ID.POS of the input record.
.bl
The assigned sequence number, ID.SEQ, is also only used in input chains.
This number corresponds to the record sequence number given on the
input specs.
.bl
The IDTTAB items are defined as follows:
.bl.lm 24.i -18;Word 1:
.bl.i -24;ID.OR	Bit 0		0 = Boolean AND relation with previous entry,
1 = Boolean OR relation.
.i -24;ID.NOT	Bit 1		Boolean NOT condition applied to ID.OR
.i -24;ID.IND	Bits 2-9	Indicator/character
.i -24;ID.POS	Bits 10-21	Character position
.i -24;ID.END	Bit 22		This is last entry in this chain
.i -24;ID.RII	Bits 23-30	Record identifying indicator (OR line only)
.i -24;ID.SEQ	Bits 31-35	Assigned sequence number (first entry only)
.lm 0.tp 10.hl 1 PROTAB - The Tag Name Table
The tag name table consists of 2 word entries used to store information
about symbols used in TAG and BEGSR statements. The entries are defined as
follows:
.lm 24.bl 1.i -18;Word 1:
.bl 1.i -24;PR.ID	Bits 0-2	Always 4 to identify the table
.i -24;PR.NAM	Bits 3-17	NAMTAB pointer to value of symbol
.i -24;PR.LNK	Bits 18-35	Pointer to assigned location of tag
.bl.i -18;Word 2:
.bl;.i -24;PR.SEG	Bit 0		Segment containing the tag, as follows:
.i -8;0 = AS2FIL
.i -8;1 = AS3FIL
.i -24;PR.BSR	Bit 1		Tag used in a BEGSR flag
.lm 0.tp 10.hl 1 LITAB - The Literal Table
LITAB contains information about literals generated by the code generation
phase of RPG#II. This information is dumped into AS3FIL at the end of that
phase. Each LITAB entry consists of a header word followed by words
containing the literal value. The header word is defined as follows:
.bl
In the left half:
.bl.lm 16.i -16
1	XWDLIT	An XWD
.i -16;2	BYTLIT	A byte pointer
.i -16;3	ASCLIT	ASCII text
.i -16;4	SIXLIT	SIXBIT text
.i -16;5	D1LIT	1-word decimal
.i -16;6	D2LIT	2-word decimal
.i -16;7	FLTLIT	Floating point
.i -16;10	OCTLIT	Octal
.lm 0.bl
In the right half:
.bl.lm 8;Number or following words containing data.
.lm 0.bl 2
The data words are described in Section 2.8 of this manual.
.tp 10.hl 1 VALTAB - The Value Table
VALTAB holds the literals found in the output specifications as
edit words or output literals. Each value is placed in one or
more words. The first word has the number of characters in bits 0-6;
the remainder of that word, and the following words, if any, contain
an ASCII string.
.tp 10.hl 1 NAMTAB - The Name Table
NAMTAB contains the names of all files and data items found in the
source program. This is a table driven by several hash tables. The
search technique is described in the module "TRYNAM.MAC". Each
NAMTAB entry consists of at least two words, defined as below:
.bl.lm 24.i -18;Word 1:
.bl.i -24;	Bits 0-35	Undefined (available for flags)
.bl.i -18;Word 2:	The name, in SIXBIT, over as many words as is
necessary. The name is terminated by a zero byte.
.lm 0.tp 10.hl 1 EXTAB - The External Name Table
EXTAB contains information about external routines. This table
is used only by the EXIT operation at the present time, but is
included in this form to allow for the possibility of reentrant code
generation. Each two word entry in defined as follows:
.bl.lm 24.i -18;Word 1:
.bl.i -24;	Bits 0-2	Always 5 to identify the table
.i -24;EX.NAM	Bits 3-17	Pointer to NAMTAB entry for this name
.bl.i -18;Word 2:
.bl.i -24;EX.NRS	Bit 0		Name is used by non-resident segment
.i -24;EX.USN	Bit 1		Use flag:
.i -8;0 = OPsys name
.i -8;1 = User name
.i -24;EX.PID	Bit 2		This is the program ID
.i -24;EX.ENT	Bit 3		This is an entry point
.i -24;EX.CAL	Bit 4		Referenced by a CALL
.i -24;EX.CNT	Bits 15-17	Count of extra words allocated
.i -24;EX.HLD	Bits 18-35	Misc. uses
.lm 0
.chapter Runtime System Overview
.HL COMPONENTS OF RPGLIB
The RPG#II runtime system, RPGLIB, is a collection of library
routines to perform various functions needed by the object program.
In addition it contains a interpretive module, RPGMAN, which
simulates the RPG#II cycle, taking the burden of the code generators
in the compiler. The routines contained in RPGLIB are listed below:
.lm 24.bl
.i -16;CBLIO		Low level I_/O routines (taken from LIBOL)
.i -16;CHREQV		Generates a universal file containing the character
equivalences across the supported character sets
.i -16;CDD		Convert from one display format to another
.i -16;COMP		Comparison routines
.i -16;COMUNI		Define the impure area
.i -16;DEBUG		Debugging routines
.i -16;DIV11		Divide single precision by single precision
.i -16;DPADD		Do double precision add
.i -16;DPDIV		Do double precision divide
.i -16;DPMUL		Do double precision multiplication
.i -16;DPSUB		Do double precision subtraction
.i -16;DSPLY		Handle the DSPLY operation
.i -16;EASTBL		Define EBCDIC, ASCII, SIXBIT conversion tables
.i -16;EDIT		Handle editing
.i -16;FLGDF		Define flags for LIBOL compatibility
.i -16;FTDEFS		Define file table constants for CBLIO
.i -16;GC		Convert COMP-3 to binary
.i -16;GD		Convert display to binary
.i -16;INTERM		Define default switches
.i -16;MAGNEG		Take magnitude and negative of numbers
.i -16;MOVE		Perform moves
.i -16;MOVSGN		Move sign field
.i -16;NUMEQV		Define character/number equivalences
.i -16;PC		Convert binary to COMP-3
.i -16;PD		Convert binary ti display
.i -16;RPGASM		Define user selected switches
.i -16;RPGIO		Perform high level I_/O
.i -16;RPGIMP		Define impure area
.i -16;RPGMAN		Simulate RPG#II cycle
.i -16;RPGPUR		Define pure area
.i -16;RPGPRM		Define miscellaneous parameters
.i -16;RPGSWI		Define switch macros and constants
.i -16;SETRET		Do return and exit setup
.i -16;SPAC		Check for spaces
.i -16;SQRT		Find a square root
.i -16;SUBSCR		Do array/table subscripting
.i -16;UUOHAN		Handle UUO traps
.lm 0
.hl 1 Input/Ouput In RPGLIB
I_/O in the runtime system is performed by two modules:
RPGIO and CBLIO. Each performs a different level of I_/O.
.hl 2 RPGIO
This module contains the high level I_/O routines. It contains
the routines that the generated code talks to, and also the routines that
the RPG#II cycle simulator RPGMAN talks to. It is within
this module that all indicator checking and buffer setup is done.
.hl 2 CBLIO
All actual I_/O is done within this module. This is the same module
contained in COBOL's runtime system LIBOL. This module was used
to maintain complete compatibility with COBOL's I_/O system, especially
the ISAM handlers, without introducing still another piece of
software that must be supported.
.chapter Runtime System Internal Table Structure
The primary tables that the runtime system utilizes are: OTFTAB,
FTBTAB, DEVTAB, ICHTAB, OCHTAB, ARRTAB, and CHNTAB.
All except CHNTAB are set up by the compiler and output as part
of the object program. CHNTAB is allocated and set up by RPGLIB.
IDTTAB is also used by the runtime system, but each entry is assigned
a unique location in the literal pool. Thus, although the entries are
formated that same as in the compiler, the table itself is distributed
throughout memory, rather than grouped in one place as with the other
tables.
.hl 1 CHNTAB - The channel table
CHNTAB consists of one 23 word table for each file. Its primary use
is to allow quick access to some of the information contained in
OTFTAB and FTBTAB. When a file is opened, it is assigned a pseudo-channel
number. This psuedo-channel number is the entry number within CHNTAB.
The offsets into CHNTAB are defined as follows:
.bl 1.lm 16
.i -16;#0	CHN	I/O channel assignment
.i -16;#1	BLK	Blocking Factor (obsolete)
.i -16;#2	CUR	Current block in buffer (not always correct)
.i -16;#3	PNT	SIXBIT byte pointer
.i -16;#4	KEY	Relative key for next file access
.i -16;#5	RWF	REWRITE flag
.i -16;#6	BSZ	Buffer size in words
.i -16;#7	BUF	Base of I/O buffer
.i -16;10	BCN	Byte count in current buffer (obsolete)
.i -16;11	EOF	This file has reached end-of-file
.i -16;12-16	UPD	Update key
.i -16;17	LIN	Line counter
.i -16;20	IPC	Input chain pointer
.i -16;21	SEQ	Sequence number
.i -16;22	RII	Record identifying indicator
.lm 0
.bl 2 
Those entries marked as obsolete are defined for historical reasons
only.
.tp 10.hl 1 OTFTAB - The Object Time File Table
OTFTAB contains much the same information as FILTAB but has been
rearranged and condensed to be of more use to the runtime system. While
this table is built at compile time, it is used only at runtime
by the runtime system. Each file used by the object program generates 
one 9 word OTFTAB entry. 
.bl
Within this entry are pointers to the input and output chains related to
the file. These pointers point into ICHTAB and OCHTAB, respectivly.
Also contained in this entry is a pointer to the corresponding FTBTAB
entry so that the runtime system can gain access to CBLIO generated
information.
.bl 1
The entries are defined as follows:
.bl 1.lm 24.i -18;Word 1:
.bl;.i -24;OT.COR	Bits 0-17	Pointer to core index (not supported)
.i -24;OT.ADP	Bits 18-35	Pointer to ADDRout file
.bl 1.i -18;Word 2:
.bl.i -24;OT.BFP	Bits 0-17	Pointer to record buffer
.i -24;OT.OPC	Bits 18-35	Pointer to OCHTAB output chain
.bl.i -18;Word 3:
.bl.i -24;OT.IPC	Bits 0-17	Pointer to ICHTAB input chain
.bl.i -18;Word 4:
.bl.i -24;OT.NAM	Bits 0-35	Physical SIXBIT name of file
.bl.i -18;Word 5:
.bl.i -24;OT.TYP	Bits 0-2	File type (as defined in FI.TYP)
.i -24;OT.DES	Bits 3-5	File description (as defined in FI.DES)
.i -24;OT.PRO	Bits 6-8	Processing mode (as defined in FI.PRO)
.i -24;OT.ORG	Bits 9-10	File organization (as defined in FI.ORG)
.i -24;OT.RAF	Bits 11-12	Record address format (as defined in FI.RAF)
.i -24;OT.DEV	Bits 13-16	File device (as defined in FI.DEV)
.i -24;OT.EOF	Bit 17		EOF option (as defined in FI.EOF)
.i -24;OT.BLK	Bits 18-35	Blocking factor
.bl.i -18;Word 6:
.bl.i -24;OT.KYP	Bits 0-11	Key position within record
.i -24;OT.SEQ	Bits 12-13	Sequence checking (as defined in FI.SEQ)
.i -24;OT.BUF	Bits 14-19	Tape buffer offset
.i -24;OT.AST	Bits 20		ASCII file option
.i -24;OT.REW	Bits 21-22	Tape rewind option (as defined in FI.REW)
.i -24;OT.EXT	Bits 23-28	Number of extents
.i -24;OT.ADD	Bits 29-30	File addition option (as defined in FI.ADD)
.i -24;OT.KYL	Bits 31-35	Length of key field
.bl.i -18;Word 7:
.bl.i -24;OT.OVI	Bits 0-7	Overflow indicator
.i -24;OT.EXI	Bits 8-15	External conditioning indicator
.i -24;OT.OVL	Bits 16-21	Overflow line
.i -24;OT.CHN	Bits 32-35	Psuedo-channel number assigned to file
.bl.i -18;Word 8:
.bl.i -24;OT.CRS	Bits 0-17	Core index size (not supported)
.i -24;OT.BSZ	Bits 18-35	Buffer size in words
.bl.i -18;Word 9:
.bl.i -24;OT.BSC	Bits 0-17	Buffer size in characters
.i -24;OT.LAS	Bit 18		"I am the last OTFTAB entry" flag
.i -24;OT.LPP	Bits 19-25	Lines per page
.lm 0.tp 10.hl 1 FTBTAB - The CBLIO File Table
FTBTAB is generated to be compatible with the CBLIO module, which does all
of the actual I/O for the runtime system. A bare minimum of explanation
is given here, as little trouble should ever be experienced with this
table. It should be kept in mind that all items defined below are used
by RPG#II but are defined only for CBLIO compatibility.
More complete documentation may be found in CBLIO.MAC.
.bl
In addition to the 32 word entry defined below, there is also a 32 word
DEVTAB preceding each FTBTAB entry. This DEVTAB area is used only by CBLIO,
thus the compiler merely outputs zeroes for this area. Documentation
on the contents of DEVTAB can also be found in CBLIO.MAC.
.bl 1.lm 24.i -18;Words 1-5:
.bl.i -24;FT.FNM			The filename used within the users program in SIXBIT. This is not the 
physical filename that a LOOKUP is done on, but rather the
descriptive filename given by the user. Used for error messages.
.bl.i -18;Word 6:
.bl.i -24;FT.CVR	Bits 0-5	Compiler version number
.i -24;FT.BLC	Bit 6		Buffer location is assigned
.i -24;FT.SDF	Bit 7		SORT descriptor flag
.i -24;FT.NOD	Bits 8-17	Number of devices
.i -24;FT.DNM	Bits 18-35	Pointer to first device name
.bl.i -18;Word 7:
.bl.i -24;FT.NFL	Bits 0-4	Number of file limits
.i -24;FT.PMT	Bits 5-17	File position on Mag-tape
.i -24;FT.NFT	Bits 18-35	Pointer to next file table
.bl.i -18;Word 8:
.bl.i -24;FT.NAB	Bits 0-4	Number of alternate buffers
.i -24;FT.MRS	Bits 5-17	Maximum record size
.i -24;FT.RRC	Bits 18-35	Records between RERUN dump
.bl.i -18;Word 9:
.bl.i -24;FT.VLR	Bit 0		Variable length EBCDIC records
.i -24;FT.NSL	Bit 2		Non-standard labels
.i -24;FT.STL	Bit 3		Standard labels
.i -24;FT.IOF	Bit 6		Input/output file
.i -24;FT.DDM	Bits 7-9	Device data mode:
.i -8;0 = SIXBIT		3 = EBCDIC
.i -8;1 = Binary		4 = ASCII-8
.i -8;2 = ASCII	######5-7 = Unused
.i -24;FT.RRE	Bit 10		RERUN dump at end-of-reel
.i -24;FT.RCR	Bit 11		RERUN on record count
.i -24;FT.OPT	Bit 13		File is optional
.i -24;FT.CDM	Bits 14-15	Core data mode:
.i -8;0 = SIXBIT
.i -8;1 = Binary
.i -8;2 = ASCII
.i -8;3 = EBCDIC
.i -24;FT.MOD	Bits 16-17	File I/O mode:
.i -8;0 = Sequential
.i -8;1 = Random
.i -8;2 = ISAM
.i -8;3 = Unused
.i -24;FT.REC	Bits 18-35	Address of record area
.bl.i -18;Word 10:
.bl.i -24;FT.NLS	Bits 0-17	Non-standard label size
.i -24;FT.FSD	Bits 18-35	Link to file that shares same device
.bl.i -18;Word 11:
.bl.i -24;FT.BKF	Bits 6-17	Blocking factor
.i -24;FT.ACK	Bits 18-35	Address of actual key table
.bl.i -18;Word 12:
.bl.i -24;FT.VID	Bits 0-35	Byte pointer to value-of-id
.bl.i -18;Word 13:
.bl.i -24;FT.VDW	Bits 0-35	Byte pointer to value-of-date-written
.bl.i -18;Word 14:
.bl.i -24;FT.SBA	Bits 0-17	Link to file that shares the same buffer area
.i -24;FT.EUP	Bits 18-35	Address of error-use procedure
.bl.i -18;Word 15:
.bl.i -24;FT.BBR	Bits 0-17	Address of before-beginning-reel procedure
.i -24;FT.BBF	Bits 18-35	Address of before-beginning-file procedure
.bl.i -18;Word 16:
.bl.i -24;FT.ABR	Bits 0-17	Address of after-beginning-reel procedure
.i -24;FT.ABF	Bits 18-35	Address of after-beginning-file procedure
.bl.i -18;Word 17:
.bl.i -24;FT.BER	Bits 0-17	Address of before-ending-reel procedure
.i -24;FT.BEF	Bits 18-35	Address of before-ending-file procedure
.bl.i -18;Word 18:
.bl.i -24;FT.AER	Bits 0-17	Address of after-ending-reel procedure
.i -24;FT.AEF	Bits 18-35	Address of after-ending-file procedure
.bl.i -18;Word 19:
.bl.i -24;FT.DNS	Bits 0-2	Mag-tape density:
.i -8;0 = System standard
.i -8;1 = 200 BPI
.i -8;2 = 556 BPI
.i -8;3 = 800 BPI
.i -8;4 = 1600 BPI
.i -24;FT.PAR	Bit 4		Mag-tape parity:
.i -8;0 = Odd
.i -8;1 = Even
.i -24;FT.OUP	Bit 5		Open use-procedure when enter fails
.i -24;FT.PPN	Bits 18-35	Pointer to PPN
.bl.i -18;Word 20:
.bl.i -24;FT.BSK	Bits 0-35	Byte pointer to symbolic key
.bl.i -18;Word 21:
.bl.i -24;FT.BRK	Bits 0-35	Byte pointer to record key
.bl.i -18;Word 22:
.bl.i -24;FT.KTY	Bits 15-17	ISAM key type:
.i -8;0 = Non-numeric
.i -8;1 = Numeric display _< 11 digits
.i -8;2 = Numeric display _> 10 digits
.i -8;3 = COMP _< 11 digits
.i -8;4 = COMP _> 10 digits
.i -8;5 = COMP-1
.i -24;FT.KSG	Bit 20		ISAM key is signed
.i -24;FT.KLB	Bits 24-35	ISAM key length in bytes
.bl.i -18;Word 23:
.bl.i -24;FT.OWA	Bits 0-8	ISAM owner write access. Rightmost 4 bits correspond to Read, Rewrite, Write and Delete privledges.
.i -24;FT.OTA	Bits 9-17	ISAM other write access. Same bit assignments as FT.OWA.
.i -24;FT.RTC	Bits 18-35	ISAM retained record count
.bl.i -18;Word 24:
.bl.i -24;FT.PFS	Bits 0-35	Byte pointer to file-status
.bl.i -18;Word 25:
.bl.i -24;FT.PEN	Bits 0-35	Byte pointer to error-number
.bl.i -18;Word 26:
.bl.i -24;FT.PAC	Bits 0-35	Byte pointer to action-code
.bl.i -17;Word 28:
.bl.i -24;FT.PID	Bits 0-35	Byte pointer to value-of-id
.bl.i -18;Word 28:
.bl.i -24;FT.PBN	Bits 0-35	Byte pointer to block-number
.BL.I -18;Word 29:
.bl.i -24;FT.PRN	Bits 0-35	Byte pointer to record-number
.bl.i -18;Word 30:
.bl.i -24;FT.PFN	Bits 0-35	Byte pointer to file-name
.bl.i -18;Word 31:
.bl.i -24;FT.PFT	Bits 0-35	Byte pointer to file-table
.bl.i -18;Word 32:
.bl.i -24;FT.LHL	Bits 0-35	Pointer to low,,high file limit
.lm 0.tp 10.hl 1 ICHTAB - The Input Chain Table
ICHTAB contains entries chained together much as the DATAB items were;
the chaining path defines a data structure representing the users input
specifications. Each of the 7 word entries contains 2 pointers of
interest; the first is IC.NXR which points to the next record level item
in the chain; the second is IC.NXF which points to the next field level
item in the chain. In both cases, a pointer of zero terminates the chain.
.bl
The remainder of the entries are defined below:
.bl.lm 24.i -18;Word 1:
.bl.i -24;IC.DES	Bits 0-35	Byte pointer to assigned core location
.bl.i -18;Word 2:
.bl.i -24;IC.RII	Bits 0-17	Pointer to IDTTAB record identifying indicator chain
.i -24;IC.NXF	Bits 18-35	Pointer to next field level item
.bl.i -18;Word 3:
.bl.i -24;IC.NXR	Bits 0-17	Pointer to next record level item
.i -24;IC.ARP	Bits 18-35	Pointer to array this item references
.bl.i -18;Word 4:
.bl.i -24;IC.INP	Bits 0-17	Pointer to array index (or array index itself if IC.IMD = 1
.bl.i -18;Word 5:
.bl.i -24;IC.FMN	Bits 0-7	Minus field indicator
.i -24;IC.FBZ	Bits 8-15	Blank/zero field indicator
.i -24;IC.FPL	Bits 16-23	Plus field indicator
.i -24;IC.CLI	Bits 24-31	Control level indicator
.i -24;IC.NPS	Bits 32-33	Number per sequence (same as DA.NPS)
.i -24;IC.FLD	Bits 34-35	Field type (same as DA.FLD)
.bl.i -18;Word 6:
.bl.i -24;IC.FRR	Bits 0-7	Field record relation indicator
.i -24;IC.MAT	Bits 8-15	Matching indicator
.i -24;IC.RTR	Bit 16		Record type required
.i -24;IC.LHI	Bit 17		Look ahead item
.i -24;IC.STS	Bits 18-20	MFCU stacker select
.i -24;IC.SIZ	Bits 21-32	Size of field
.i -24;IC.SEQ	Bits 33-34	Sequence check option (same as DA.SEQ)
.i -24;IC.IMD	Bit 35		Immediate array reference
.bl.i -18;Word 7:
.bl.i -24;IC.SRC	Bits 0-11	Character position in source
.i -24;IC.OCC	Bits 12-26	Number of occurs for array item
.i -24;IC.FMT	Bits 27-31	Data format (same as DA.FMT)
.lm 0.tp 10.hl 1 OCHTAB - The Output Chain Table
OCHTAB is the direct counterpart of ICHTAB, but for the output specifications.
OCHTAB is linked in the same manner as ICHTAB, but each 7 word entry
contains information pertaining to output records and fields. Each entry
is defined as follows:
.bl.lm 24.i -18;Word 1:
.bl.i -24;OC.IDX	Bits 0-17	Pointer to array index
.i -24;OC.NXR	Bits 18-35	Pointer to next record level item in chain
.bl.i -18;Word 2:
.bl.i -24;OC.NXF	Bits 0-17	Pointer to next field level item in chain
.i -24;OC.IND	Bits 18-35	Pointer to conditioning IDTTAB chain
.bl.i -18;Word 3:
.bl.i -24;OC.SRC	Bits 0-35	Pointer to data source
.bl.i -18;Word 4:
.bl.i -24;OC.FLD	Bits 0-1	Field type (same as DA.FLD)
.i -24;OC.SIZ	Bits 2-13	Size of field
.i -24;OC.DEC	Bits 14-17	Number of decimal positions in field
.i -24;OC.STP	Bits 18-29	Sterling position (not supported)
.i -24;OC.PRI	Bit 30		MFCU print _& punch (not supported)
.i -24;OC.PRO	Bit 31		MFCU print only (not supported)
.i -24;OC.STR	Bit 32		Sterling sign (not supported)
.i -24;OC.ORT	Bits 33-34	Output record type (same as DA.ORT)
.i -24;OC.ADD	Bit 35		Add a record
.bl.i -18;Word 5:
.bl.i -24;OC.FOV	Bit 0		Forced overflow
.i -24;OC.SKB	Bits 1-7	Skip before line number
.i -24;OC.SKA	Bits 8-14	Skip after line number
.i -24;OC.SPB	Bits 15-16	Space before count
.i -24;OC.SPA	Bits 17-18	Space after count
.i -24;OC.END	Bits 19-30	Field end position in output record
.i -24;OC.STS	Bits 31-34	MFCU stacker select
.i -24;OC.IMD	Bit 35		Array index is immediate
.bl 1.i -18;Word 6:
.bl.i -24;OC.OCC	Bits 0-14	Number of occurs of array/table
.i -24;OC.EDT	Bits 15-18	Edit code (same as DA.EDT)
.i -24;OC.LTF	Bit 19		Literal only output flag
.i -24;OC.LSZ	Bits 20-28	Size of literal
.i -24;OC.RSV	Bits 29-32	Reserved word code (same as DA.RSV)
.i -24;OC.BLA	Bit 33		Blank this field after printing
.i -24;OC.TAB	Bit 34		"This is a table" flag
.bl.i -18;Word 7:
.bl.i -24;OC.ARP	Bits 0-17	Pointer to array this item references
.i -24;OC.EDP	Bits 18-35	Pointer to edit word/literal
.lm 0.tp 10.hl 1 ARRTAB - The Array Load/Dump Table
ARRTAB is generated for use by the runtime system whenever a table
or array must be loaded or dumped by the runtime system. This table
consists of a series of 4 word entries each defining a table that
is to loaded or dumped. The entries are set up as follows:
.bl.lm 24.i -18;Word 1:
.bl.i -24;AR.PNT	Bits 0-35	Byte pointer to array/table
.bl.i -18;Word 2:
.bl.i -24;AR.SIZ	Bits 0-9	Size of array entry
.i -24;AR.OCC	Bits 10-19	Number of occurs of the array/table
.i -24;AR.EPR	Bits 20-29	Number of entries per record
.i -24;AR.LDM	Bit 30		Dump/Load flag:
.i -8;0 = Load
.i -8;1 = Dump
.i -24;#AR.LAs	Bit 31		"This is the last entry" flag
.bl.i -18;Word 3:
.bl.i -24;AR.FIL	Bits 0-17	Link to OTFTAB entry for file this loads/dumps from/to
.i -24;AR.ASZ	Bits 18-27	Size of alternating table/array (if any)
.bl.i -18;Word 4:
.bl.i -24;AR.ALT	Bits 0-35	Byte pointer to Alternate table/array (if any)
.lm 0
.appen Reference Tables
.hl 1 Indicator values
In both the compiler and the runtime system, all indicators are referenced by
the numbers described below:
.bl
^&Indicator\&	^&Octal Value\&
.bl
01-99		1-143
.br;H1-H9		144-154
.BR;L1-L9		155-165
.BR;LR		166
.BR;OA-OG		167-175
.BR;OV		176
.BR;M1-M9		177-207
.BR;MR		210
.BR;L0		211
.BR;1P		212
.BR;U1-U8		213-222