OpenTP1 Version 7 Programming Reference COBOL Language
Format for explaining COBOL-UAP creation programs
To create an OpenTP1 UAP in COBOL language, call the COBOL-UAP creation program corresponding to the function in the OpenTP1 library by issuing the CALL statement. COBOL/2 and COBOL85 are available for coding in COBOL language.
COBOL-UAP creation programs are explained in the following format:
Format
Explanations given under "Format" cover the format in which the COBOL-UAP creation program corresponding to a function in the OpenTP1 library is called with the CALL statement as well as how to specify the area.
The format is common to COBOL/2 and COBOL85. Specify a value for a data name according to the data format of the PICTURE clause shown here. If the value to be specified is determined, the value is written in the VALUE clause. For files and data which must have unique names, assign a specific name to each file and data unless otherwise specified. The length of a character string specified as a data name must comply with the specifications of COBOL in use.
When writing a program in COBOL, the COBOL language templates, which are OpenTP1 samples, can be used. Modifying the templates according to the program to be coded saves programmers the trouble of coding DATA DIVISION from the beginning. The COBOL language templates are stored in the /$DCDIR/examples/COBOL/ directory. Each template is stored in a file named according to each system service. The template file name is DCxxx.cbl (xxx is the last three characters of the COBOL-UAP creation program name.)
Description
Describes the facilities of the COBOL-UAP creation programs. From here on, the format of a COBOL-UAP creation program is represented as follows:
Indicates the names of data which is specified in DATA DIVISION and for which values are specified in data areas when the COBOL-UAP creation program is called. Specify a value for each data name according to the explanation. If a value is not always specified in a data area, the explanation of the data name is enclosed in brackets [ ] when the value is specified for the argument.
Data area(s) to which a value(s) is returned from OpenTP1
Indicates the names of data which is specified in DATA DIVISION and to which a value(s) is returned from OpenTP1 after the CALL statement is executed. After executing the CALL statement, reference the contents of the data area indicated with the data name. If a value is not always returned to a data area from OpenTP1, the explanation of the data name is enclosed in brackets [ ] when the value is returned.
Data area(s) to which a value(s) is passed from the client UAP
Indicates a data area(s) to which a value(s) is returned from the client UAP when the service program is used. Execute service program processing referencing the contents of the data area.
Data area(s) to which a value(s) is returned from the server UAP
Indicates the names of data whose a value(s) is returned from the service program when a synchronous-response-type RPC or asynchronous-response-type RPC is used. The UAP that called CBLDCRPC('CALL ') or CBLDCRPC('POLLANYR') can reference the value of the data area shown here.
Status codes returned when the CALL statement is executed are explained in a table. The status code indicates whether the COBOL-UAP creation program was executed normally. If an error occurs, the status code indicates the error status.
A COBOL language status code comprises five digits. It is included in the first unique name specified in the USING clause. The following explains the relationship between the status code and unique names specified in the USING clause of the CALL statement:
CALL 'name-of-program-to-be-called' USING unique-name-1 unique-name-2... |
Example
Provided only for COBOL-UAP creation programs with which specification samples are necessary.
Note(s)
Explains a note(s) on using the facilities of COBOL-UAP creation programs.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.