SDF-P introduces a new procedure format. Procedures with this format are called “structured procedures”, or S procedures for short. Procedures which do not comply with this format are called non-S procedures.
Procedures are always sequences of commands, statements and data records that are stored in a “procedure container”. SDF-P supports both BS2000 user files and library elements as procedure containers. This means that, like non-S procedures, S procedures can be stored in user files or in PLAM libraries. In addition, S procedures can also be stored in list variables.
Apart from data and statements, commands are the most important element in S procedures. The other elements are variables, functions and expressions: variables are named data objects to which a content can be assigned. A function determines a unique result from input parameters, and this result is then used instead of the function. Expressions consist of operands and operators. The resulting value from the expression is used instead of the expression.
Unlike non-S procedures, S procedures do not begin with one of the commands /BEGIN-PROCEDURE or /SET-LOGON-PARAMETERS; consequently, when creating S procedures it is not necessary to take into account whether the procedure will later be invoked as a foreground or a background procedure.
An S procedure does not need to be terminated with a special procedure termination command. However, SDF-P does provide such a command, namely /EXIT-PROCEDURE. Using this command, execution of the procedure can be terminated at any desired point, and error information can be returned to the procedure caller. (For further information about the termination behavior of S procedures, see chapter “Calling and controlling procedures”.)