This glossary provides definitions of the main terms used in the SDF-P procedure concept. Terms given in italics in the definitions are themselves defined in the glossary.
background procedure
Procedure that runs in the background independently of the calling job and which contains a separate job number (TSN). Both S procedures and non-S procedures can run as background procedures
branching
Control structure in S procedures, in which command sequences are executed regardless of the result of a condition. Branching is initiated by a start command and terminated with a termination command. Branching is also referred to as IF blocks.
called procedure
Procedure called from another procedure and subordinate to that procedure. The called procedure is executed in full before it returns control to the calling procedure.
calling procedure
Procedure that calls a subordinate procedure. The calling procedure relinquishes control to the subordinate procedure while the latter is being executed.
command block
Part of an S procedure that brings together related parts of procedures into a logical unit. A command block starts with a start command and ends with a termination command. In between are the commands to be executed in this block. Command blocks include loops, branching and simple command blocks.
control flow command
Commands in S procedures that control procedure execution. Control flow
commands include branch commands as well as paired start and termination commands that start and terminate command blocks. Control flow commands in SDF-P are: BEGIN-BLOCK, BEGIN-PARAMETER-DECLARATION, CYCLE, ELSE, ELSE-IF, END-BLOCK, END-FOR, END-IF, END-WHILE, END-
PARAMETER-DECLARATION, EXIT-BLOCK, FOR, GOTO, IF, IF-BLOCK-ERROR, IF-CMD-ERROR, REPEAT, UNTIL, WHILE.
control structure
Part of S procedures for controlling procedure execution. Control structures include loops, branching and simple command blocks. They are each started and terminated with paired control flow commands. Branch commands also belong to control flow commands.
ELSE branch
Part of an IF block containing an alternative command sequence which is executed if the condition in the IF command is not met. An ELSE branch is started and terminated by the ELSE command.
error handling
In S procedures, this is based on the fact that BS2000 commands supply a defined return code. This return code allows SDF-P to determine whether there was an error when the command was executed. Error handling is automatically triggered if a return code indicating an error is returned when a command is executed. Error handling itself is carried out in what are known as error handling blocks. There are two types of such blocks: IF-BLOCK-ERROR and IF-CMD-ERROR. In the event of an error in procedure execution, SDF-P branches to the next IF-BLOCK-ERROR or IF-CMD-ERROR command.
FOR block
Loop in S procedures in which a command sequence is executed for as long as values are assigned to a run variable and, optionally, a defined condition is met. The FOR block begins with the command FOR and ends with the command END-FOR. The command FOR contains the run variable.
foreground procedure
Procedure executed under the control of the job in which it was called; no new job is created.
formal procedure parameter
Variable in a procedure to which the current parameter specified in the procedure call is transferred. Formal procedure parameters are declared in the procedure head.
IF block
Conditional branching in S procedures. An IF block is started with the IF command and terminated with the END-IF command. The condition for branching is specified in the IF command, and an alternative condition in the ELSE-IF command. An IF block always consists of a THEN branch, executed if the condition is met, and optionally an ELSE branch, executed if the condition is not met.
language elements in S procedures
These are commands, statements, data records, variables, functions and expressions.
loop
Control structure in S procedures that can be executed several times as a function of a condition. A loop is started by a start command and ended with a termination command.
non-S procedure
Procedure in BS2000 not created in line with SDF-P rules. Non-S procedures can be executed as foreground and background procedures.
procedure
Frequently used sequences of commands, statements and data records stored in a procedure container. These command sequences can be executed with a single command in interactive or batch mode.
procedure attributes
These are set in the SET-PROCEDURE-OPTIONS command and affect calling, execution and error handling of the procedure. The procedure attributes include: command for the procedure call, system file environment, length of the
procedure records, type of logging, interruptibility of the procedure, type of error handling, escape characters, type of variable declaration, and job variable replacement. Procedure attributes can be modified with the MODIFY-
PROCEDURE-OPTIONS command.
procedure body
Part of an S procedure that determines the execution of the procedure. The procedure body follows the procedure head. It comprises a series of commands, statements and data. The S procedure can be controlled via the various types of command blocks that support SDF-P, e.g. via branching, loops or error handling blocks.
procedure call
Initiation of the procedure start, in which the procedure to be started is named and if necessary is assigned procedure parameters. When calling S procedures, the commands of the procedure head are executed first and the procedure attributes set before the commands of the procedure body are analyzed and processed.
procedure container
File, library element or list variable in which a procedure is stored.
procedure environment
This comprises all system data and system attributes that affect execution of the procedure, e.g. task variables, procedure attributes, variables of the calling procedure.
procedure execution
The execution part of the procedure start, in which the commands are executed in accordance with BS2000 rules. The expressions within the command are replaced first. The command is then analyzed and executed.
procedure head
Part of an S procedure in which the global procedure attributes are defined and the procedure parameters declared. The procedure head is at the start of an
S procedure.
procedure interpreter
This checks the procedure head, executes it and then analyzes the procedure body. When executing the procedure, the procedure interpreter identifies the control flow commands and executes them.
procedure interruption
Interruption of the procedure run of a procedure which was called interactively as a foreground procedure. A distinction is made between interruptions from system level and procedure-internal interruptions. Within the procedure, the procedure run can be interrupted at any time with the HOLD-PROCEDURE command. From the system level, a procedure can be interrupted with the
K2 function key.
procedure line
Data record of the procedure container, containing the data, commands and statements for the procedure. Command and statement sequences may extend over several procedure lines.
procedure nesting
This refers to calling a procedure from another procedure, where each procedure container may contain just one procedure.
procedure parameter
In SDF-P, a general term for current parameters and formal parameters. It is used as a synonym for current and formal parameters when it is not necessary to distinguish between them. Procedure parameters are identified by the following attributes: parameter name, start value (if specified), data type and type of parameter transfer.
procedure record
Processing unit of a procedure, comprising commands, statements or data processed at the same time by the system during execution. Several procedure records consisting of commands or statements can be written in a procedure line, separated by a semicolon.
procedure start
This includes calling, analyzing and executing the procedure.
procedure termination
Procedures can be terminated with the following procedure termination
commands: the SDF-P command EXIT-PROCEDURE, the END-PROCEDURE command, and the CANCEL-PROCEDURE command.
procedure termination command
Command with which procedure execution can be stopped at any point. The procedure termination command can be used to provide the procedure caller with error information.
REPEAT block
Loop in S procedures, in which a command sequence is executed for as long as a defined condition is no longer met. The REPEAT block is executed at least once. It starts with the REPEAT command and ends with the UNTIL command.
SDF-P
Procedure language that expands the BS2000 command language into a programming language in which structured programming is possible in the same way as in higher-level programming languages. A significant feature of procedures under SDF-P is execution by command blocks.
S procedure
Structured procedure in BS2000, corresponding to the SDF-P procedure format. The main parts of an S procedure are the procedure head and the procedure body. Related parts of a procedure can be brought together in
command blocks. Error handling in S procedures is block-oriented.
THEN branch
Part of an IF block executed if the condition in the IF command is met. The THEN branch is started and executed by the IF command.
WHILE block
Loop in S procedures in which a command sequence is executed for as long as a defined condition is no longer met. If the condition is not met at the time of first execution, the command sequence is never executed. The WHILE block starts with the WHILE command and ends with the END-WHILE command.