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 codeExplanation
00000The 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.
70900The value specified for a data-name is invalid.
70901CBLDCRPC('OPEN ') was not called before CBLDCMCF('MAINLOOP').
70902The service could not be started.
70903The local memory became insufficient.
72016The value specified for data-name-C is invalid.
72028The value specified for data-name-A is invalid.