OpenTP1 Version 7 Programming Reference COBOL Language

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

Preface

This manual explains how to create application programs which can be used with the following program products of OpenTP1:

In this manual, an application program which is created by the user is abbreviated to a UAP (User Application Program).

Products described in this manual, other than those for which the manual is released, may not work with OpenTP1 Version 7 products. You need to confirm that the products you want to use work with OpenTP1 Version 7 products.

Intended readers

This manual is intended for programmers who create user application programs (UAPs) used with TP1/Server Base or TP1/LiNK.

Readers of this manual are assumed to have knowledge about operating systems, online systems, handling of the machine to be used, and the syntax of the COBOL language used for coding application programs.

This manual assumes that the reader has read the OpenTP1 Programming Guide.

Organization of this manual

This manual is organized into the following chapters and an appendix:

1. Creating Application Programs
This chapter explains the procedure for writing application programs to be used with the OpenTP1.

2. Syntax of OpenTP1 Programs for COBOL-UAP Creation Programs
This chapter explains the syntax of OpenTP1 programs for COBOL-UAP creation.

3. Syntax of OpenTP1 Programs for COBOL-UAP Creation Programs (DML Interface)
This chapter explains the syntax of the data manipulation language (DML) for OpenTP1 COBOL-UAP creation programs.

4. X/Open-compliant Application Programming Interface
This chapter explains the syntax of the library functions complying with X/Open.

5. Syntax of OpenTP1 COBOL-UAP Creation Programs (Association Status Notification)
This chapter explains the syntax of the COBOL-UAP creation program used by SPPs to process communication events and the format of received communication events.

6. Coding Samples
This chapter gives coding samples for OpenTP1 application programs.

7. Reference for Application Activation
This chapter explains the communication facilities in the message exchange configuration, focusing on user exit routines relating to application program activate and MCF event (ERREVT4) reference information.

A. Using OpenTP1 Remote Procedure Calls and XATMI-interfaced API Functions in Combination
This chapter explains the procedures for creating UAPs that use OpenTP1 remote procedure calls and XATMI-Interfaced API functions in combination.

Related publications

This manual is part of a related set of manuals. The manuals in the set are listed below (with the manual numbers):

OpenTP1 products

Other OpenTP1 products

Other related products

For OpenTP1 protocol manuals, please check whether English versions are available.

Note
1 If you want to use this manual, confirm that it has been published. (Some of these manuals might not have been published yet.)

Conventions: Abbreviations

This manual uses the following abbreviations for product names:

Abbreviation Full name or meaning
AIX AIX 5L V5.1
AIX 5L V5.2
AIX 5L V5.3
AIX V6.1
Client .NET TP1/Client for .NET Framework uCosminexus TP1/Client for .NET Framework
Connector .NET TP1/Connector for .NET Framework uCosminexus TP1/Connector for .NET Framework
DPM JP1/ServerConductor/Deployment Manager
HI-UX/WE2 HI-UX/workstation Extended Version 2
HP-UX HP-UX (IPF) HP-UX 11i V2 (IPF)
HP-UX 11i V3 (IPF)
HP-UX (PA-RISC) HP-UX 11i V1 (PA-RISC)
HP-UX 11i V2 (PA-RISC)
IPF Itanium(R) Processor Family
Java JavaTM
JP1 JP1/AJS2 JP1/AJS2 - Agent JP1/Automatic Job Management System 2 - Agent
JP1/AJS2 - Manager JP1/Automatic Job Management System 2 - Manager
JP1/AJS2 - View JP1/Automatic Job Management System 2 - View
JP1/AJS2 - Scenario Operation JP1/AJS2 - Scenario Operation Manager JP1/Automatic Job Management System 2 - Scenario Operation Manager
JP1/AJS2 - Scenario Operation View JP1/Automatic Job Management System 2 - Scenario Operation View
JP1/NETM/Audit JP1/NETM/Audit - Manager
Linux Linux(R)
Linux (AMD64/Intel EM64T/x86) Red Hat Enterprise Linux AS 4 (AMD64 & Intel EM64T)
Red Hat Enterprise Linux AS 4 (x86)
Red Hat Enterprise Linux ES 4 (AMD64 & Intel EM64T)
Red Hat Enterprise Linux ES 4 (x86)
Red Hat Enterprise Linux 5 (AMD/Intel 64)
Red Hat Enterprise Linux 5 (x86)
Red Hat Enterprise Linux 5 Advanced Platform (AMD/Intel 64)
Red Hat Enterprise Linux 5 Advanced Platform (x86)
Linux (IPF) Red Hat Enterprise Linux AS 4 (IPF)
Red Hat Enterprise Linux 5 (Intel Itanium)
Red Hat Enterprise Linux 5 Advanced Platform (Intel Itanium)
MS-DOS Microsoft(R) MS-DOS(R)
NETM/DM JP1/NETM/DM Client
JP1/NETM/DM Manager
JP1/NETM/DM SubManager
Oracle Oracle 10g
Oracle9i
Solaris Solaris 8
Solaris 9
Solaris 10
TP1/Client TP1/Client/J uCosminexus TP1/Client/J
TP1/Client/P uCosminexus TP1/Client/P
TP1/Client/W uCosminexus TP1/Client/W
uCosminexus TP1/Client/W(64)
TP1/EE uCosminexus TP1/Server Base Enterprise Option
uCosminexus TP1/Server Base Enterprise Option(64)
TP1/Extension 1 uCosminexus TP1/Extension 1
uCosminexus TP1/Extension 1(64)
TP1/FS/Direct Access uCosminexus TP1/FS/Direct Access
uCosminexus TP1/FS/Direct Access(64)
TP1/FS/Table Access uCosminexus TP1/FS/Table Access
uCosminexus TP1/FS/Table Access(64)
TP1/High Availability uCosminexus TP1/High Availability
uCosminexus TP1/High Availability(64)
TP1/LiNK uCosminexus TP1/LiNK
TP1/Message Control uCosminexus TP1/Message Control
uCosminexus TP1/Message Control(64)
TP1/Message Control/Tester uCosminexus TP1/Message Control/Tester
TP1/Message Queue uCosminexus TP1/Message Queue
uCosminexus TP1/Message Queue(64)
TP1/Message Queue - Access uCosminexus TP1/Message Queue - Access
uCosminexus TP1/Message Queue - Access(64)
TP1/Messaging uCosminexus TP1/Messaging
TP1/Multi uCosminexus TP1/Multi
TP1/NET/HDLC uCosminexus TP1/NET/HDLC
TP1/NET/High Availability uCosminexus TP1/NET/High Availability
uCosminexus TP1/NET/High Availability(64)
TP1/NET/HSC uCosminexus TP1/NET/HSC
TP1/NET/Library uCosminexus TP1/NET/Library
uCosminexus TP1/NET/Library(64)
TP1/NET/NCSB uCosminexus TP1/NET/NCSB
TP1/NET/OSAS-NIF uCosminexus TP1/NET/OSAS-NIF
TP1/NET/OSI-TP uCosminexus TP1/NET/OSI-TP
TP1/NET/SLU - TypeP2 TP1/NET/Secondary Logical Unit - TypeP2 uCosminexus TP1/NET/Secondary Logical Unit - TypeP2
TP1/NET/TCP/IP uCosminexus TP1/NET/TCP/IP
uCosminexus TP1/NET/TCP/IP(64)
TP1/NET/UDP uCosminexus TP1/NET/User Datagram Protocol
TP1/NET/User Agent uCosminexus TP1/NET/User Agent
TP1/NET/X25 uCosminexus TP1/NET/X25
TP1/NET/X25-Extended uCosminexus TP1/NET/X25-Extended
TP1/NET/XMAP3 uCosminexus TP1/NET/XMAP3
TP1/Offline Tester uCosminexus TP1/Offline Tester
TP1/Online Tester uCosminexus TP1/Online Tester
TP1/Resource Manager Monitor uCosminexus TP1/Resource Manager Monitor
TP1/Server Base uCosminexus TP1/Server Base
uCosminexus TP1/Server Base(64)
TP1/Shared Table Access uCosminexus TP1/Shared Table Access
TP1/Web uCosminexus TP1/Web
Windows 2000 Microsoft(R) Windows(R) 2000 Advanced Server Operating System
Microsoft(R) Windows(R) 2000 Datacenter Server Operating System
Microsoft(R) Windows(R) 2000 Professional Operating System
Microsoft(R) Windows(R) 2000 Server Operating System
Windows Server 2003 Microsoft(R) Windows Server(R) 2003, Datacenter Edition
Microsoft(R) Windows Server(R) 2003, Enterprise Edition
Microsoft(R) Windows Server(R) 2003, Standard Edition
Windows Server 2003 R2 Microsoft(R) Windows Server(R) 2003 R2, Enterprise Edition
Microsoft(R) Windows Server(R) 2003 R2, Standard Edition
Windows Server 2003 x64 Editions Microsoft(R) Windows Server(R) 2003, Datacenter x64 Edition
Microsoft(R) Windows Server(R) 2003, Enterprise x64 Edition
Microsoft(R) Windows Server(R) 2003, Standard x64 Edition
Windows Server 2003 R2 x64 Editions Microsoft(R) Windows Server(R) 2003 R2, Enterprise x64 Edition
Microsoft(R) Windows Server(R) 2003 R2, Standard x64 Edition
Windows Server 2008 Microsoft(R) Windows Server(R) 2008 Datacenter (x86)
Microsoft(R) Windows Server(R) 2008 Enterprise (x86)
Microsoft(R) Windows Server(R) 2008 Standard (x86)
Windows Server 2008 x64 Editions Microsoft(R) Windows Server(R) 2008 Datacenter (x64)
Microsoft(R) Windows Server(R) 2008 Enterprise (x64)
Microsoft(R) Windows Server(R) 2008 Standard (x64)
Windows Vista Microsoft(R) Windows Vista(R) Business (x86)
Microsoft(R) Windows Vista(R) Enterprise (x86)
Microsoft(R) Windows Vista(R) Ultimate (x86)
Windows Vista x64 Editions Microsoft(R) Windows Vista(R) Business (x64)
Microsoft(R) Windows Vista(R) Enterprise (x64)
Microsoft(R) Windows Vista(R) Ultimate (x64)
Windows XP Microsoft(R) Windows(R) XP Professional Operating System

Conventions: Acronyms

This manual also uses the following acronyms:

Acronym Full name or meaning
ACL Access Control List
ANSI American National Standards Institute
AP Application Program
API Application Programming Interface
C/S Client/Server
CPU Central Processing Unit
CRM Communication Resource Manager
CUP Client User Program
DAM Direct Access Method
DBMS Database Management System
DML Data Manipulation Language
DNS Domain Name System
FEP Front End Processor
GUI Graphical User Interface
HA High Availability
ISAM Indexed Sequential Access Method
IST Internode Shared Table
LAN Local Area Network
MCF Message Control Facility
MHP Message Handling Program
MQA Message Queue Access
MQI Message Queue Interface
OS Operating System
OSI Open Systems Interconnection
OSI TP Open Systems Interconnection Transaction Processing
PC Personal Computer
PRF Performance
RM Resource Manager
RPC Remote Procedure Call
SPP Service Providing Program
SUP Service Using Program
TAM Table Access Method
TCP/IP Transmission Control Protocol/Internet Protocol
UAP User Application Program
UOC User Own Coding
VM Virtual Machine
WAN Wide Area Network
WS Workstation

Conventions: Diagrams

This manual uses the following conventions in diagrams:

[Figure]

Conventions: Differences between JIS and ASCII keyboards

The JIS code and ASCII code keyboards are different in the input characters represented by the following codes. In this manual, the use of a JIS keyboard is assumed for these characters.

Code JIS keyboard ASCII keyboard
(5c)16 [Figure] (yen symbol) \ (backslash)
(7e)16 [Figure] (overline) ~ (tilde)

Conventions: Fonts and symbols

The following table explains the fonts used in this manual:

Font Convention
Bold Bold type indicates text on a window, other than the window title. Such text includes menus, menu options, buttons, radio box options, or explanatory labels. For example:
  • From the File menu, choose Open.
  • Click the Cancel button.
  • In the Enter name entry box, type your name.
Italics Italics are used to indicate a placeholder for some actual text to be provided by the user or system. For example:
  • Write the command as follows:
    copy source-file target-file
  • The following message appears:
    A file was not found. (file = file-name)
Italics are also used for emphasis. For example:
  • Do not delete the configuration file.
Code font A code font indicates text that the user enters without change, or text (such as messages) output by the system. For example:
  • At the prompt, enter dir.
  • Use the send command to send mail.
  • The following message is displayed:
    The password is incorrect.
SD Bold code-font characters indicate the abbreviation for a command.
perm Underlined characters indicate the default value.

The following table explains the symbols used in this manual:

Symbol Convention
| In syntax explanations, a vertical bar separates multiple items, and has the meaning of OR. For example:
A|B|C means A, or B, or C.
{ } In syntax explanations, curly brackets indicate that only one of the enclosed items is to be selected. For example:
{A|B|C} means only one of A, or B, or C.
[ ] In syntax explanations, square brackets indicate that the enclosed item or items are optional. For example:
[A] means that you can specify A or nothing.
[B|C] means that you can specify B, or C, or nothing.
... In coding, an ellipsis (...) indicates that one or more lines of coding are not shown for purposes of brevity.
In syntax explanations, an ellipsis indicates that the immediately preceding item can be repeated as many times as necessary. For example:
A, B, B, ... means that, after you specify A, B, you can specify B as many times as necessary.
[Figure] Indicates a space character.
~ The item preceding this symbol must be specified according to the rule given in the angle brackets (< >) following this symbol.
< > Information between these symbols indicates the syntax of the item.

Conventions for permitted characters

In most cases, only the following characters are permitted as syntax elements (if other characters are permitted, the manual will state this explicitly):

Type Definition
Upper-case alphabetic characters A to Z
Lower-case alphabetic characters a to z
Alphabetic characters A to Z, a to z
Numeric characters 0 to 9
Alphanumeric characters A to Z, a to z, 0 to 9
Symbols !, #, $, %, &, ', (, ), *, +, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, ~
Hexadecimal Numeric values 0 to 9, A to F, and a to f
Pathname Symbolic names, slashes (/), and periods (.), depending on the operating system being used.

Conditions for values to be specified for data areas

The table below lists the conditions for values to be specified for data areas.

Value to be specified Condition
Service group name Must be an ASCII character string of up to 31 bytes. Note that null characters, blanks, at marks (@), and periods cannot be used. When a service group name is specified in a data area, it must end with a blank. This blank will not be included in the length of the character string.
Service name Must be an ASCII character string of up to 31 bytes. Note that null and blank characters cannot be used. When a service name is specified in a data area, it must end with a blank. This blank will not be included in the length of the character string.
Physical file name Must be a pathname consisting of the special file name followed by a name of 14 or less bytes. The entire pathname must not exceed 63 characters.
Logical file name Must be an alphanumeric character string of 1 to 8 bytes that begins with an alphabetic character.

Conventions: KB, MB, GB, and TB

This manual uses the following conventions:

Conventions: Platform-specific notational differences

For the Windows version of OpenTP1, there are some notational differences from the description in the manual. The following table describes these differences.

Item Description in the manual Change to:
Environment variable $aaaaaa
Example: $DCDIR
%aaaaaa%
Example: %DCDIR%
Path name separator Colon (:) Semicolon (;)
Directory name separator Slash (/) Backslash (\)
Absolute path name A path from the root directory
Example: /tmp
A path name from a drive letter and the root directory
Example: C:\tmp
Executable file name File name only (without an extension)
Example: mcfmngrd
File name with an extension
Example: mcfmngrd.exe
make command make nmake

Conventions: Version numbers

The version numbers of Hitachi program products are usually written as two sets of two digits each, separated by a hyphen. For example:

The version number might be shown on the spine of a manual as Ver. 2.00, but the same version number would be written in the program as 02-00.

Acknowledgments

Quotations from X/Open CAE Specification Distributed Transaction Processing: The XATMI Specification published by X/Open Company Limited

The following section comes from Chapter 7. COBOL Reference Manual Pages of the above document.

Chapter 4. X/Open-Compliant Application Programming Interface
4.1 XATMI-Interfaced Application Programming Interface (TP~ )

Quotations from X/Open CAE Specification Distributed Transaction Processing: The TX (Transaction Demarcation) Specification published by X/Open Company Limited

The following section comes from Chapter 6. COBOL Reference Manual Pages of the above document.

Chapter 4. X/Open-Compliant Application Programming Interface
4.2 TX-Interfaced Application Programming Interface (TX~ )

COBOL

COBOL was developed by CODASYL (the Conference on Data Systems Languages). Of the OpenTP1 application programming interface specifications, the data manipulation language (DML) specification was developed by relying on the communication section in CODASYL COBOL (1981) as well as the RECEIVE, SEND, COMMIT, and ROLLBACK statements and adding original specifications and interpretations made by Hitachi, Ltd. The publisher of this manual expresses acknowledgment to the original developer and presents the following acknowledgment statement as requested by CODASYL. This statement is quoted from the acknowledgement in the original CODASYL COBOL specification titled COBOL Journal of Development 1984.

Any organization interested in reproducing the COBOL report and specifications in whole or in part, using ideas from this report as the basis for an instruction manual or for any other purpose, is free to do so. However, all such organizations are requested to reproduce the following acknowledgement paragraphs in their entirety as part of the preface to any such publication. Any organization using a short passage from this document, such as in a book review, is requested to mention "COBOL" in acknowledgement of the source, but need not quote the acknowledgement.

COBOL is an industry language and is not the property of any company or group of companies, or of any organization or group of organizations.

No warranty, expressed or implied, is made by any contributor or by the CODASYL COBOL Committee as to the accuracy and functioning of the programming system and language. Moreover, no responsibility is assumed by any contributor, or by the committee, in connection therewith.

The authors and copyright holders of the copyrighted material used herein

FLOW-MATIC (trademark of Sperry Rand Corporation), Programming for the Univac (R) I and II, Data Automation Systems copyrighted 1958, 1959, by Sperry Rand Corporation; IBM Commercial Translator From No. F 28-8013, copyrighted 1959 by IBM; FACT, DSI 27A5260-2760, copyrighted 1960 by Minneapolis-Honeywell

have specifically authorized the use of this material in whole or in part, in the COBOL specifications. Such authorization extends to the reproduction and use of COBOL specifications in programming manuals or similar publications.

Important note on this manual

Please check the availability of the products and manuals for HAmonitor, ServerConductor/DeploymentManager, Cosminexus, and Job Management Partner 1/Automatic Job Management System 2.