OpenTP1 Version 7 Programming Guide

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

8.8.2 How to use the cobol language templates

When using the COBOL language templates, modify the following values so that they can be suitable for processing of the UAP to be coded:

For the values set into data area, see the syntax for each facility shown in the manual OpenTP1 Programming Reference COBOL Language.

There are two ways to use the COBOL language templates:

Organization of this subsection
(1) How to use the text editor calling facility
(2) How to use the COPY statement of COBOL language
(3) Notes on using the COBOL language templates

(1) How to use the text editor calling facility

To use a template:

  1. Select a template for the desired facility from the /BeTRAN/examples/COBOL/ directory.
  2. Cut and paste the DATA DIVISION section to the source program of the UAP using the text editor calling facility.
  3. Modify the pasted section so that it can be a data area suitable for the coding.

(2) How to use the COPY statement of COBOL language

To use a template:

  1. Select a template for the desired facility from the /BeTRAN/examples/COBOL/ directory.
  2. Declare COPY with the file name of the template from the source program of the UAP. The file name to be specified with the COPY statement should be the file name of the template excluding the suffix .cbl.
  3. Enter the file of the template in a directory which can be referenced with the COPY statement. This procedure depends on the processor of the COBOL language in use (such as file copy, setting environment variables).
  4. Modify the file of the template so that it can be a data area suitable for the coding.

(3) Notes on using the COBOL language templates

  1. The length of the PICTURE clause is declared as (n) in the data area to be modified according to the UAP processing. Modify the declaration before using it. Compilation without modification will result in error.
  2. The following files of the COBOL language templates assume that the corresponding product has been installed:
    DCDAM.cbl, DCDMB.cbl: DAM file service (CBLDCDAM, CBLDCDMB)
    DCTAM.cbl: TAM file service (CBLDCTAM)
    DCMCF.cbl: Message exchange (CBLDCMCF)
    DCUTO.cbl: Online tester management (CBLDCUTO)
    DCIST.cbl: IST service (CBLDCIST)
  3. The template for message exchange (DCMCF.cbl) contains all MCF-related information usable for OpenTP1. Therefore, some templates of the COBOL-UAP creation program cannot be used with some communication protocol supporting products. Values to be set in a data area also depend on the communication protocol supporting product. Change the format of DCMCF.cbl before using it, consulting the syntax of COBOL language shown in the applicable OpenTP1 Protocol manual.
  4. It is recommended to copy a template from the original directory and then modify the copy according to the UAP processing.