Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Macro syntax for GUARDS macros

The macro operands can be divided into two groups:

  • Format operands which define the format and the generation of the macro; the format operands are described in the “Executive Macros” manual [16]. The metasyntax of these operands is the same as that for other BS2000 macro format operands.

  • Functional operands which define the contents of the parameter area for a specific interface.

The metasyntax of the functional operands and their values are described in this section.

Description of a functional operand

The description of a functional operand has the following format:

operand-name = operand-value

Operands with default values are optional. Operands which do not have default values are mandatory operands for the format MF=L. Any exceptions to this rule are mentioned in the operand descriptions.

Operand values may be specified directly or indirectly. Direct specification means that the value is entered as a literal or in the form of a keyword. In the case of indirect specification, the value is passed in a variable or in a register.

Direct specification

The data types of the operand values are enclosed in angle brackets:

operand-name = <datatype n..m>

operand-name = <c-string: sdf-datatype n..m>

The suffix n..m for the data types permits specification of a permissible value range or of a permissible length. If a permissible value range is specified for a data type, this also applies to specification via a variable or a register and is not shown again there.

Example
  • in syntax diagram: TYPE=<integer 0..255>

  • actual input: TYPE=100

  • in syntax diagram: NAME=<c-string: filename 1..40>

  • actual input: NAME=’MYGUARD’

Specification via a variable

If a variable may be specified for an operand value, the type of variable is enclosed in angle brackets and begins with “var:”. This means that the contents of the variable must match the specified data type. The actual input consists simply of the name of the variable.

operand-name = <var: variable-type(n)>

Example
  • in syntax diagram: NAME=<var: char(24)>

  • actual input: NAME=MYGUARD

where MYGUARD is the name of a variable with a length of 24 which contains the name.

The suffix n in parentheses specifies the length of the variable.

Specification via a register

If a register (enclosed in parentheses) may be specified as an operand value, a distinction must be made between two possible cases:

The register contains the value directly:

operand-name = (<reg: variable-type(n)>)

Example
  • in syntax diagram: TYPE=(<reg: integer(1)>)

  • actual input: TYPE=(9)
    where register 9 contains the actual number.

The register contains the address of the variable which contains the actual value:

operand-name = (<reg: A(variable-type(n))>)

Example
  • in syntax diagram: IOAREA=(reg: A(<char(8)>))

  • actual input: IOAREA=(9)
    where register 9 contains the address of the variable.

Elements of the metasyntax

Representation                    

Description

UPPERCASE LETTERS

Uppercase letters indicate keywords or constants which must be specified exactly as they are shown. Keywords begin with *.
Example: DIALOG=*STD

lowercase letters

Lowercase letters indicate the types of values or variables which may be specified by the user.
Example: NAME=<var:char(40)>

underscored values

The underscore indicates the default value of an operand for MF=L.
Example: DIALOG=*STD

Equals sign =

The equals sign (=) separates the operand from the operand value.

Slash /

The slash separates simple alternative operand values.
Example: DIALOG=*STD / *NO

< >

Angle brackets enclose the data type of the operand.
Example: <var:char(40)>

list-poss(n):

This indicates that a list may be formed from the operand values which follow it. n specifies the maximum number of elements in the
list. The list must be enclosed in parentheses if more than one element is specified.
Example: list-poss(3): *YOU / *HE / *US

structure(n):

The operand value consists of a list of n values with different meanings (cf. array). The meanings of the values depend on their
positions within the list. The data type of each element is described under “(m) element-name:”. The list must be enclosed in parentheses.
Example: CHKPROC=structure(2):

(m) element-name:

This describes the mth element of a “structure” list. “element-name” describes the meaning of this element in the structure list.
Example:
(1) name: <c-string 32>
(2) address: A(<name> )
“name” and “address” are the element names.

array(n):

The operand value consists of a list of up to n identical elements. The list must be enclosed in parentheses if it contains more than one element.

Data types of the operand values

Data type

Character set         

Special features

c-string

EBCDIC characters

The string must be enclosed in single quotes and specified with the preceding “C”. Single quotes within the string must be duplicated.

The meaning of the input is then shown in SDF notation, separated by a colon.

The suffix n..m specifies the length of the input.

Example:
in syntax diagram: GUARD=<c-string: filename 1..54>
actual input: GUARD=’GUARDEXA’

x-string

Hexadecimal 00..FF

The string must be enclosed in single quotes and preceded by the letter X: X’xxxx’.

The suffix n..m specifies the maximum input length in bytes.
Example:
in syntax diagram: PASSWORD=<x-string 1..10>
actual input: PASSWORD=X’FF00AA1122’

name

A..Z, 0..9, $, #, @

A name. The format is described in the related operand description.
Example:
in syntax diagram: PARAM=<name 1..8>
actual input: PARAM=MYPARAM

label

A..Z
0..9
$,#,@

The name of a label.
Example:
OUTAREA=structure (2):
(1) address: <label>

integer          

0..9,+,-

“+” or “-” may be specified only as the first character.

The suffix n..m specifies the permissible value range.

Example:
in syntax diagram: TIMEN=<integer 1..4>
actual input: TIMEN=1

var:


Starts a variable specification. The colon is followed by the data type of the variable.
Example:
in syntax diagram: GUARD=<var: char(40)
actual input:GUARD=GUARDVAR

reg:


Starts a register specification. The colon is followed by the data type of the register contents.

Either a register or a register equate may be used.

Data types of variables and register contents

Data type

Meaning

char(n)

A character string with the length n. If the length specification is omitted, n=1 is assumed.

integer (n)

An integer which occupies n bytes, where n<=4.
If the length specification is omitted, n=1 is assumed.

enum NAME(n)

A list which occupies n bytes, where n<=4.
If the length specification is omitted, n=1 is assumed.

A(variable-type(n))

The address of a variable.

pointer

Pointer (the address is passed).