Handling the CRCR or STOQ Result

The EVASUPPORT library procedures used for CRCR or STOQ communications each return a real value that follows the same format. CRCR and STOQ applications can use this value to determine whether each requested action succeeded or failed.

The following are the procedures that return a value in this format:

  • CRCR_RECV

  • CRCR_SEND

  • STOQ_POLL

  • STOQ_RECV

  • STOQ_SEND

This procedure result is divided into the following fields:

Field

Value and Meaning

[47:32]

This field is reserved for future use.

[15:04]

If an invalid parameter was detected, this field indicates which parameter was in error. A value of 1 indicates the first parameter; a value of 2 indicates the second parameter, and so on.

[11:01]

This field is used only if field [0:1] stores a 1, meaning that the function was not successful.

  • 0 – The failure is nonfatal.

  • 1 – The failure is fatal. In this case, the system terminates the user program before the user program reads the procedure result. However, you can read the procedure result value in program dumps to determine why the fault occurred.

[10:01]

Type of operation.

  • 0 – STOQ operation

  • 1 – CRCR operation

[09:06]

This field indicates the specific error that occurred. To interpret the meaning of this field, the calling program must first interrogate field [11:01] to determine whether the error was fatal, and field [10:01] to determine whether the error was related to STOQ or CRCR.

For nonfatal CRCR errors, the following are the possible values and their meanings:

  • 1 – No matching partner was available for the operation.

  • 2 – Insufficient memory available for CRCR data.

  • 3 – Maximum number of CRCR users reached.

[09:06] (cont.)

For nonfatal STOQ errors, the following are the possible values and their meanings:

  • 1 – No receive queue entry found for STOQ.

  • 2 – No memory available for STOQ data.

  • 3 – No queue slots available for STOQ data.

[09:06] (cont.)

For fatal CRCR errors, the following are the possible values and their meanings:

  • 1 – CRCR tables corrupted.

  • 2 – Invalid CRCR parameter. Field [15:04] specifies which parameter incurred the error.

  • 3 – No usercode.

  • 4 – The program attempted a global send operation (that is, a CRCR_SEND operation with the program name parameter left blank). The global form is valid only for RECEIVE operations.

[09:06] (cont.)

For fatal STOQ errors, the following are the possible values and their meanings:

  • 1 – The STOQ tables are corrupted.

  • 2 – An invalid parameter was passed to a STOQ procedure. Field [15:04] specifies which parameter incurred the error.

[03:03]

This field is reserved for future use.

[00:01]

  • 0 – The function was successful.

  • 1 – The function was not successful

If bits [11:08] are interrogated as a single field, then the possible values fall into the following ranges:

1 to 63 

Nonfatal STOQ error

64 to 127

Nonfatal CRCR error

128 to 191

Fatal STOQ error

192 to 255

Fatal CRCR error