207 DMAlgol Programming Reference Manual
207 DMAlgol Programming Reference Manual
DMALGOL
Programming Reference Manual
ClearPath MCP 16.0
You should be very careful to ensure that the use of this information and/or software material complies with the
laws, rules, and regulations of the jurisdictions with respect to which it is used.
The information contained herein is subject to change without notice. Revisions may be issued to advise of such
changes and/or additions.
Notice to U.S. Government End Users: This is commercial computer software or hardware documentation developed
at private expense. Use, reproduction, or disclosure by the Government is subject to the terms of Unisys standard
commercial license for the products, and where applicable, the restricted/limited rights provisions of the contract
data rights clauses.
Unisys and ClearPath are registered trademarks of Unisys Corporation in the United States and other countries.
All other brands and products referenced in this document are acknowledged to be the trademarks or registered
trademarks of their respective holders.
Contents
Section 1. Introduction
iv 8600 0874–207
Contents
Index ..................................................................................................... 1
8600 0874–207 v
Contents
vi 8600 0874–207
Tables
This reference manual describes the constructs that are unique to the DMALGOL
programming language. DMALGOL is an implementation language which is based on
Unisys Extended ALGOL, a high-level, structured programming language designed for
enterprise server systems. Unisys Extended ALGOL implements virtually all of ALGOL
60 and, in addition, includes extensions that enhance the basic capabilities of the
language.
Scope
This manual provides reference information for systems programmers who must use
DMALGOL to recompile products supplied by Unisys. It includes syntax, explanation,
and examples for those constructs unique to DMALGOL. It is designed to be used in
conjunction with the ALGOL Programming Reference Manual, Volume 1: Basic
Implementation and the ALGOL Programming Reference Manual, Volume 2: Product
Interfaces, which describe the other constructs that can be used in DMALGOL
programs.
Audience
The manual is intended for systems programmers who must use DMALGOL to
develop, update, and maintain system software for Enterprise Database Server and
certain other Unisys products.
Prerequisites
This manual is written for systems programmers who are familiar with Unisys
Extended ALGOL, as described in the ALGOL Programming Reference Manual, Vol. 1:
Basic Implementation and the ALGOL Programming Reference Manual, Volume 2:
Product Interfaces. It assumes also that readers are familiar with the product or
products for which they are developing or recompiling system software and with the
implementation of Accessroutines and MCP-based systems stack architecture.
Documentation Updates
This document contains all the information that was available at the time of
publication. Changes identified after release of this document are included in problem
list entry (PLE) 18967111. To obtain a copy of the PLE, contact your Unisys
representative or access the current PLE from the Unisys Product Support website:
http://www.support.unisys.com/all/ple/18967111
Note: If you are not logged into the Product Support site, you will be asked to do
so.
What’s New?
New or Revised Information Location
Programs using DMALGOL constructs can have far-reaching effects, and users must
ensure that the constructs are used correctly to avoid problems. To assist users in
identifying constructs that require extra care in their use, the DMALGOL compiler
designates some constructs as “unsafe.” A construct is considered unsafe when its
misuse might lead to violation of system integrity or security policy, or when it has not
been examined in enough detail to rule out the possibility of such misuse.
An unsafe code file can be executed as a by-function library if the file has been
installed using the SL (Support Library) system command. It can be made executable
under more general conditions by the MP (Mark Program) system command. For a
discussion of unsafe code files, including the conditions under which they can be
executed, see the Security Administration Guide. For additional information on the SL
and MP commands, see the System Commands Reference.
Specific usage of unsafe constructs can be flagged through the use of the
WARNUNSAFE and WARNALLUNSAFE compiler control options. For more information
on these control options, see Section 4.
Unsafe Extensions
The following DMALGOL extensions to ALGOL are considered unsafe. For more
information on these constructs, see Section 2.
• DISALLOW statement
• DMPROCOFF statement
• DMPROCREF function
• DMSCAUSE statement
• DMSFREE statement
• DMSFREEZE function
• DMSUPDATEDISKHEADER statement
• DMSWAIT function
• DMTRANSLOCK statement
• ENVIRONMENT declaration
• MEMORYDUMP statement
• READLOCKNOPURGE statement
• TPS Transaction Record Control Item Assignment statement
Note: For safety precautions, the use of all DMALGOL constructs, including those
not designated as unsafe, should be restricted to authorized personnel who must
use DMALGOL to compile programs.
The basic technique used to write DMSUPPORT libraries and other tailored software is
conditional compilation. Various pieces of code are omitted, included, and assigned
parameters based on information from the DASDL description file. This file is read by
the DMALGOL compiler and the DMALGOL language contains elements used to
conveniently reference its information.
NODE variables and PROPERTY definitions are used to refer to nodes within the
description file. A node is a data structure that consists of three parts: a list, a set of
properties, and a block part. Either the list or properties can be absent. The elements
of lists are frequently other nodes, but they can also be integers or other data items.
The syntax in DMALGOL to reference list element I of node N is N[I]. The properties of
a node are contained in a nonhomogeneous substructure whose format is defined by
PROPERTY declarations.
Examples
The following statement extracts the property RECORDSZ of the node N. The
properties actually used in the Accessroutines are included from the file called
DATABASE/PROPERTIES.
NODE N;
INTEGER T;
PROPERTY RECORDSZ=[11].[11:12];
T:=N.RECORDSZ;
The following example shows a special form of the 'FOR statement that is used to
access the members of a node's list. The compiler obtains the number of items in the
list from DASDL, which keeps a record of the number of list items at OFFSET=0.
This statement goes through each member of the list belonging to the node
STRUCTURE and assigns its successive list elements to the node SPANSET.
The next example shows a special form of the 'INCLUDE statement that is used to
access the text section of the DASDL description file. This section consists of a set of
source language DMALGOL constructs and the text is always referred to by an
appropriate property. For example, data set nodes contain a property called
VERIFYSTORETEXT that checks whether a record meets all verification rules before it
is stored. To access this text for node DS, the following statement is written:
'INCLUDE DS.VERIFYSTORETEXT.
This statement causes DMALGOL to extract the appropriate text and compile it.
Environments
The Enterprise Database Server builds the Database Stack (DBS), which is a true
running stack and resembles a shared-by-all library. The stack is built up through the
Master Control Program (MCP) procedure DMSOPEN. One task of DMALGOL is to
build the stack image. This is done by using the ENVIRONMENT declaration, which
delimits the boundaries of each environment in much the same way as a PROCEDURE
declaration does. Environments cannot be nested more than three deep.
The Accessroutines code file is an executable program that builds the DBS then
freezes in a special way using the DMSFREEZE construct of DMALGOL. After the stack
is built up, the code executes its outer block and calls the three last compiled
environments at the next level. The first is a general D[3] environment (lexical level 3)
used to attach pre-Mark 3.5 Structure Information Block (SIB) environments for data
sets. The second D[3] environment is used to attach pre-Mark 3.5 SIB environments
for sets. The third environment is a DMSFREEZE environment. During OPEN, a series
of D[3] environments are added and tailored for each structure opened. After the last
structure for the first user is opened, the DMSFREEZE environment is called again.
When another user opens different structures, new D[3] environments are added on a
demand basis as structures are opened.
Example
ENVIRONMENT X OF 2;
BEGIN
PROCEDURE P;
END;
ENVIRONMENT X OF 3;
BEGIN
PROCEDURE P;
P;
P'2
END;
Reference Variables
DMALGOL provides the ability to declare array reference variables, procedure
reference variables, file reference variables, and direct file reference variables. These
reference variables allow for dynamic selection of procedures, files, and direct files
within the Enterprise Database Server system.
In the case of the library being delinked, the situation can be made safe if the program
that exports the procedure nulls the reference when it detects that the library is
delinking. If the library is a connection library, then this can be done in the CHANGE
procedure, when the new state is VALUE (DELINKING). See the ALGOL Programming
Reference Manual, Volume 1: Basic Implementation for more information on CHANGE
procedures.
It is not possible to make calls on the shared procedure using the <procedure
identifier> <structure number> syntax described under “Environments,” because that
would change the environment as well. Rather, a Program Control Word (PCW) is
constructed for each environment; for a shared procedure, the PCW in each
environment points to the same segment descriptor. The PCW allows the procedure
to be shared by different environments, but behave as if it were local to each
environment.
This section describes the extensions to various ALGOL constructs that are available
in DMALGOL. For more information on the constructs, see the ALGOL Programming
Reference Manual, Vol. 1: Basic Implementation.
Array Declaration
DMALGOL supports all ALGOL array declarations. As an extension of the ALGOL
construct, DMALGOL provides the user with a SAVE option. This option, used only in
the Accessroutines, causes the array be placed in SAVE memory to ensure it a
permanent location for the duration of the Accessroutines execution.
<array declaration>
<array declaration>
SAVE
Explanation
For a detailed description of the array declaration construct, see the ALGOL
Programming Reference Manual, Vol. 1: Basic Implementation.
Note: The SAVE form of the array declaration is considered unsafe. Use of this
construct in new code is not recommended.
Example
SAVE ARRAY A[0:100];
ABORTTRANSACTION Statement
The ABORTTRANSACTION statement backs out all updates that occurred during the
transaction and removes the program from transaction state.
<ABORTTRANSACTION statement>
ABORTTRANSACTION <restart data set>
<exception handling>
Examples
ABORTTRANSACTION VENDOR_RESTART;
ABORTTRANSACTION OUTPUT_HEADER MY_RESTART;
CANCELTRPOINT Statement
The CANCELTRPOINT statement is used to back out all updates in a transaction to an
intermediate save point or to the beginning of the transaction.
<CANCELTRPOINT statement>
CANCELTRPOINT <restart data set>
(<integer expression>)
<exception handling>
Explanation
If there is an associated arithmetic expression that is nonzero, the save point identified
by the arithmetic expression is used. Otherwise, all updates that occurred during the
transaction are backed out. In either case, the program is left in transaction state.
Example
CANCELTRPOINT (MAIN_SAVE_POINT) MY_RESTART;
FREE Statement
The FREE statement is used to release locked or secured records.
<FREE statement>
FREE <selection expression>
Explanation
The FREE STRUCTURE statement frees the records in a structure that was explicitly
locked by a LOCK STRUCTURE data set statement or explicitly secured by a SECURE
STRUCTURE data set statement.
Example
FREE STRUCTURE VENDOR_DATA;
LOCK Statement
The LOCK statement is used to lock records for exclusive use by one program
(exclusive lock). No other program can access the locked records. A user can lock
individual records or all the records in a structure.
<LOCK statement>
LOCK <selection expression>
<input mapping>
Explanation
A structure lock can be explicit or implicit.
An explicit lock occurs when the LOCK STRUCTURE data set Syntax is used, which
locks all the records in the structure. The records are freed by using the FREE
STRUCTURE data set statement described earlier in this section.
An implicit lock occurs when a user locks more than 50 records in any structure. The
records are freed at ENDTRANSACTION.
If a user attempts to lock a structure in which other users have locked or secured
records, the structure will not be locked until the users free the records or reach
ENDTRANSACTION. If the users attempt to lock or secure additional records while the
structure is being locked, a deadlock occurs.
Example
LOCK STRUCTURE VENDOR_DATA;
SAVETRPOINT Statement
The SAVETRPOINT statement is used to mark or designate an intermediate save point.
The associated arithmetic expression is used to identify the save point.
<SAVETRPOINT statement>
SAVETRPOINT (<integer expression>) <restart data set>
<exception handling>
Explanation
This statement writes a save point record to the audit file that contains the integer
expression. The save point can later be referenced in the CANCELTRPOINT statement.
A user can abort a transaction to any save point previously established for that
transaction.
Save points serve only as markers for aborting the current transaction while the
database is up. Save points do not affect halt/load recovery. Halt/load recovery will
always finish on a completed transaction, rather than on a save point.
Example
SAVETRPOINT (3) RSTRTDS;
SECURE Statement
The SECURE statement enables multiple programs to share the same locked records
for read only access (shared lock). Individual records or all the records in a structure
may be secured.
<SECURE statement>
SECURE <selection expression>
<input mapping>
Explanation
A structure secure can be explicit or implicit.
An explicit secure occurs when the SECURE STRUCTURE data set Syntax is used,
which secures all the records in the structure. The records are freed by using the
FREE STRUCTURE data set statement described earlier in this section.
An implicit secure occurs when you secure more than 50 records in any structure. The
records are freed at ENDTRANSACTION.
If you attempt to secure a structure in which other users have locked or secured
records, the structure will not be secured until the other users free the records or
reach ENDTRANSACTION. If the users attempt to lock or secure additional records
while the structure is being secured, a deadlock occurs.
You can lock records that are secured by issuing a LOCK statement. However, if two
users try to lock the secured records, a deadlock occurs.
Compile-Time Facility
DMALGOL provides the user with several extensions to the ALGOL compile-time
facility. For information on the ALGOL compile-time facility, see the section on the
compile-time facility in the ALGOL Programming Reference Manual, Vol. 1: Basic
Implementation.
'DEFINE Statement
The 'DEFINE statement can be used in DMALGOL to declare an identifier to be a
preprocessor define identifier.
Explanation
The compile-time 'DEFINE statement is processed when referenced by the identifier in
a subsequent 'INVOKE statement.
Example
BEGIN
INTEGER I;
'FOR Statement
The 'FOR statement extension provides for iterative compilation of ALGOL source
code.
DO <compile-time statement>
<begin clause>
’BEGIN <text 1> ’NEXT <text 2> ’PRIOR <text3> ’END
Explanation
One iteration is made over the source code for each entry in the list belonging to the
<nodeid 2> construct. The <nodeid 2> construct must be the index of a node in the
Data and Structure Definition Language (DASDL) array.
For each iteration, the control variable is assigned the index of the list element if the
<nodeid 1> construct is specified or the contents of the list element if the number
identifier construct is specified.
If the WHERE clause is used, a constant Boolean expression must be specified. Before
the statement following DO is processed but after the control variable has assumed
its next value, the Boolean expression is evaluated. If the expression is TRUE, the
statement following DO is processed; otherwise, the statement is ignored.
The compile-time statement can include any of the DMALGOL extensions to the
ALGOL compile-time facility.
2. After the last iteration, the <text 2> construct is processed just once.
3. Finally, the iteration is repeated, backwards, for the <text 3> construct.
If a WHERE clause is used, the backwards iteration processes exactly the same cases
as the first iteration; that is, the Boolean expression is not reevaluated while backing
out of the “telescope.”
'INCLUDE Statement
The 'INCLUDE statement causes the compiler to process text directly from the DASDL
array.
Explanation
The value of the specified property is assumed to be an index of text in the DASDL
array. That text must be terminated by a pound sign (#) and at least one null character
(4" 00").
The compiler does not expand defines in database declarations where the define
identifier was the result of a compile-time 'INCLUDE statement.
'INVOKE Statement
The 'INVOKE statement causes the compile-time statement previously associated
with the compile-time define identifier in a 'DEFINE statement to be processed.
Explanation
The original line numbers of the 'DEFINE declaration are preserved.
For an example of how the 'INVOKE statement is used, see the example provided for
the 'DEFINE statement.
NODE Declaration
The NODE declaration is used to declare a node identifier. It is similar to the ALGOL
compile-time variable declaration NUMBER. An identifier declared to be a node is a
compile-time variable that must be used in conjunction with a compile-time array
created by the Data and Structure Definition Language (DASDL). The node variable
represents an index into the DASDL array.
NODE C <identifier> C
Explanation
The value of the node variable can be changed at any time during compilation by
means of a compile-time 'LET statement.
The <constant arithmetic expression 1> construct represents the initial index of the
node variable. By default, the initial value is zero, which is otherwise an illegal value;
thus, a node must be initialized or assigned a value before it is used.
Normally, the node variable represents the index of a node in the DASDL array. A list
and a set of properties are associated with a node. The list is usually a list of nodes,
and the properties contain values. The node variable can be used to reference
members of the list and values of the properties. For example, if N is a node variable
and P is a property identifier, then
Example
NODE NODULE := 6;
This example declares a node identifier called “NODULE” with an initial index value of
6.
* ’ERROR ?@ , B
’DISPLAY C <nodeid> C
* <string>
<arithmetic expression>
Explanation
Each line can contain up to 87 characters, starting in position 18.
The lines are created from the information given in the statement, as follows:
• If the <nodeid> construct is specified, the property “name” (an alpha property) for
the node is inserted into the line.
• If the <string> construct is specified, it is inserted into the line.
• If the <arithmetic expression> construct is used, it must be a constant arithmetic
expression. It is assumed to be an integer, and the value of the integer, zero
suppressed, is inserted into the string.
If the 'ERROR form is used, the compiler's error count is incremented by one, and the
printed line is enclosed in angle brackets (<>) as with a typical syntax error message.
Examples
'PRINT "BEGINNING OUTER BLOCK CODE"
'ERROR "NO HANDLING FOR THIS CASE HAS BEEN IMPLEMENTED"
'DISPLAY I;
PROPERTY Declaration
The PROPERTY declaration declares a property identifier that defines the location and
format of a property value associated with a node in a DASDL array.
<type>
<property specification>
[ <arithmetic expression 1> ]
Explanation
Each arithmetic expression must be a constant arithmetic expression. Arithmetic
expression 1 specifies the word in the property set. Arithmetic expressions 2 and 3
specify a field within the word; if they are not given, the entire word is used.
A property identifier is used only with a node variable. This node property construct
represents the value of the property for the given node. It can be used wherever
constants of the specified type can appear.
The node property construct is used only to retrieve a value from the DASDL array. It
cannot be used to change a property value. (In fact, no construct can change the
DASDL array, as it is read-only).
Explanation
“Dynamic” specifies that the description of the database is to be provided by the
application at run time rather than at compile time.
Dynamic databases are a type of Enterprise Database Server database. They are not
bindable.
Examples
DYNAMIC DATABASE D81;
DYNAMIC DATABASE D81, D82;
PROTECTED
<unlabeled statement>
Explanation
An exception procedure is subject to interruptions such as those caused by software
interrupts, stack stretching, and the DS and STOP system commands. A protected
exception procedure is not subject to such interruptions; however, the protected
status of the procedure does not apply when the procedure is called directly.
If a protected exception procedure is declared, the code file is marked as unsafe and
nonexecutable. The code file can be opened only with the SL or MP system command.
For additional information on the SL and MP commands, see the System Commands
Reference.
Example
BEGIN
MESSAGE M1;
PROCEDURE P;
BEGIN
MESSAGE M2;
IF ... THEN
DCWRITE(M1)
ELSE
DWRITE(M2);
END
END;
ONCE-ONLY Compilation
ONCE-ONLY compilation is used to save compilation time and code space. It is
established using the compile-time 'LET statement and a special form of the
PROCEDURE declaration.
<procedure declaration>
<procedure type> PROCEDURE <procedure heading> ; EXTERNAL
<number variable>
Explanation
ONCE-ONLY compilation is restricted to use by programs having an ENVIRONMENT
declaration (that is, Accessroutines). It is used when a procedure declared in one
environment is common to one or more other environments. Normally, ALGOL scope
rules require that each instance of the procedure be compiled; thus, each instance
receives its own code segment. With the DMALGOL extensions, a procedure need
only be compiled once, in the first environment. Subsequent environments refer back
to that declaration.
When the ONCE-ONLY compilation feature is used, the same code segment (or
procedure) is executed in different addressing environments. Therefore, the
procedure declaration must be identical except for the lack of a procedure body in the
external procedure. DMALGOL does not check the procedure declarations for
consistency; it simply copies the program control word (PCW) for the original
procedure into the environment containing the EXTERNAL PROCEDURE declaration.
The procedures must be declared at the same lexical level in equivalent environments.
If the procedure body refers to global variables, those variables must be declared in
each environment so that they are allocated at the same stack addresses. The
variables must also be of the same type.
Example
NUMBER GETADDRESSPCW;
BOOLEAN PROCEDURE GETADDRESS (A);
VALUE A;
REAL A;
BEGIN
.
.
.
END;
'LET GETADDRESSPCW := GETADDRESS;
OPEN Statement
DMALGOL contains six options for the OPEN statement that are related to opening a
database. These options are used to indicate special circumstances to the
Accessroutines.
<OPEN statement>
OPEN RECOVER <database name>
* UTILITY
* MAPPER
* INQUIRYSEMANTIC
* UPDATESEMANTIC
* REORG
PREVERIFY
Explanation
The exception handling construct is used to denote those statements where a
program variable can be designated to receive the value of the database status word.
For more information on exception handling, see the section on exception processing
in the ALGOL Programming Reference Manual, Vol. 1: Basic Implementation.
Example
OPEN RECOVER DB1:B;
Procedure Declaration
DMALGOL supports all ALGOL procedure declarations. As an extension of the ALGOL
construct, DMALGOL provides the user with an EVENT procedure type.
<procedure type>
<type>
* STRING
* <string type>
EVENT
Explanation
An EVENT-valued procedure returns a reference to an event as its procedure value.
This reference takes the form of an SIRW to a single EVENT or an indexed descriptor
to an element of an EVENT ARRAY. The event reference that is returned can be used
anywhere a regular event designator is used.
Array References
An array reference assignment associates a variable, called an array reference, with an
<array designator>, which in ALGOL can designate only an array or subarray.
DMALGOL allows several additional types of array designations to be assigned to the
array reference identifier. In addition, DMALGOL allows for up-level array reference
assignments in some cases.
* <database id>.DMSIB1
* <database id>.DMSIB2
* <database id>.DMSIBDESC
* DMKEYAREA
* DMSIBDESC
Explanation
The <array designator> construct indicates the array or array portion to be associated
with the array reference variable. In DMALGOL, the array designator can be any valid
ALGOL array designator. Following an array reference assignment, the array reference
variable becomes a referred array, describing the same data as the array designator,
which can itself be an original array or another referred array.
DMALGOL accepts the three <database id> arrays as valid array designators. These
three arrays are constituents of the database declaration. Unless the database
identifier was declared dynamic, the array reference being assigned is marked read-
only; data can be retrieved but not stored through that array reference.
When there is exactly one database declared in a program, and that database is not
dynamic, DMALGOL accepts the three designators DMKEYAREA, DMWORKAREA, and
DMSIBDESC. For more information about these designators, see “DMINQ Arrays” in
Section 3.
Transaction record variables are described in the section describing the user language
interface to TPS in the Enterprise Database Server for ClearPath MCP Transaction
Processing System (TPS) Programming Guide.
Example
A := DB.DMSIB1
In this example, the array reference A is associated with the array designator
DB.DMSIB1.
For more information about the PROCEDURE REFERENCE ARRAY declaration, refer to
the ALGOL Programming Reference Manual, Vol. 1: Basic Implementation.
Procedure References
A procedure reference declaration declares a procedure reference identifier. This
enables dynamic selection of procedures within Enterprise Database Server. The
DMALGOL extension to this construct permits up-level reference assignments.
<proc. type>
Explanation
This form of procedure reference declaration specifies a body of code to be executed
if the procedure reference id construct is used before an assignment is made to it.
For more information regarding the PROCEDURE REFERENCE Declaration, refer to the
ALGOL Programming Reference Manual, Vol. 1: Basic Implementation.
File References
DMALGOL provides the ability to declare reference variables for files and direct files.
This ability allows for dynamic selection of files and direct files within Enterprise
Database Server.
Declaration Syntax
<FILE REFERENCE declaration>
?@ , B
FILE REFERENCE C <file reference id> C ;
DIRECT
Assignment Syntax
<FILE REFERENCE assignment>
<file reference id 1> := <file identifier> ;
Explanation
Prior to being assigned a value, a file reference variable does not point to a file.
In the file reference assignment statement, the left and right file identifiers must both
be DIRECT or both be non-DIRECT.
Example
FILE REFERENCE FR1;
FR1 := RMT;
This example first declares a file reference FR1, then assigns an RMT to FR1.
There are two points to notice about verification checking. First, there is no way to
turn it off completely for non-DMIO files. If the test cannot be performed at compile
time, it is performed at run time. Second, the MCP run-time checks are conservative
and can at times reject a legitimate situation. For Example, if either the event or the
direct array is in a library or database stack, the only acceptable case is when both are
in the same stack and the event is lower in the stack than the direct array. If the event
and the direct array are in the same block, the event must be declared first.
This section describes the functions and statements that are unique to DMALGOL.
ALLOW Statement
The ALLOW statement is used with the DISALLOW statement to mark critical sections
of code in the Accessroutines where a series of operations must be performed
without interruption. The ALLOW statement permits interrupt code to be executed.
<ALLOW statement>
ALLOW
Explanation
The ALLOW statement appears at the end of a section of critical code to reenable
external interrupts that were previously disabled by a DISALLOW statement.
DISALLOW Statement
The DISALLOW statement is used with the ALLOW statement to mark critical sections
of code in the Accessroutines where a series of operations must be performed
without interruption. The DISALLOW statement prevents interrupt code from being
executed.
<DISALLOW statement>
DISALLOW
Explanation
The DISALLOW statement appears at the beginning of the section of critical code to
disable external interrupts. The external interrupts can be reenabled at the end of the
section using the ALLOW statement.
DMINQ Functions
The DMINQ functions consist of the DMINQ interface function and the DMINQ arrays.
In a program that uses a DMINQ function, one database (no more, no less) must be
invoked in the normal manner, or a syntax error is returned.
<DMINQ function>
DMINQ [ <arithmetic expression> ] ( <array row> )
Explanation
The arithmetic expression specifies the index (ENVINX) within the Structure
Information Block (SIB) for the desired structure. The array row specifies a one-
dimensional array used to communicate with the Accessroutines. The contents of the
array control the function performed by the system.
The value of the array element, A[0], identifies the specific procedure as described in
Table 3–1:
The procedures outlined in the previous table are described in detail under the
following headings.
Parameters
A[1] = FIND:
-1 = current record
0 = next in set
1 = next in set = User Key Area (UKA)
2 = next in set > UKA
3 = next in set >= UKA
4 = link in set
5 = prior in set
6 = prior in set = UKA
7 = prior in set < UKA
8 = prior in set <= UKA
This parameter specifies the size of the key passed to pathfinder in the user key area.
If SZ is less than zero (0), then ABS(SZ) is the number of hex characters in the user
key; otherwise, SZ is the number of bytes in the user key.
This parameter specifies the size of the major portion of the user key which must
exactly match the retrieved key. If SZ is less than zero (0), then ABS(SZ2) is the
number of hex characters in the user key; otherwise, SZ2 is the number of bytes in the
user key.
As an example, if an index set had a concatenated key (A,B,C) with each portion two
bytes long, to retrieve the next key where A=UKA and B=UKA requires SZ=4 and
SZ2=4. To retrieve the next key where A=UKA and B>UKA requires SZ=4 and SZ2=2.
If a record is found as specified, the AA word is returned in A[1]. A GETDATA call must
be used to move the record to the user's work area.
Parameters
A[1] = LOB ID
A[2] = LOB item Occurrence Number
A[3] = Total size of LOB data
A[4] = Chunk size
A[5] = Not used
A[6] = Not used
A[7]-A[n] = LOB data starts
Notes:
• This procedure allows users to allocate disk space for an Internal LOB item
without storing data. The Chunk size , (A[4]), must be 0.
• This procedure allows users to allocate disk space for a LOB item and store the
first chunk of data. The Chunk size (A[4]) and LOB data (A[7]-A[n]) cannot be null.
• This procedure allows users to append data to an existing LOB item, the Total
size (A[3]) must be 0 and Chunk size (A[4]) and LOB data (A[7]-A[n]) cannot be
null.
• No data is returned in array A after a successful call.
Parameters
A[1] = LOB ID
A[2] = LOB item Occurrence Number
A[3] = Total size of LOB data(returned)
A[4] = Chunk size (passed)
A[5] = Offset (passed and returned)
A[6] = Last Byte Stored (returned)
A[7]-A[n] = LOB data starts(returned)
This procedure allows users to locate LOB data for an Internal LOB Item. Users pass
A[1], A[2], A[4], and A[5]. The LOB data will be returned starting at A[7], the Total size is
returned in A[3], and the offset is returned in A[5] and the Last byte stored is returned
in A[6].
Parameters
A[1] = LOB ID
A[2] = LOB item Occurrence Number
No data is returned in array A.
Parameters
A[1] = FINDTYPE:
0 = set to beginning
1 = set to ending
A[i], i>1, not used
Parameters
A[1] = FIND:
0 = find current data set
1 = lock current data set
2 = find next data set
3 = lock next data set
4 = find prior data set
5 = lock prior data set
Parameters
A[1] = AA word of desired record
Parameters
A[1] = AA word of desired record
Parameters
A[1] = Unused
A[2] = LLOC parameter
A[3] = LLEN parameter
Parameters
A[i], i>0, not used
Parameters
A[i], i>0, not used
If the existing timestamp in the Accessroutines is not zero and a call on this DMINQ
function is made (passing a new timestamp), this DMINQ function returns a value of
TRUE and the new timestamp is not captured by the Accessroutines.
Parameters
None
Parameters
None
Parameters
The transaction address in the is returned in words A[0], A[1] and A[2], as follows:
• A[0] is the file number of the address.
• A[1] is the block number of the address.
• A[2] is the offset number of the address.
Parameters
None
Parameters
None
Parameters
A[1] = CREATETYPE:
0 = create
1 = recreate
A[2] = Record type, if format is variable; else unused
Parameters
A[i], i>0, not used
Parameters
Table 3–2. Word Values and Descriptions for the Get Statistics
Information Procedure
Table 3–2. Word Values and Descriptions for the Get Statistics
Information Procedure
OR: OR:
Field Contents
[47:24] Not used
[23:8] Group type
[15:16] Number of words in group
(including header)
Word[Word 5] Header word for Precedes each group and indicates the
subgroup 1 Group type and the number of words of
information in the group.
The layout of this header word is as follows:
Field Contents
[47:24] Not used
[23:8] Group type
[15:16] Number of words in group
(including header)
Word[Word 5 + ] First data word
for subgroup 1
Word[Word 5 + Header word for
n] subgroup 2
Word[Word 4 - 1] End-of-statistics Follows the last group of statistics and has
flag a Group type of zero (0).
Note: The Accessroutines process the request and return the result in the array
starting at Word 3. Words 0 through 2 are unaffected by the Accessroutines. The
format of the result is stated in the description column.
The various group types and their layouts are shown in the following tables. Ticks
refer to time on the processor clock. For example, one tick equals 2.4 microseconds.
The group types can appear in any order.
Word Contents
Group type 6
1 Time database opened (TIME(7) value).
2 Maximum valid structure number in database.
3 Database options:
[0:1] = 1 if STATISTICS is initialized in database
[1:1] = 1 if database is audited
[2:1] = 1 if LOCKSTATISTICS is initialized in database
4 Compile-time $options:
[10:01] = 1 if database is partitioned
[13:01] = 1 if B7700 optimize is initialized
[17:01] = 1 if database STATISTICS is initialized
[22:01] = 1 if database is audited
5 Database DASDL options:
[4:1] = 1 if POPULATIONWARN is enabled for any structure
[5:1] = 1 if POPULATIONINCR is enabled for any structure
[8:1] = 1 if INDEPENDENTTRANS is initialized
[9:1] = 1 if REAPPLYCOMPLETED is initialized
[10:01] = 1 if database is partitioned
[12:01] = 1 if TPSDUALUPDATE is initialized
[13:01] = 1 if B7700 optimization is initialized
[15:01] = 1 if CHECKSUM is initialized
[16:01] = 1 if REBLOCK is initialized
[17:01] = 1 if database STATISTICS is initialized
[18:01] = 1 if KEYCOMPARE is initialized
[19:01] = 1 if RDSSTORE is initialized
[20:01] = 1 if ALLFAULTRESTART is initialized
[21:01] = 1 if BACKOUTTOSPT is initialized
Word Contents
Group type 1
1 Current database open count.
2 Current number of users that have database open for update.
3 Current database open state:
0 – database is not open
4 – database is open
5 – database is undergoing recovery
4 Unused.
5 Maximum total buffer space in words (entire database).
6 Current total buffer space in words (entire database).
7 Current ALLOWEDCORE value (entire database).
8 Current OVERLAYGOAL value multiplied by 1000 (entire database).
Word Contents
Word Contents
Word Contents
41 Sum of the blocksizes for forced audit write operations for FILE
SWITCH.
42 Number of forced audit write operations for REORG ETR
Force audit for REORG ETR indicates the count and the time, in
ticks, that the program spent waiting for the audit buffers to
completely flush during the audit switch. These values should
range from 40 to 80 ticks.
43 Total waiting time for forced secondary audit write operations for
REORG ETR, in ticks.
44 Total waiting time for forced primary audit write operations for
REORG ETR, in ticks.
45 Sum of the blocksizes for forced audit write operations for
REORG ETR.
47 Total waiting time for forced secondary audit write operations for
WRITE AUDIT BLOCK, in ticks.
48 Total waiting time for forced primary audit write operations for
WRITE AUDIT BLOCK, in ticks.
49 Sum of the blocksizes for forced audit write operations for WRITE
AUDIT BLOCK.
52 Total waiting time for other forced primary audit write operations,
in ticks.
Word Contents
59 Total waiting time for secondary audit BLOCK ZERO audit writes;
2.4 ms ticks.
60 Total waiting time for primary audit BLOCK ZERO audit writes; 2.4
ms ticks.
62 Number of times the audit EOF has been extended; This occurs
each time a new row (area) is added.
63 Total waiting time for secondary audit to extend the EOF and
update the disk header; 2.4 ms ticks.
64 Total waiting time for primary audit to extend the EOF and update
the disk header; 2.4 ms ticks.
65 Empty.
67 Total time spent by the secondary audit to test for and possibly
wait for a PREVIOUS AUDIT I/O, in the same section, to complete;
2.4 ms ticks.
Word Contents
68 Total time spent by the primary audit to test for and possibly wait
for a PREVIOUS AUDIT I/O, in the same section, to complete; 2.4
ms ticks.
Word Contents
Word Contents
Group type 7
1 Structure number :
STATSECTIONF = [47:24] Section number of a sectioned structure.
STATSTRNOF = [23:24] Structure number.
2-4 Structure name (first byte is length in binary).
5 Structure type:
2 = data set
5 = index set
6 Structure subtype (refer to the DATABASE/PROPERTIES symbolic
file for more information).
7 Structure nesting level (1 = disjoint).
8 Structure block factor (in records for data sets, in key entries for
index sets).
9 Structure physical block size in words (including integrity-checking
words).
10 Structure area size in sectors.
11 = 1 if structure is checksummed.
12 = 1 if structure is addresschecked.
If A [1].[47:24] = 0 and the structure is not sectioned, the request will return the
cumulative statistics for the one and only section for that structure. If the structure is
sectioned, the request returns the statistics for the section number in A [1].[47:24].
Therefore, an un-modified user program that requests statistics with A [1].[47:24]
implicitly set to zero, will receive only the statistics for section zero of the file. If A
[1].[47:24] is non-zero, the section number is validated and statistics are returned for
the section requested.
Word Contents
Group type 8
1 Current number of random-access users.
2 Current number of serial-access users.
3 Current number of buffers allocated for structure.
4 Current number of big buffers (for serial users) allocated for
structure.
5 Current number of all users (inquiry and update).
6 Current number of update-access users.
Group type 9 (present only if STATISTICS is SET and structure is a data set)
1 Number of internal FIND operations issued for a data set.
2 Number of CREATE/STORE commands issued against data set.
3 Number of MODIFY/STORE commands issued against data set.
4 Number of DELETE commands issued against data set.
5 Number of times control information changed.
6 Number of user FIND operations for a data set.
Group type 10 (present only if STATISTICS is SET and structure is an index
set)
1 Number of FIND commands issued against index set.
2 Number of INSERT commands used in index set.
3 Number of key data changes in index set.
4 Number of key deletions from index.
Group type 11 (present only if STATISTICS is SET)
1 Number of physical read operations against structure.
2 Number of physical write operations against structure.
3 Number of ticks spent waiting for read operations to complete.
4 Number of ticks spent waiting for write operations to complete.
5 Total amount of I/O time accumulated on file.
6 Number of readahead operations issued against structure.
7 Number of writeahead operations issued against structure.
Word Contents
Word Contents
The message is passed to the Visible DBS message processing routine and any
response message is returned starting at A[1]. If the response contains multiple lines,
4"0D" is used to separate the multiple lines. The last line is terminated by 4"00".
Parameters
None
Parameters
None
Parameters
None
Parameters
None
Parameters
A[1] = Number of words in array
A[N] = As follows:
Field Contents
Parameters
None
Parameters
Not EXTENDED
EXTENDED
SYSTEM/DMUTILITY also uses the DMINQ function to notify the database that the off-
line dump is complete.
Parameters
A[1] = 0 indicates offline dump is beginning
A[1] = 1 indicates offline dump is complete
Set Cursor is always at the disjoint data set level and implicitly sets the cursor of all
embedded and spanning structures. The DMINQ function can be called for any
structure; however, it always locates the disjoint data set for the structure and calls
Set Cursor on that disjoint data set. A Set Cursor performed on an Enterprise Database
Server set (as opposed to a data set) changes the cursor for that set only. No data set
cursors are affected.
Example
ENVINX := DMSIBINDEX (EMP);
A[0] := 33;
A[1] := CURSOR;
DMINQ [ENVINX] (A);
Parameters
A[1] = Cursor
For data sets, the lock status of records is also equated. As with multiple compile-time
invocations, lock and secure procedures performed by the same user in different
invocations do not cause a deadlock.
Parameters
A[1] = Other cursor
Parameters
A[1] = Available spaces for creation
A[2] = Number of section; 0 means no section.
A[3] = DKNUM
A[4] = DATEOF
A[5] = DKBASE
For sectioned data sets, words A[3] – A[5] are for section 0, and are repeated for
additional sections. For example, Section 1 would return words A[6] – A[8], and Section
2 would return words A[9] – A[11].
Parameters
A[1] = Number of quiesce history entries returned
A[2] = Size of each quiesce history entry
Starting at A[3} are the quiesce history entries. The entries are presented from the
most recent to the least recent recorded, in the following format:
Parameters
A[1] = AA of the desired record
A[2] = Structure number of the set used on the previous pathfinder call
A[3] = Lock/Secure flag : 1 is the lock and 2 is secure.
A[4} = Structure number of the set used on the previous pathfinder call
A[5] = For key size equal to user key area after previous pathfinder call
To write the event information to the Eventlog file, you must subscribe to the
database and the specific events.
Subscription
You can subscribe to (or unsubscribe from) an event either by making a DMINQ call
(91) or through Database Operations Center.
Parameters
A[1] := 0 for unsubscribe; 1 for subscribe
A[2] := Event number (1 for Deadlock event)
The list of events supported by the database system can be obtained by another
variation of DMINQ call (91).
[
• Category number for 3 characters (value of 1 for Deadlock)
• Subscription Status - 1 character (value of 1 for Subscribed, 0 for unsubscribed)
• Length of the event name (the following field) - 3 characters
• Event Name - MLSable name - variable length
]
0…n times followed by a null character (4"00").
DMINQ Arrays
Three arrays are defined for use with the DMINQ interface function: DMKEYAREA,
DMWORKAREA, and DMSIBDESC. Note that these arrays can be used only in array
reference assignment statements. They cannot be used as ordinary arrays. These
arrays are described as follows:
• DMKEYAREA
A hexadecimal array that contains the user's key area for the one SIB invoked.
• DMWORKAREA [<structure environment index>]
A hexadecimal array that contains the user’s work area for a particular structure.
The structure index is an arithmetic expression whose value equals the SIB index
for that structure (see below).
• DMSIBDESC
A real array that contains the SIB description built by the database interface at
compile time for the database invoked. The first N words of this array (0 to N-1)
contain environment words describing the structure invoked. The index in the SIB
description of this word is the value of DMSIBINDEX for that structure.
The array reference to which DMSIBDESC is assigned is marked read-only; data
can be retrieved but not stored through that reference.
In a program that declares exactly one database, which is not DYNAMIC,
DMSIBDESC is equivalent to <database id>.DMSIBDESC (where the <database id>
is the identifier in the database declaration).
For more information on array references, see “Reference Variables Declaration and
Assignment” in Section 2.
DMPROCOFF Statement
The DMPROCOFF statement establishes a Stuffed Indirect Reference Word (SIRW) to
a procedure offset array in the database stack. This statement is used to enter user or
interenvironment procedures into the Accessroutines.
<DMPROCOFF statement>
DMPROCOFF ( <array name 1> [ <subscript> ] , <array name 2> )
Explanation
The SIRW to array name 2 is stored at array name 1 [<subscript>]. The array <array
name 2> should be set up using the SIBOFFSET function to contain offsets of
procedures to be called using the DMPROCREF function.
The DMPROCOFF statement is used in conjunction with the DMPROCREF function for
procedure reference assignment or procedure entry.
Example
DMPROCOFF (PROCOFFS[STR], PROCOFFSETS);
DMPROCREF Function
The DMPROCREF function constructs a procedure Stuffed Indirect Reference Word
(SIRW) from an array of procedure offset array SIRWs and a procedure offset index. It
then returns the procedure SIRW.
<DMPROCREF function>
DMPROCREF [ <array name> [ <subscript> ] , <arithmetic
expression> - ]
Explanation
The array name identifies an array of SIRWs built using the DMPROCOFF statement.
The arithmetic expression identifies the procedure desired. The SIRW returned can be
used for either procedure reference assignment or VIA procedure entry, as shown in
the following example:
When the VIA procedure entry is used, the parameters are checked only against the
procedure named in the statement, not against the procedure referenced by the SIRW
constructed.
Note: The DMPROCREF function is considered unsafe. Use of this construct in new
code is not recommended; it is suggested that procedure reference arrays be used
instead.
DMSCAUSE Statement
The DMSCAUSE statement is used for deadlock detection of Enterprise Database
Server functions.
<DMCAUSE statement>
DMCAUSE ( <arithmetic expression> )
Explanation
The DMSCAUSE statement calls the MCP procedure DMSCAUSE and passes a single
real parameter indicated by the <arithmetic expression> construct. The effect of the
DMSCAUSE statement call is dependent on this arithmetic expression as follows:
At run time, the operating system restricts the DMSCAUSE statement to use only by
the Accessroutines.
DMSFREE Statement
The DMSFREE statement calls the MCP procedure DMSFREE.
<DMSFREE statement>
DMSFREE
Explanation
The call to the MCP procedure DMSFREE causes all records locked by this process to
be freed in every database visible to the process.
DMSFREEZE Function
The DMSFREEZE function calls the MCP procedure DMSFREEZE. The DMSFREEZE
function is invoked to indicate to the operating system when a database stack has
been built and users can be attached.
<DMSFREEZE function>
DMSFREEZE
Explanation
The DMSFREEZE function is a Boolean function that returns FALSE if the freeze is
successful. It returns a value of TRUE in the low order bit and an exception type in
[19:16] if the freeze fails.
• The environment calling DMSFREEZE does not have an Software Control Word
(SCW) within it.
• There are no stacks waiting to attach to the database.
• The caller is already an active frozen database.
• The caller is not a database stack initiated by DMSOPEN.
The DMSFREEZE function can be executed only by a code file initiated by the
operating system as the result of the MCP procedure DMSOPEN (that is, by an
Accessroutine).
DMSIBINDEX Intrinsic
The DMSIBINDEX intrinsic returns the Stuffed Indirect Reference Word (SIRW) offset
of the structure indicated by the data set name or the set name.
<DMSIBINDEX intrinsic>
DMSIBINDEX ( 2 <data set name> 2 )
4 4
5 <set name> 6
Explanation
The data set name is the external name of the data set to be invoked. The set name is
the external name of the set to be invoked.
DMSUPDATEDISKHEADER Statement
This statement causes the disk header for the designated file to be updated in the
directory.
<DMSUPDATEDISKHEADER statement>
DMSUPDATEDISKHEADER ( <file designator> )
Explanation
For information on the file designator construct, see the ALGOL Programming
Reference Manual, Volume 1.
DMSWAIT Function
The DMSWAIT function calls the DMSWAIT procedure in the operating system.
<DMSWAIT function>
DMSWAIT ( <arithmetic expression 1> , <arithmetic expression 2> -
Explanation
The DMSWAIT function is a Boolean function with four parameters. The first three
parameters are real arithmetic expressions, and the fourth is an array. The effect of
the DMSWAIT function is dependent on the values of the second and third parameters
as follows:
DMTRANSLOCK Statement
The DMTRANSLOCK statement performs transaction locking for Enterprise Database
Server jobs.
<DMTRANSLOCK statement>
DMTRANSLOCK ( <formal array 1> , <formal array 2 )
Explanation
The formal array 1 construct refers to a transaction lock, and the formal array 2
construct is its new value.
DSED FUNCTION
The DSED function is used to indicate whether or not a program has been terminated.
<DSED function>
DSED
Explanation
The DSED function returns a Boolean result of TRUE if the program is terminated. If
the program is not terminated, it returns a result of FALSE. This function can be used
only in Accessroutines and other programs to which the operating system grants
immunity from being terminated by the operator or by other external actions.
For a description of the WAIT and WAITANDRESET statements, see the section on
statements in the ALGOL Programming Reference Manual, Volume 1.
ENVIRONMENT Declaration
The ENVIRONMENT declaration is used to declare the contents of the Database Stack
(DBS). The ENVIRONMENT declaration delimits the boundaries of each environment
almost the same way as a PROCEDURE declaration.
<ENVIRONMENT declaration>
ENVIRONMENT <identifier> ( <arithmetic expression 1> ) -
- 2 2 2
4 4 4 4
5 OF <arithmetic expression 2> 6 5 <block head> 2 <compound tail>6
4 4
5 END 6
Explanation
The entire program for a database is an environment containing all database global
declarations.
Following the database global declarations, three DBS environments are declared. One
is a general D[3] environment used to attach pre-Mark 3. Structure Information Block
(SIB) environments for data sets. The second is a general D[3] environment used to
attach pre-Mark 3.5 SIB environments for sets. The third one is a DMSFREEZE
environment that builds up the environment for each invoked structure.
In a DBS environment, only global items and DBS items declared in that DBS are
accessible. In the inner environment, all global items, all items in the corresponding
DBS environment, and all SIB items are accessible. In addition, all procedures declared
in each inner environment are accessible. Those procedures are referenced via
dynamic identifiers, using the environment identifier after the apostrophe.
The result of the LOCK interlock function is zero (0) if the process is discontinued.
For a description of the LOCK interlock statement, see the ALGOL Programming
Reference Manual, Volume 1.
MEMORYDUMP Statement
The MEMORYDUMP statement causes a nonfatal system memory dump.
<MEMORYDUMP statement>
MEMORYDUMP ( <string literal> )
Explanation
The string literal construct can contain up to 16 characters. Any text over 16 characters
is truncated. For more information on this construct, refer to the section on language
components in the ALGOL Programming Reference Manual, Volume 1.
Example
MEMORYDUMP(" DUMP BY FAULT LOCKED" )
This statement results in a system dump with the cause displayed and logged as
READLOCKNOPURGE Function
The READLOCKNOPURGE function is the nonpreferred synonym for the READLOCK
function.
<READLOCKNOPURGE function>
READLOCKNOPURGE ( <arithmetic expression> , <arithmetic variable> )
Explanation
For an explanation of the parameters for this construct, see the READLOCK function in
the ALGOL Programming Reference Manual, Volume 1.
SIBOFFSET Function
The SIBOFFSET function returns as its result the offset of a procedure in its
environment.
<SIBOFFSET function>
SIBOFFSET ( <procedure identifier> )
Explanation
The SIBOFFSET function accepts a procedure identifier as its only parameter and
returns a value at compile time.
Example
I := SIBOFFSET(PROC1);
Explanation
The <transaction record id> construct identifies the transaction record variable that
contains the data item to be referenced. The subscript is an arithmetic expression that
identifies a particular element within a table.
For a complete list of control items, see the Enterprise Database Server for
ClearPath MCP Transaction Processing System (TPS) Programming Guide.
The TRY expression is similar to the TRY statement, except that the expression is
used when a return value is needed. The value returned by the TRY expression is the
value returned by the expression or procedure call that finished normally.
Explanation
The normal form of the TRY statement can be used to protect any statement,
including a compound statement or a procedure invocation statement. This form of
the TRY statement enables multiple sets of error recovery code to be specified. If the
statement following the TRY verb fails to finish normally, the statement following the
first ELSE is executed.
The limited form of the TRY statement can be used only to protect a procedure
invocation statement. This form of TRY has a more limited syntax and provides more
limited protection. Unlike the normal form, the protection afforded by the limited form
does not begin until the procedure begins execution. For example, if an exception
occurs during parameter building, or the procedure being invoked is a null procedure
reference, no protection is available. For more information on the TRY statement, see
the ALGOL Programming Reference Manual, Volume 1.
The : PROTECTED option provides additional protection against every type of fault,
including “Operator DSed (Just DSed),” “Parent Process Terminated,” and “P-DS by
another stack.” The : PROTECTED option offers protection against all forms and
causes of process termination, with no limitations.
Caution
It is considered unsafe to use the : PROTECTED option.
Because : PROTECTED offers complete and unconditional protection
against all forms of process termination, it is vital that code invoked to
handle errors be as fast and efficient as possible and that the stack be
expanded as little as possible. Otherwise, severe consequences can result,
including processes hung in a state that cannot be discontinued using the
DS command, or even total system failure.
Note: All exceptions and limitations described for the TRY statement do not apply
when “: PROTECTED” is specified.
Compiler control options provide a means to control many aspects of the compilation
of a DMALGOL program. DMALGOL recognizes all the compiler control options
available in ALGOL. The ALGOL compiler control options and the syntax for using them
are described in the section on compiling programs in the ALGOL Programming
Reference Manual, Volume 1.
<CODE20 option>
CODE20
When TRUE, the CODE20 option causes the compiler to increase the maximum size of
the code file from 2**18 records to 2**20 records. The maximum size is a rough limit
and is actually the starting record of the last code segment or value array (for
example, truthset, translate table, or various internal arrays) in the code file.
Notes:
<warnallunsafe option>
WARNALLUNSAFE
If any unsafe constructs were used in your program, the following warning message
is generated at the end of the compilation, regardless of the value of the
WARNUNSAFE or WARNALLUNSAFE option:
If a listing was generated to the LINE file and any unsafe constructs were used, the
total number of unsafe constructs is shown in the trailer information. If either the
WARNUNSAFE or the WARNALLUNSAFE option was TRUE at the end of the
compilation, the number of occurrences of each type of unsafe construct is shown in
the trailer information.
Paths
Paths show the order in which the command or statement is constructed and are
represented by horizontal and vertical lines. Many commands and statements have a
number of options so the railroad diagram has a number of different paths you can
take.
REMOVE
SOURCE
OBJECT
The three paths in the previous example show the following three possible
commands:
• REMOVE
• REMOVE SOURCE
• REMOVE OBJECT
A railroad diagram is as complex as a command or statement requires. Regardless of
the level of complexity, all railroad diagrams are visual representations of commands
and statements.
• Mandatory items
• User-selected items
• Order in which the items must appear
• Number of times an item can be repeated
• Necessary punctuation
Follow the railroad diagrams to understand the correct syntax for commands and
statements. The diagrams serve as quick references to the commands and
statements.
Constants are never enclosed in angle brackets (< >) and are in uppercase letters.
A variable is an item that represents data. You can replace the variable with data that
meets the requirements of the particular command or statement. When replacing a
variable with data, you must follow the rules defined for the particular command or
statement.
In the following example, BEGIN and END are constants, whereas <statement list> is a
variable. The constant BEGIN can be abbreviated since it is partially boldfaced.
• BE
• BEG
• BEGI
Constraints
Constraints are used in a railroad diagram to control progression through the diagram.
Constraints consist of symbols and unique railroad diagram line paths. They include
• Vertical bars
• Percent signs
• Right arrows
• Required items
• User-selected items
• Loops
• Bridges
A description of each item follows.
Vertical Bar
The vertical bar symbol (|) represents the end of a railroad diagram and indicates the
command or statement can be followed by another command or statement.
Percent Sign
The percent sign (%) represents the end of a railroad diagram and indicates the
command or statement must be on a line by itself.
STOP %
Right Arrow
The right arrow symbol (>)
• Is used when the railroad diagram is too long to fit on one line and must continue
on the next
• Appears at the end of the first line, and again at the beginning of the next line
Required Item
A required item can be
• A constant
• A variable
• Punctuation
If the path you are following contains a required item, you must enter the item in the
command or statement; the required item cannot be omitted.
A required item appears on a horizontal line as a single entry or with other items.
Required items can also exist on horizontal lines within alternate paths, or nested
(lower-level) diagrams.
In the following example, the word EVENT is a required constant and <identifier> is a
required variable:
EVENT <identifier>
User-Selected Item
A user-selected item can be
• A constant
• A variable
• Punctuation
User-selected items appear one below the other in a vertical list. You can choose any
one of the items from the list. If the list also contains an empty path (solid line) above
the other items, none of the choices are required.
In the following railroad diagram, either the plus sign (+) or the minus sign (–) can be
entered before the required variable <arithmetic expression>, or the symbols can be
disregarded because the diagram also contains an empty path.
<arithmetic expression>
+
Loop
A loop represents an item or a group of items that you can repeat. A loop can span all
or part of a railroad diagram. It always consists of at least two horizontal lines, one
below the other, connected on both sides by vertical lines. The top line is a right-to-left
path that contains information about repeating the loop.
34 ; 6
7 <field value> 7
Bridge
A loop can also include a bridge. A bridge is an integer enclosed in sloping lines (/ \)
that
Not all loops have bridges. Those that do not can be repeated any number of times
until all valid entries have been used.
In the first bridge example, you can enter LINKAGE or RUNTIME no more than two
times. In the second bridge example, you can enter LINKAGE or RUNTIME no more
than three times.
34 , 6
7 /2\ LINKAGE 7
RUNTIME
34 /2\ 6
7 LINKAGE 7
RUNTIME
In some bridges an asterisk (*) follows the number. The asterisk means that you must
cross that point in the diagram at least once. The maximum number of times that you
can cross that point is indicated by the number in the bridge.
34 , 6
7 /2*\ LINKAGE 7
RUNTIME
In the previous bridge example, you must enter LINKAGE at least once but no more
than twice, and you can enter RUNTIME any number of times.
The following railroad diagram indicates only one path that requires the constant
LINKAGE and the variable <linkage mnemonic>:
• Loops
• User-selected items
• A combination of loops and user-selected items
More complex railroad diagrams can consist of many alternate paths, or nested
(lower-level) diagrams, that show a further level of detail.
For example, the following railroad diagram consists of a top path and two alternate
paths. The top path includes
• An ampersand (&)
• Constants that are user-selected items
These constants are within a loop that can be repeated any number of times until all
options have been selected.
The first alternative path requires the ampersand and the required constant ADDRESS.
The second alternative path requires the ampersand followed by the required constant
ALTER and the required variable <new value>.
34 , 6
& 7 TYPE 7
D ASCII D
D BCL D
D DECIMAL D
D EBCDIC D
D HEX D
D OCTAL D
ADDRESS
ALTER <new value>
Example 1
<lock statement>
Example 2
<open statement>
Example 3
<generate statement>
Example 4
<entity reference declaration>
34 , 6
ENTITY REFERENCE 7 <entity ref ID> ( <class ID> ) 7
Example 5
PS MODIFY /
34 , 6
/ 7 <request number> 7 /
D <request number> <request number> D
ALL
EXCEPTIONS
/
D 34 , 6 D
7 <file attribute phrase> 7
D
<print modifier phrase>
The following table lists reserved words that are unique to DMALGOL. ALGOL
reserved words are also valid in DMALGOL programs. For a complete list of ALGOL
reserved words, see the ALGOL Reference Manual, Vol. 1. See the ALGOL Reference
Manual, Vol. 2 for a complete list of the reserved words in Unisys Extended ALGOL.
The DMALGOL reserved words listed in this appendix are divided into three types:
• Type 1 reserved words can never be declared as identifiers; that is, they have a
predefined meaning that cannot be changed.
• Type 2 reserved words can be redeclared as identifiers and then lose their
predefined meaning in the scope of that declaration.
• Type 3 reserved words are context-sensitive, can be redeclared as identifiers and,
if used where the syntax calls for that reserved word, carry the predefined
meaning; otherwise they carry the user-declared meaning.
A[0]=34, 3-25
A A[0]=58, 3-26
A[0]=65, 3-26
Accessroutines A[0]=85, 3-27
code file A[0]=91, 3-27
description, 1-6 A[N+1], 3-24
direct communication with, 3-1 arrays
DMINQ functions for, 3-1 construct for declaring, 2-1
ENVIRONMENT declaration marked DASDL, processing text directly from, 2-7
as, 3-35 DM INQUIRY, 3-28
up-level array reference assignments DMKEYAREA, 3-28
in, 1-7 DMSIBDESC, 3-28
ALLOW statement, 3-1 DMWORKAREA, 3-28
array designator>, 2-15 in database declarations, 2-15
array reference variable>, 2-15 INCLUDE statement for, 2-7
array values node variable as index into, 2-7
DM INQUIRY interface references to, 2-15
A[0]=1, 3-3, 3-8
A[0]=10, 3-5
A[0]=11, 3-6 C
A[0]=12, 3-6
A[0]=13, 3-6 clear TPS address (DM INQUIRY interface
A[0]=14, 3-6 procedure), 3-23
A[0]=16, 3-7 code files
A[0]=17, 3-7 Accessroutines, description, 1-6
A[0]=18, 3-7 unsafe
A[0]=20, 3-7 executing as a by-function library, 1-3
A[0]=22, 3-8 flagging the use of, 1-3
A[0]=23, 3-8 compilation
A[0]=24, 3-8 ONCE-ONLY for shared procedures, 1-7
A[0]=25, 3-9 compilation
A[0]=26, 3-22 listing, 2-8
A[0]=27, 3-23 compiler control options
A[0]=28, 3-23 WARNALLUNSAFE, 4-1
A[0]=29, 3-23 WARNUNSAFE, 4-1
A[0]=30, 3-23 compiler control options
A[0]=31, 3-24 CTPROC, 2-5
A[0]=32, 3-24 compile-time facility
A[0]=33, 3-25 compile-time variable declaration>, 2-7
DEFINE statement, 2-5
DISPLAY statement, 2-8
ERROR statement, 2-8
INCLUDE statement, 2-7
INVOKE statement, 2-7
environments G
and databases, 1-6
nesting restriction for, 1-6
get link (DM INQUIRY interface
ERROR statement, 2-8
procedure), 3-6
event references, 2-17
get quiesce
eventlog
history information (DM INQUIRY
database, 3-27
interface procedure), 3-26
examples
get statistics information (DM INQUIRY
accessing the members of a node's
interface procedure), 3-9
list, 1-5
get status of abort (DM INQUIRY interface
accessing the text section of the DASDL
procedure), 3-8
description file, 1-5
GETDATA (DM INQUIRY interface
extracting a property from a node, 1-5
procedure), 3-6
invoking a procedure declared in a
GETDATA with KEYCOMPARE (DM INQUIRY
different environment, 1-6
interface procedure), 3-24
EXCEPTION PROCEDURE declaration
global dynamic statistics
description of, 2-11
group type layouts for, 3-12
executing
global static statistics
interrupt code, 3-1
group type layouts for, 3-11
explicit structure lock, 2-3
group type layouts for DM INQUIRY function
extensions
for global dynamic statistics, 3-12
to ALGOL constructs, 2-1
for global static statistics, 3-11
unsafe, 1-3
for group type 1, 3-12
external interrupts
for group type 10, 3-20
executing, 3-1
for group type 6, 3-11
preventing execution of, 3-1
for group type 8, 3-20
for structure dynamic statistics, 3-20
F
I
files
indicating the use of by Enterprise
identifier
Database Server, 2-10
declaring as a preprocessor define, 2-5
free current (DM INQUIRY interface
node, 2-7
procedure), 3-7
implicit structure lock, 2-3
FREE statement, in Enterprise Database
INCLUDE statement, 2-7
Server concurrency control
INQUIRYSEMANTIC option, 2-13
facility, 2-3
interrupt code
functions
executing, 3-1
DMINQ interface, 3-1
preventing execution of, 3-1
DMPROCREF, 3-29
intrinsics
DMSFREEZE function, 3-31
DMSIBINDEX, 3-32
DSED function, 3-34
INVOKE statement, 2-7
DSWAIT function, 3-34
invoking, a procedure declared in a different
DSWAITANDRESET function, 3-34
environment, 1-6
SIBOFFSET, 3-36
unsafe, 1-4
L
layouts
for, 3-11
for DM INQUIRY functions
M
P
MAPPER option, 2-13
MEMORYDUMP statement, 3-36 parameters
message references, 2-11 DM INQUIRY interface
MP (Mark Program) system commands, 1-3 clear TPS address procedure, 3-23
create procedure, 3-8
data finder procedure, 3-6
N database events management
procedure, 3-27
nesting restriction for environments, 1-6 DATAEOF values procedure, 3-24
NEWGETDATA with KEYCOMPARE (DM date-timestamp for TPS procedure, 3-7
INQUIRY interface procedure), 3-27 delete current procedure, 3-8
node DMSREAD procedure, 3-6
description, 1-5 free current procedure, 3-7
node get available space and lastrecord
identifier, 2-7 information for fixed format
NODE declaration, 2-7 standard dataset
node property construct>, 2-9 procedure, 3-26
NODE variables, 1-5 get link procedure, 3-6
nonlocal message references, 2-11 get quiesce history information
procedure, 3-26
get statistics information
O procedure, 3-9
get status of abort procedure, 3-8
GETDATA procedure, 3-6
off-line dump (DM INQUIRY interface
GETDATA with KEYCOMPARE
procedure), 3-24
procedure, 3-24
ONCE-ONLY compilation
NEWGETDATA with KEYCOMPARE
definition, 1-7
procedure, 3-27
LET statement, 2-12
off-line dump procedure, 3-24
PROCEDURE declaration, 2-12
pathfinder procedure, 3-3
syntax, 2-12
reset TPS abort procedure, 3-8
OPEN statement extensions
INQUIRYSEMANTIC option, 2-13
*86000874-207*
8600 0874–207