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:

AbbreviationFull name or meaning
AIXAIX 5L V5.1
AIX 5L V5.2
AIX 5L V5.3
AIX V6.1
Client .NETTP1/Client for .NET FrameworkuCosminexus TP1/Client for .NET Framework
Connector .NETTP1/Connector for .NET FrameworkuCosminexus TP1/Connector for .NET Framework
DPMJP1/ServerConductor/Deployment Manager
HI-UX/WE2HI-UX/workstation Extended Version 2
HP-UXHP-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)
IPFItanium(R) Processor Family
JavaJavaTM
JP1JP1/AJS2JP1/AJS2 - AgentJP1/Automatic Job Management System 2 - Agent
JP1/AJS2 - ManagerJP1/Automatic Job Management System 2 - Manager
JP1/AJS2 - ViewJP1/Automatic Job Management System 2 - View
JP1/AJS2 - Scenario OperationJP1/AJS2 - Scenario Operation ManagerJP1/Automatic Job Management System 2 - Scenario Operation Manager
JP1/AJS2 - Scenario Operation ViewJP1/Automatic Job Management System 2 - Scenario Operation View
JP1/NETM/AuditJP1/NETM/Audit - Manager
LinuxLinux(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-DOSMicrosoft(R) MS-DOS(R)
NETM/DMJP1/NETM/DM Client
JP1/NETM/DM Manager
JP1/NETM/DM SubManager
OracleOracle 10g
Oracle9i
SolarisSolaris 8
Solaris 9
Solaris 10
TP1/ClientTP1/Client/JuCosminexus TP1/Client/J
TP1/Client/PuCosminexus TP1/Client/P
TP1/Client/WuCosminexus TP1/Client/W
uCosminexus TP1/Client/W(64)
TP1/EEuCosminexus TP1/Server Base Enterprise Option
uCosminexus TP1/Server Base Enterprise Option(64)
TP1/Extension 1uCosminexus TP1/Extension 1
uCosminexus TP1/Extension 1(64)
TP1/FS/Direct AccessuCosminexus TP1/FS/Direct Access
uCosminexus TP1/FS/Direct Access(64)
TP1/FS/Table AccessuCosminexus TP1/FS/Table Access
uCosminexus TP1/FS/Table Access(64)
TP1/High AvailabilityuCosminexus TP1/High Availability
uCosminexus TP1/High Availability(64)
TP1/LiNKuCosminexus TP1/LiNK
TP1/Message ControluCosminexus TP1/Message Control
uCosminexus TP1/Message Control(64)
TP1/Message Control/TesteruCosminexus TP1/Message Control/Tester
TP1/Message QueueuCosminexus TP1/Message Queue
uCosminexus TP1/Message Queue(64)
TP1/Message Queue - AccessuCosminexus TP1/Message Queue - Access
uCosminexus TP1/Message Queue - Access(64)
TP1/MessaginguCosminexus TP1/Messaging
TP1/MultiuCosminexus TP1/Multi
TP1/NET/HDLCuCosminexus TP1/NET/HDLC
TP1/NET/High AvailabilityuCosminexus TP1/NET/High Availability
uCosminexus TP1/NET/High Availability(64)
TP1/NET/HSCuCosminexus TP1/NET/HSC
TP1/NET/LibraryuCosminexus TP1/NET/Library
uCosminexus TP1/NET/Library(64)
TP1/NET/NCSBuCosminexus TP1/NET/NCSB
TP1/NET/OSAS-NIFuCosminexus TP1/NET/OSAS-NIF
TP1/NET/OSI-TPuCosminexus TP1/NET/OSI-TP
TP1/NET/SLU - TypeP2TP1/NET/Secondary Logical Unit - TypeP2uCosminexus TP1/NET/Secondary Logical Unit - TypeP2
TP1/NET/TCP/IPuCosminexus TP1/NET/TCP/IP
uCosminexus TP1/NET/TCP/IP(64)
TP1/NET/UDPuCosminexus TP1/NET/User Datagram Protocol
TP1/NET/User AgentuCosminexus TP1/NET/User Agent
TP1/NET/X25uCosminexus TP1/NET/X25
TP1/NET/X25-ExtendeduCosminexus TP1/NET/X25-Extended
TP1/NET/XMAP3uCosminexus TP1/NET/XMAP3
TP1/Offline TesteruCosminexus TP1/Offline Tester
TP1/Online TesteruCosminexus TP1/Online Tester
TP1/Resource Manager MonitoruCosminexus TP1/Resource Manager Monitor
TP1/Server BaseuCosminexus TP1/Server Base
uCosminexus TP1/Server Base(64)
TP1/Shared Table AccessuCosminexus TP1/Shared Table Access
TP1/WebuCosminexus TP1/Web
Windows 2000Microsoft(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 2003Microsoft(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 R2Microsoft(R) Windows Server(R) 2003 R2, Enterprise Edition
Microsoft(R) Windows Server(R) 2003 R2, Standard Edition
Windows Server 2003 x64 EditionsMicrosoft(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 EditionsMicrosoft(R) Windows Server(R) 2003 R2, Enterprise x64 Edition
Microsoft(R) Windows Server(R) 2003 R2, Standard x64 Edition
Windows Server 2008Microsoft(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 EditionsMicrosoft(R) Windows Server(R) 2008 Datacenter (x64)
Microsoft(R) Windows Server(R) 2008 Enterprise (x64)
Microsoft(R) Windows Server(R) 2008 Standard (x64)
Windows VistaMicrosoft(R) Windows Vista(R) Business (x86)
Microsoft(R) Windows Vista(R) Enterprise (x86)
Microsoft(R) Windows Vista(R) Ultimate (x86)
Windows Vista x64 EditionsMicrosoft(R) Windows Vista(R) Business (x64)
Microsoft(R) Windows Vista(R) Enterprise (x64)
Microsoft(R) Windows Vista(R) Ultimate (x64)
Windows XPMicrosoft(R) Windows(R) XP Professional Operating System

Conventions: Acronyms

This manual also uses the following acronyms:

AcronymFull name or meaning
ACLAccess Control List
ANSIAmerican National Standards Institute
APApplication Program
APIApplication Programming Interface
C/SClient/Server
CPUCentral Processing Unit
CRMCommunication Resource Manager
CUPClient User Program
DAMDirect Access Method
DBMSDatabase Management System
DMLData Manipulation Language
DNSDomain Name System
FEPFront End Processor
GUIGraphical User Interface
HAHigh Availability
ISAMIndexed Sequential Access Method
ISTInternode Shared Table
LANLocal Area Network
MCFMessage Control Facility
MHPMessage Handling Program
MQAMessage Queue Access
MQIMessage Queue Interface
OSOperating System
OSIOpen Systems Interconnection
OSI TPOpen Systems Interconnection Transaction Processing
PCPersonal Computer
PRFPerformance
RMResource Manager
RPCRemote Procedure Call
SPPService Providing Program
SUPService Using Program
TAMTable Access Method
TCP/IPTransmission Control Protocol/Internet Protocol
UAPUser Application Program
UOCUser Own Coding
VMVirtual Machine
WANWide Area Network
WSWorkstation

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.

CodeJIS keyboardASCII 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:

FontConvention
BoldBold 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.
ItalicsItalics 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 fontA 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.
SDBold code-font characters indicate the abbreviation for a command.
permUnderlined characters indicate the default value.

The following table explains the symbols used in this manual:

SymbolConvention
|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):

TypeDefinition
Upper-case alphabetic charactersA to Z
Lower-case alphabetic charactersa to z
Alphabetic charactersA to Z, a to z
Numeric characters0 to 9
Alphanumeric charactersA to Z, a to z, 0 to 9
Symbols!, #, $, %, &, ', (, ), *, +, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, ~
HexadecimalNumeric values 0 to 9, A to F, and a to f
PathnameSymbolic 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 specifiedCondition
Service group nameMust 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 nameMust 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 nameMust 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 nameMust 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.

ItemDescription in the manualChange to:
Environment variable$aaaaaa
Example: $DCDIR
%aaaaaa%
Example: %DCDIR%
Path name separatorColon (:)Semicolon (;)
Directory name separatorSlash (/)Backslash (\)
Absolute path nameA path from the root directory
Example: /tmp
A path name from a drive letter and the root directory
Example: C:\tmp
Executable file nameFile name only (without an extension)
Example: mcfmngrd
File name with an extension
Example: mcfmngrd.exe
make commandmakenmake

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.