General
Application area: | (Task) serialization; see "(Task) serialization" |
Macro type: | Type S, MF format 1: standard/L/E form; see "S-type macros" |
ENASI generates either the 24-bit or the 31-bit interface, depending on the specification. In the event of macro chaining, all macros chained must make use of the same interface (either 24-bit or 31-bit interface).
Macro description
The ENASI macro creates a serialization item for the calling program's task. If a serialization item with the specified name has already been established in the defined scope (by an ENASI macro of another task), the macro call only causes the serialization item to be assigned to the task of the calling program. If there is no serialization item, one is established by the system and assigned to the task of the calling program. This macro also returns an ID for the serialization item; this ID can be used in later calls to speed up processing.
A program can use up to 2000 serialization items simultaneously. The CONTINU operand allows up to 255 ENASI macros to be chained.
Macro format and description of operands
ENASI |
{ SINAME=name / SINAMAD={addr / (r)} [,SINAMLN=length] } ,SCOPE=LOCAL / GROUP / USER_GROUP / GLOBAL ,SIIDRET=addr / (r) ,CONTINU=NO / YES [,PARMOD=24 / 31] [,MF=L / (E,..)] |
SINAME=name
Specifies the name of the serialization item. The name consists of a character string comprising 1 to 54 bytes. The first blank (X'40') terminates the name. The characters may be letters, digits and the special characters $, # and @. The first character must not be a digit or the $ character.
SINAMAD=
Specifies the name of the serialization item.
The rules governing the name format are specified in the SINAME operand description.
addr
Symbolic address of the field containing the name.
(r)
Register containing the address.
SINAMLN=
Specifies the length in bytes of the serialization item name. The length must be at least 1 byte and not more than 54 bytes.
If the operand is missing, the length attribute of the SINAMAD operand is assumed if SINAMAD=addr is specified; if SINAMAD=(r), the maximum length (54) is assumed.
length
Length of the serialization item name.
SCOPE=
Specifies the scope of the serialization item (i.e. the participants authorized to use it).
LOCAL
The use of the serialization item is limited to the calling task.
GROUP
All the tasks with the same user ID as the calling task are participants.
USER_GROUP
All the tasks, whose user IDs belong to the same user group as the user ID of the creating participant, can be participants.
The operand value assumes the existence of user groups and may therefore only be specified when the SRPM function unit of the SECOS software product is available in the system. This is why the GETUGR macro (see the “SECOS” manual [14 (Related publications)]) has to check whether SRPM is available prior to a macro call with SCOPE=USER_GROUP. The program reaction is dependent on the result (return code).
GLOBAL
All the tasks in the system are participants.
SIIDRET=
Specifies the ID of the serialization item.
The ID can be used in other macros (ENQAR, DEQAR, CHKSI and DISSI) referring to the specified serialization item in order to speed up processing.
addr
Symbolic address (name) of a 4-byte field used for returning the ID to the calling program.
(r)
Register containing the address value “addr”.
CONTINU=
This operand allows up to 255 ENASI macros to be chained.
NO
This is the last (or only) macro of a sequence.
YES
YES indicates that another ENASI macro follows this macro.
MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see "S-type macros". The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
PARMOD=
Controls macro expansion. Either the 24-bit or the 31-bit interface is generated.
If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default setting for the assembler (= 24-bit interface).
24
The 24-bit interface is generated. Data lists and instructions use 24-bit addresses (address space <= 16 Mb).
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses (address space <= 2 Gb). Data lists start with the standard header.
Notes on the macro call
The ID of the serialization item passed to the calling program can be used in other macros instead of the name in order to speed up processing.
An explicit enable for a serialization item is required only if the user desires to speed up processing by using the ID. Otherwise the user can employ the implicit enable function (see the ENQAR and DEQAR macros).
A task can use a serialization item only if an associated explicit or implicit enable function for this task was processed.
A second ENASI macro call (explicit or implicit) issued in a program for a serialization item that was specified earlier in an explicit enable and then disabled again (see the DISSI macro), does not necessarily assign the same ID to this item as to the first ENASI macro call.
If the same serialization item name is specified in two ENASI macros with different scopes, the system will process two different serialization items.
The scope of an ID is the same as the scope of the associated name.
When the list form of the macro (MF=E) is used, the following should be noted:Only one macro with MF=E is required for execution, regardless of whether the macro applies to one request or to a series of requests. In the case of a series of requests, the operand list is generated through macro chaining (MF=L) by means of the CONTINU operand.
Return information and error flags
Register 1 contains the operand list address.
R15:
+---------------+ | | | | | |b|b| | | | |a|a| +---------------+
A structured return code (aa=primary return code, bb=secondary return code) relating to the execution of the ENASI macro is transferred in register R15.
X'bb' | X'aa' | Meaning |
X'04' | X'00' | All enable macros were executed: |
X'08' | X'00' | All enable macros were executed: |
X'0C' | X'04' | Not all enable macros were executed: |
X'10' | X'04' | Not all enable macros were executed:
|
X'18' | X'04' | Not all enable macros were executed: |