OpenTP1 Version 7 Programming Reference COBOL Language

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

CBLDCRPC('SVRETRY ') - Retry a service program

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 'SVRETRY '.
    02  data-name-B    PIC X(5).
    02  FILLER        PIC X(3).
    02  data-name-C    PIC S9(9) COMP VALUE ZERO.

Description

CBLDCRPC('SVRETRY ') allows you to retry processing for a running service program. To retry a service program, invoke CBLDCRPC('SVRETRY ') on the service program to be retried and make it return. After this, the same service program is restarted from the same process.

If a service program invoked from a response-type RPC is retried, the values (response storage area and response length) set by the service program before the retry are invalidated.

If CBLDCRPC('SVRETRY ') is invoked after the retry count assigned to the rpc_service_retry_count operand in the user service definition is exceeded (or when 0 is assigned to the rpc_service_retry_count operand), CBLDCRPC('SVRETRY ') returns with an error, giving the status code 00377. The service program will not be retried. If the service program was invoked by a response-type RPC, CBLDCRPC('SVRETRY ') returns the contents of the response storage area to the client UAP.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'SVRETRY[Figure]' as a request code for service program retry.

data-name-C

Specify 0.

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 (request code) specified for data-name-A is invalid.
00377 An attempt was made to invoke CBLDCRPC('SVRETRY ') beyond the maximum service retry count assigned to the rpc_service_retry_count operand in the user service definition. No more service program can be retried.
00302 The condition for invoking CBLDCRPC('SVRETRY ') is incorrect. Probable causes include:
  • CBLDCRPC('SVRETRY ') is not invoked from within the service program.
  • CBLDCRPC('SVRETRY ') is invoked within the range of a global transaction.

Notes

  1. Before invoking CBLDCRPC('SVRETRY '), make sure that the following conditions are fulfilled. Otherwise, CBLDCRPC('SVRETRY ') returns with an error.
    • CBLDCRPC('SVRETRY ') must be invoked from within the service program.
    • The running service program must not be within the range of a global transaction.
  2. The service program which invokes CBLDCRPC('SVRETRY ') can reference data passed from a client UAP, but cannot modify it. If data in an input data area is modified, the system operation is unpredictable.
  3. CBLDCRPC('SVRETRY ') can be invoked only from a service program which was asked to offer its service using the OpenTP1-specific remote procedure call CBLDCRPC('CALL '). Processing for other service programs cannot be retried using CBLDCRPC('SVRETRY ').