|
CEE3SPM queries and modifies the enablement
of Language Environment hardware
conditions. You can use the CEE3SPM service to: - Alter the settings of the Language Environment conditions,
using an action value of 1 (SET), to those
specified by the caller.
- Query the current settings of the Language Environment conditions
and return the settings to the caller.
- Push the current settings of the Language Environment conditions
on to the condition stack using an action value
of 3 (PUSH). This pushes the current setting down on the stack for
later retrieval, and, in effect, places a copy of the current setting
on top of the stack. It does not alter the current condition settings.
- Pop the pushed settings of the Language Environment conditions
from the condition stack using an action value
of 4 (POP). This reinstates the previous condition settings as the
current condition settings.
- Push the current settings of the Language Environment conditions
on to the Language Environment-managed
condition stack and alter the settings of the Language Environment conditions
to those supplied by the caller.
The enabled or disabled Language Environment conditions
are: - fixed-overflow
- When
enabled, raises the fixed-overflow condition when an overflow occurs
during signed binary arithmetic or signed left-shift operations.
- decimal-overflow
- When enabled,
raises the decimal-overflow condition when one or more nonzero digits
are lost because the destination field in a decimal operation is too
short to contain the results.
- underflow
- When enabled, raises the underflow condition
when the result characteristic of a floating-point operation is less
than zero and the result fraction is not zero. For an extended-format
floating-point result, the condition is raised only when the high-order
characteristic underflows.
- significance
- When enabled, raises
the significance condition when the resulting fraction in floating-point
addition or subtraction is zero.
When you use the CEE3SPM callable service,
maintenance of the condition stack is required. For example, one user-written
condition handler can disable a hardware condition while another enables it.
Therefore, do not assume that the program mask is at a given setting. The program mask is set differently based
on different HLL requirements. You can find out what the current setting
is by using the QUERY function of CEE3SPM.
Language Environment initialization
sets conditions based on the languages in the initial load module.
Each language present adds to the conditions that are enabled.
Some S/370 hardware
interrupt codes and their matching Language Environment feedback
codes appear in Table 1.
Syntax
>>-CEE3SPM--(--action--,--cond_string--,--fc--)----------------><
- action (input)
- The action to be performed. action is
specified as a fullword binary signed integer corresponding to one
of the numbers in the following list:
- 1—SET
- Alters the settings of
the Language Environment conditions
to those specified in the cond_string parameter.
- 2—QUERY
- Queries the
current settings of the Language Environment conditions
and return the settings in the cond_string parameter.
- 3—PUSH
- Pushes the
current settings of the Language Environment conditions
on to the Language Environment-managed
condition stack.
- 4—POP
- Pops the
pushed settings of the Language Environment conditions
from the condition stack, discarding the current settings, and reinstating
the previous condition settings as the current condition settings.
- 5—PUSH, SET
- Pushes the current settings of the Language Environment conditions
on to the Language Environment-managed
condition stack and alters the settings of the Language Environment conditions
to those supplied by the caller in the cond_string parameter.
- cond_string (input/output)
- A fixed-length string
of 80 bytes containing a sequence of identifiers representing the
requested settings for the Language Environment conditions
that can be enabled and disabled. A list of conditions enabled and
disabled and their associated identifiers is given below:
- Condition
- Identifier
- fixed-overflow
- F (NOF for disablement)
- decimal-overflow
- D (NOD for disablement)
- underflow
- U (NOU for disablement)
- significance
- S (NOS for disablement)
An identifier with the 'NO' prefix is used to disable
the condition it represents. An identifier without the 'NO' prefix
is used to enable the condition that it represents. For example, the
token 'F' is used to enable the fixed-overflow condition. The identifier
'NOF' is used to disable the fixed-overflow condition. The rightmost
option takes effect in the event of a conflict. Identifiers are separated
by blanks or commas.
- fc (output)
- A 12-byte feedback code, optional in some languages,
that indicates the result of this service. If you choose to omit this
parameter, refer to Invoking callable services for the
appropriate syntax to indicate that the feedback code was omitted.
The
following symbolic conditions can result from this service:
Code |
Severity |
Message number |
Message text |
---|
CEE000 |
0 |
— |
The service completed successfully. |
CEE36V |
4 |
3295 |
The condition string from CEE3SPM did not contain all of the
settings, because the returned string was truncated. |
CEE370 |
4 |
3296 |
Some of the data in the condition string from CEE3SPM could
not be recognized. |
CEE371 |
4 |
3297 |
The service completed successfully for recognized conditions,
unsuccessfully for unrecognized (unsupported) conditions. |
CEE372 |
4 |
3298 |
A call to CEE3SPM attempted to PUSH settings onto a full stack. |
CEE373 |
4 |
3299 |
A call to CEE3SPM attempted to POP settings off an empty stack. |
CEE374 |
4 |
3300 |
The action parameter in CEE3SPM was not one of the digits 1
to 5. |
Usage notes - PL/I MTF
consideration—In PL/I MTF
applications, CEE3SPM affects only the calling task.
- C/C++ consideration—C/C++ ignores
the fixed-overflow, decimal-overflow, underflow, and significance
interrupts, no matter what you specify in CEE3SPM.
- COBOL consideration—COBOL ignores
the fixed-overflow and decimal-overflow interrupts, no matter what
you specify in CEE3SPM.
- z/OS UNIX consideration—In
multithread applications, CEE3SPM affects only the calling thread.
- You cannot use CEE3SPM to enable the fixed-overflow, decimal-overflow,
underflow or significance interrupts. You can, however, query the
settings of CEE3SPM.
Table 1. S/370 interrupt
code descriptionsS/370 interrupt
code |
Description |
Maskable |
Symbolic feedback code |
Message number |
Severity |
---|
0001 |
Operation exception |
No |
CEE341 |
3201 |
3 |
0002 |
Privileged operation exception |
No |
CEE342 |
3202 |
3 |
0003 |
Execute exception |
No |
CEE343 |
3203 |
3 |
0004 |
Protection exception |
No |
CEE344 |
3204 |
3 |
0005 |
Addressing exception |
No |
CEE345 |
3205 |
3 |
0006 |
Specification exception |
No |
CEE346 |
3206 |
3 |
0007 |
Data exception |
No |
CEE347 |
3207 |
3 |
0008 |
Fixed-point overflow exception |
Yes |
CEE348 |
3208 |
3 |
0009 |
Fixed-point divide exception |
No |
CEE349 |
3209 |
3 |
000A |
Decimal-overflow exception |
Yes |
CEE34A |
3210 |
3 |
000B |
Decimal divide exception |
No |
CEE34B |
3211 |
3 |
000C |
Exponent-overflow exception |
No |
CEE34C |
3212 |
3 |
000D |
Exponent-underflow exception |
Yes |
CEE34D |
3213 |
3 |
000E |
Significance exception |
Yes |
CEE34E |
3214 |
3 |
nn0F |
Floating-point divide exception |
No |
CEE34F |
3215 |
3 |
Examples - Following is an example of CEE3SPM called by C/C++.
/*Module/File Name: EDC3SPM */
/*****************************************************/
/* This example queries the enablement of LE/370 */
/* hardware conditions. */
/*****************************************************/
#include <stdio.h>
#include <string.h>
#include <leawi.h>
#include <stdlib.h>
#include <ceeedcct.h>
int main(void) {
_FEEDBACK fc;
_INT4 action;
_CHAR80 cond_string;
char *cond;
/* query the current settings */
action = 2;
CEE3SPM(&action,cond_string,&fc);
if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
printf("CEE3SPM query failed with message %\n",
fc.tok_msgno);
exit(2999);
}
}
- Following is an example of CEE3SPM called by COBOL.
CBL LIB,QUOTE
*Module/File Name: IGZT3SPM
*************************************************
** **
** CBL3SPM - Call CEE3SPM to query and modify **
** Lang. Environ. hardware condition **
** enablement **
** In this example, a call is made to CEE3SPM **
** to check the setting of the program mask. **
** See the parameter list of CEE3SPM to **
** interpret what is returned as CONDSTR in **
** this example. **
** **
*************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. CBL3SPM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ACTION PIC S9(9) BINARY.
01 CONDSTR PIC X(80).
01 FC.
02 Condition-Token-Value.
COPY CEEIGZCT.
03 Case-1-Condition-ID.
04 Severity PIC S9(4) BINARY.
04 Msg-No PIC S9(4) BINARY.
03 Case-2-Condition-ID
REDEFINES Case-1-Condition-ID.
04 Class-Code PIC S9(4) BINARY.
04 Cause-Code PIC S9(4) BINARY.
03 Case-Sev-Ctl PIC X.
03 Facility-ID PIC XXX.
02 I-S-Info PIC S9(9) BINARY.
PROCEDURE DIVISION.
*************************************************
** Specify 2 for the QUERY function.
** Pass ACTION in the call to CEE3SPM to return
** the condition string DISPLAY results.
*************************************************
PARA-CBL3SPM.
MOVE 2 TO ACTION.
CALL "CEE3SPM" USING ACTION, CONDSTR, FC.
IF CEE000 of FC THEN
DISPLAY "The current setting of the ",
"program mask is: " CONDSTR
ELSE
DISPLAY "CEE3SPM failed with msg "
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
GOBACK.
- Following is an example of CEE3SPM called by PL/I.
*PROCESS MACRO;
/* Module/File Name: IBM3SPM */
/****************************************************/
/** */
/** Function: CEE3SPM - Query and Modify LE/370 */
/** Hardware Condition Enablement */
/** */
/** This example calls CEE3SPM to query the current */
/** setting of the program mask. See the parameter */
/** list of CEE3SPM to interpret what is returned */
/** as CONDSTR in this example. */
/** */
/****************************************************/
PLI3SPM: PROC OPTIONS(MAIN);
%INCLUDE CEEIBMAW;
%INCLUDE CEEIBMCT;
DCL ACTION REAL FIXED BINARY(31,0);
DCL CONDSTR CHAR(80);
DCL 01 FC, /* Feedback token */
03 MsgSev REAL FIXED BINARY(15,0),
03 MsgNo REAL FIXED BINARY(15,0),
03 Flags,
05 Case BIT(2),
05 Severity BIT(3),
05 Control BIT(3),
03 FacID CHAR(3), /* Facility ID */
03 ISI /* Instance-Specific Information */
REAL FIXED BINARY(31,0);
/* Call CEE3SPM to query the current setting of */
/* the program mask */
ACTION = 2; /* Specify action code 2 to query */
/* the program mask */
CALL CEE3SPM ( ACTION, CONDSTR, FC );
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST(
'The initial setting of the program mask is: '
|| CONDSTR );
END;
ELSE DO;
DISPLAY('CEE3SPM failed with msg ' || FC.MsgNo);
STOP;
END;
/* Call CEE3SPM to enable specification exceptions. */
/* Specify action code 1 to SET the program mask. */
ACTION = 1;
/* Specify a program mask that allows specification */
/* exceptions (all others are unchanged) */
CONDSTR = 'S'; CALL CEE3SPM ( ACTION, CONDSTR, FC );
IF ¬ FBCHECK( FC, CEE000) THEN DO;
DISPLAY('CEE3SPM failed with msg ' || FC.MsgNo);
STOP;
END;
CALL CEE3SPM (2, CONDSTR, FC); /* Query settings */
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST(
'The new setting of the program mask is: '
|| CONDSTR );
END;
ELSE DO;
DISPLAY('CEE3SPM failed with msg ' || FC.MsgNo);
STOP;
END;
END PLI3SPM; CALL CEE3SPM ( ACTION, CONDSTR, FC );
IF ¬ FBCHECK( FC, CEE000) THEN DO;
DISPLAY('CEE3SPM failed with msg ' || FC.MsgNo);
STOP;
END;
CALL CEE3SPM (2, CONDSTR, FC); /* Query settings */
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST(
'The new setting of the program mask is: '
|| CONDSTR );
END;
ELSE DO;
DISPLAY('CEE3SPM failed with msg ' || FC.MsgNo);
STOP;
END;
END PLI3SPM;
|