OpenTP1 Version 7 Programming Reference COBOL Language

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

CBLDCMCF('MAINLOOP') - Start an MHP service

Format

PROCEDURE DIVISION specification

CALL  'CBLDCMCF'  USING  unique-name-1

DATA DIVISION specification

01  unique-name-1.
    02  data-name-A    PIC X(8) VALUE 'MAINLOOP'.
    02  data-name-B    PIC X(5).
    02  FILLER        PIC X(3).
    02  data-name-C    PIC X(16).

Description

CBLDCMCF('MAINLOOP') accepts scheduling to a service program corresponding to the application name. Call CBLDCMCF('MAINLOOP') only once in the process from the MHP main program.

CBLDCMCF('MAINLOOP') does not return until it receives a termination request for the MHP from OpenTP1.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'MAINLOOP' for the request code indicating MHP service start.

data-name-C

Specify LOW-VALUE.

Data area to which a value is returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

Status codes

Status code Explanation
00000 The program received a termination request for the MHP from OpenTP1. The MHP must immediately execute termination processing for its process. Then the MHP must call CBLDCMCF('CLOSE ') and CBLDCRPC('CLOSE ') to exit the main program with STOP RUN.
70900 The value specified for a data-name is invalid.
70901 CBLDCRPC('OPEN ') was not called before CBLDCMCF('MAINLOOP').
70902 The service could not be started.
70903 The local memory became insufficient.
72016 The value specified for data-name-C is invalid.
72028 The value specified for data-name-A is invalid.