The $NBSSIG function enables the exit routine to indicate to a waiting task that a bourse event has occurred (like POSSIG in TU). A post code is transferred to the task waiting for the event with the aid of SOLSIG.
Prerequisite: an event item must exist and the associated bourse ID must be stored with $GTBOID with system-global accessibility.
macro format and operands description
[label] $NBSSIG |
MF=C / D / E / L / M [,PREFIX=prefix] [,PARAM=addr] [,BOID=boid / (R1)] [,SDATA=(1, addr / (R2))] |
MF
Defines the macro format.
=C
The parameter list is generated as a data area.
=D
The parameter list is generated as a DSECT with the name specified for “label”; default value: label = NTEG.
=E
Function call.
=L
The parameter list is generated (without field names and equates).
=M
Modification of the parameter list with current values.
PREFIX
Character for the field names in the parameter list. Only possible in conjunction with MF=C/D.
=prefix
Character with which the field names in the parameter list are to begin; default value: N.
PARAM
Address of the parameter list if MF=E is specified.
=addr
Address of the parameter list.
BOID=
Bourse ID.
=boid
Bourse ID stored globally using $GTBOID.
=(R1)
Register containing the bourse ID.
SDATA
Field with the address of the 1-word post code transferred to the waiting task with SOLSIG. This can be, for example, the address of the data to be output into an audit file.
=(1,...)
addr = address of the field containing the 1-word post code.
R2 = register with the address value of the field containing the 1-word post code.
Notes
R12 and R13 must not have been modified since the exit routine was called.
R14, R15 and R1 are updated by MF=E.
The parameter list must be processed in line with reentrant programming.
Return codes
The following return codes are transferred in the parameter list’s standard header (using $NDSSIG MF=D/C):
Maincode | Meaning |
NTBSM1OK | Successful call |
NTBSM1IC | Inconsistent parameters |
NTBSM1BE | Error in bourse data |
NTBSM1IB | Invalid bourse data |
NTBSM1BD | Bourse already destroyed, i.e. event item no longer exists |
NTBSM1QL | Overflow in the bourse send queue |
NTBSM1NS | No slots available for the send queue |
No action is required for any of the return codes except NTBSM1OK
.
EXITXXXX @ENTR TYP=E,ENV=SPLSPEC,LOCAL=ADF : L R1,BOIDX ——————————————————————————————————————————————— (1) L R1,0(R1) MVC CPARAM(NTBS#),LPARAM ——————————————————————————————————— (2) $NBSSIG MF=M,PARAM=CPARAM,BOID=(R1),SDATA=(1,SDATA) —————————— (3) $NBSSIG MF=E,PARAM=CPARAM ———————————————————————————————————— (4) CLI NTBSMR1,NTBSM1OK ——————————————————————————————————————— (5) BNE exception : @EXIT : LPARAM $NBSSIG MF=L ————————————————————————————————————————————————— (6) NTBSS# DS 0A NTBSFHE DS 0XL8 GENERAL OPERAND LIST HEADER NTBSFCTU DC AL2(93) FUNCTION UNIT NUMBER NTBSFCT DC AL1(6) FUNCTION NUMBER NTBSFCTV DC AL1(1) FUNCTION INTERFACE VERSION NUMBER NTBSRET DC X'FFFFFFFF' RETURN CODE NOT VALID NTBSMR1 EQU NTBSRET+3,1 MAIN RETURN CODE 1 * NTBSBOID DC F'0' BOID DC X'00' unused DC X'00' unused NTBSVECT DC B'01000000' VECT. FIELD NTBSDLTH DC X'00' DATA LENGTH NTBSLTIM DC H'600' LIFETIME NTBSPRIO DC AL1(0) PRIORITY DC X'00' unused NTBSSIG DC F'0' SIGNAL DC F'0' unused DC F'0' unused NTBSSDTA DC A(0) SEND DATA ADDRESS NTBSARSL DC A(0) AR Slot address (only for SIH user) NTBS# EQU *-NTBSS# Length of parameterlist : BOIDX DC A(BOID) ———————————————————————————————————————————————— (7) EXTRN BOID SDATA DC A(MESS) MESS DC Y(MESSEND-MESS) DC C' ANY KIND OF TEXT' : @END ADF @PAR L=YES : CPARAM $NBSSIG MF=C ————————————————————————————————————————————————— (8) : ADF @PAR LEND=YES
(1) | The bourse ID is supplied with a value. |
(2) | The current parameter list is preset with the default values. |
(3) | The bourse ID and the post code are added. |
(4) | The function $NBSSIG is called. |
(5) | The return code is evaluated. |
(6) | Standard values for the parameter list. |
(7) | Example of how the bourse ID is determined and the post code used. |
(8) | Dummy character of the current parameter list in automatic memory layout. |