OpenTP1 Version 7 Programming Reference COBOL Language

[Contents][Index][Back][Next]

CBLDCRPC('SETSVPRI') - Set a schedule priority of a service request

Format

PROCEDURE DIVISION specification

CALL  'CBLDCRPC'  USING  unique-name-1

DATA DIVISION specification

01  unique-name-1.
    02  data-name-A    PIC X(8) VALUE 'SETSVPRI'.
    02  data-name-B    PIC X(5).
    02  FILLER        PIC X(3).
    02  data-name-C    PIC S9(9) COMP VALUE ZERO.

Description

CBLDCRPC('SETSVPRI') sets a priority of a service request. It is used when controlling schedule priorities for individual service requests. The priority set remains unchanged until it is updated by CBLDCRPC('SETSVPRI'). Therefore, if service requests are to be used at once with the same priority, use CBLDCRPC('SETSVPRI') only once.

The priority set by CBLDCRPC('SETSVPRI') will be reported to the server via the schedule queue by CBLDCRPC('CALL ') which is called immediately after CBLDCRPC('SETSVPRI').

If CBLDCRPC('SETSVPRI') is not called at all, the value 4, which is the default interpretation of the schedule service, is set as the priority of service requests.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'SETSVPRI' for the request code indicating that a service request schedule priority be set.

data-name-C

Specify 0 or a number from 1 to 8 as a service request schedule priority. The specification of data-name-C is mandatory. The highest priority is represented by 1 and the lowest priority is represented by 8. If 0 is specified, the default interpretation by the schedule service is in effect. If any other value is specified, CBLDCRPC('SETSVPRI') is ignored.

Data area whose value is returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

Status codes

Status code Explanation
00000 Normal termination.
00301 The value specified for the data-name is invalid.
This error also occurs if the request code (data-name-A) is invalid.
Other than the above An unprecedented error (e.g., program damage) occurred.

Notes

  1. In the case of a queue-receiving server, the specified service request priority is valid only if service_priority_control=Y (priority control in effect) is specified in the user service definition of the server UAP. If priority control is not used on the server UAP to which the service request is addressed, CBLDCRPC('SETSVPRI') has no effect even when used.
  2. CBLDCRPC('SETSVPRI') is invalid if called for a service request specified in CBLDCRPC('CALL ') carried on the second or subsequent chained RPC or CBLDCRPC('CALL ') called to terminate chained RPCs.
  3. CBLDCRPC('CALL ') does not reset the value changed by CBLDCRPC('SETSVPRI'). To reset the service request priority, call CBLDCRPC('SETSVPRI') again with 0 assigned to data-name-C.