unisys ClearPath Enterprise Servers Communications Application Program Interface (COMAPI) User s Guide 8R2 September

Similar documents
Distributed Data Processing (DDP-PPC) DCA Interface C Language

Distributed Data Processing (DDP-PPC) OSI Interface C Language

TCP/IP Application Services (TAS) Mail Processor

unisys ClearPath Dorado Servers Application Integration Services Installation and Programming Guide AIS for Dorado Release 3.

unisys Agile Business Suite How to Install Visual Studio 2013 for AB Suite 5.0 Applies to: Developer 5.0

unisys Unisys Stealth(cloud) for Amazon Web Services Deployment Guide Release 2.0 May

Data Management System (DMS 2200) FORTRAN Data Manipulation Language (FDML)

unisys ClearPath Enterprise Servers Remote Database Backup Planning and Operations Guide ClearPath MCP 18.0 April

unisys Distributed Processing Middleware Open Distributed Transaction Processing Messages imagine it. done. ClearPath OS 2200 Release 13.

unisys ClearPath Enterprise Servers TCP/IP for MCP v3 Networks Implementation and Operations Guide ClearPath MCP 18.0 April

Configuring IP SLAs TCP Connect Operations

Single Point Operations

unisys Enterprise Database Server for ClearPath MCP Transaction Processing System (TPS) Programming Guide imagine it. done. ClearPath MCP 13.

unisys Product Documentation Library CDLib Manager User s Guide Release Level April

Contents. Part 1. Introduction and TCP/IP 1. Foreword Preface. xix. I ntroduction 31

Configuring IP SLAs TCP Connect Operations

unisys ClearPath OS 2200 Symbolic Stream Generator (SSG) Programming Reference Manual ClearPath OS 2200 Release 14.0 February

Configuring IP SLAs UDP Echo Operations

IPS Remote Site Facility Module (VS 345-REM)

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

Enterprise Output Manager. UCopyIt Guide UNISYS. ' 2017 Unisys Corporation. All rights reserved. Release 3.4a. Printed in USA.

BrightStor ARCserve Backup for Windows

Configuring IP SLAs ICMP Echo Operations

Using NAT in Overlapping Networks

Configuring IP Services

Oracle Financial Services Behavior Detection Platform: Administration Tools User Guide. Release May 2012

Configuring IP SLAs ICMP Echo Operations

Cisco TEO Adapter Guide for SAP ABAP

IBM Spectrum Protect Snapshot Version Installation and User's Guide for Windows IBM

UNISYS. Unisys Check Processing Enterprise Solutions. IPS/ICPS Software-Based CAR/LAR Release Notes. Release 4.0.0

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1

SPECTRUM. Control Panel User Guide (5029) r9.0.1

Veritas NetBackup Vault Administrator s Guide

RSVP Support for RTP Header Compression, Phase 1

User Datagram Protocol

IBM DB2 Query Patroller. Administration Guide. Version 7 SC

IBM Spectrum Protect Snapshot Version Installation and User's Guide for Windows IBM

SAS Clinical Data Integration 2.6

Arcserve Backup for Windows

Oracle Utilities Smart Grid Gateway Adapter for Echelon

Oracle. SCM Cloud Configurator Modeling Guide. Release 13 (update 17D)

Installing and Administering a Satellite Environment

Juniper Secure Analytics

unisys Enterprise Database Server for ClearPath MCP Application Program Interfaces Programming Guide imagine it. done. ClearPath MCP 13.

Lenovo ThinkSystem NE Release Notes. For Lenovo Cloud Network Operating System 10.7

Configuring Cisco IP SLAs ICMP Jitter Operations

IBM Spectrum Protect HSM for Windows Version Administration Guide IBM

CA IDMS Using IDMS Enforcer

ExpressCluster X for Windows

WLAN Location Engine 2340 Using the Command Line Interface

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

HP Software Revision Controller/XL Technical Addendum

Configuring IP SLAs ICMP Path Jitter Operations

Communication Networks

HPE NonStop Remote Server Call (RSC/MP) Messages Manual

Z/TPF TCP/IP SOCK Driver 12/14/10. z/tpf TCP/IP SOCKET Driver Users Guide. Copyright IBM Corp. 2010

IBM Content Manager for iseries. Messages and Codes. Version 5.1 SC

Dell PowerVault DL Backup to Disk Appliance and. Storage Provisioning Option

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

Firewall Stateful Inspection of ICMP

UNIX Network Programming

Cisco IOS Optimized Edge Routing Command Reference

IBM Spectrum Protect for Databases Version Data Protection for Microsoft SQL Server Installation and User's Guide IBM

IBM Tivoli Storage FlashCopy Manager Version Installation and User's Guide for Windows IBM

Cisco TEO Adapter Guide for SAP Java

Tzunami Deployer AquaLogic Exporter Guide Supports extraction of Web Components on the server and guides migration to Microsoft SharePoint.

Oracle Communications Network Charging and Control. Session Control Agent Alarms Guide Release: NCC5.0.0

ipv6 hello-interval eigrp

Configuring Dynamic ARP Inspection

Management Software AT-S70. User s Guide. CONVERTEON Media Converter Products. Version Rev. B

Administrator s Guide. StorageX 8.0

IBM Client Security Solutions. Client Security Software Version 1.0 Administrator's Guide

Oracle Agile Product Lifecycle Management for Process Reporting User Guide Release E

CA ERwin Data Modeler

User Scripting April 14, 2018

CROSSREF Manual. Tools and Utilities Library

IP Addressing: Fragmentation and Reassembly Configuration Guide, Cisco IOS XE Release 3S (Cisco ASR 1000)

Veritas NetBackup for SQLite Administrator's Guide

HP 5120 SI Switch Series

Configuring RTP Header Compression

Veritas NetBackup OpenStorage Solutions Guide for Disk

HPE Security ArcSight Connectors

Lecture 11: IP routing, IP protocols

IP Addressing: IPv4 Addressing Configuration Guide, Cisco IOS Release 15S

Configuring Data Export for Flexible NetFlow with Flow Exporters

Configuring TCP Header Compression

Cisco TEO Adapter Guide for

Network Element Configuration

EXPRESSCLUSTER X SingleServerSafe 3.3 for Windows. Installation Guide. 01/29/2016 3rd Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

2/13/2014. A protocol is an agreed-upon convention that defines how communication occurs between two (or more?) endpoints

User's Guide. Intermec Gateway

NETWORK PROGRAMMING AND MANAGEMENT 1 KINGS DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK

IP Addressing: Fragmentation and Reassembly Configuration Guide

Veritas NetBackup Copilot for Oracle Configuration Guide. Release 2.7.2

Cisco TEO Adapter Guide for Microsoft Windows

Scan to Digitech v1.0

Sage Estimating (SQL) v17.13

Configuring IP SLAs ICMP Path Echo Operations

Introduction to Protocols

Transcription:

unisys ClearPath Enterprise Servers Communications Application Program Interface (COMAPI) User s Guide 8R2 September 2016 7851 5749 013

NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information described herein is only furnished pursuant and subject to the terms and conditions of a duly executed agreement to purchase or lease equipment or to license software. The only warranties made by Unisys, if any, with respect to the products described in this document are set forth in such agreement. Unisys cannot accept any financial or other responsibility that may be the result of your use of the information in this document or software material, including direct, special, or consequential damages. You should be very careful to ensure that the use of this information and/or software material complies with the laws, rules, and regulations of the jurisdictions with respect to which it is used. The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions. Notice to U.S. Government End Users: This software and any accompanying documentation are commercial items which have been developed entirely at private expense. They are delivered and licensed as commercial computer software and commercial computer software documentation within the meaning of the applicable acquisition regulations. Use, reproduction, or disclosure by the Government is subject to the terms of Unisys standard commercial license for the products, and where applicable, the restricted/limited rights provisions of the contract data rights clauses. Unisys and other Unisys product and service names mentioned herein, as well as their respective logos, are trademarks or registered trademarks of Unisys Corporation. All other trademarks referenced herein are the property of their respective owners.

Contents Section 1. An Overview of Communications Application Program Interface (COMAPI) 1.1. COMAPI Components... 1 2 1.1.1. Background Run... 1 3 1.2. Communication Protocols Supported...1 4 1.3. Key Features of COMAPI...1 4 1.3.1. Simple Procedure Calls...1 4 1.3.2. Improved Data Transfer Efficiency... 1 5 1.3.3. Conversational Mode Transactions... 1 5 1.3.4. Simple Configuration of Multiple Applications... 1 5 1.3.5. Features not Supported by COMAPI... 1 6 1.4. Relationship between COMAPI and Communication Services... 1 6 1.5. Relationship between COMAPI and Communications Interface for Transaction Applications (CITA)... 1 6 1.6. New Features in COMAPI Level 8R2... 1 7 1.6.1. COMAPI Operator Command Timestamps... 1 7 Section 2. Setting Up the COMAPI Components 2.1. COMAPI Release Tape... 2 2 2.2. Process Overview... 2 3 2.3. Generating COMAPI... 2 3 2.3.1. Updating the COMAPICALLER library module... 2 4 2.3.2. Specifying File Security... 2 5 2.4. Installing COMAPI... 2 6 2.4.1. Additional Installation Modes... 2 6 2.5. Setting Security Privileges for COMAPI... 2 7 2.5.1. Privileges Required for -COMAPI-... 2 8 2.6. Configuring the COMAPI... 2 8 2.6.1. COMAPI Configuration File or Element... 2 8 2.6.2. COMAPI Configuration Statements... 2 8 2.7. Configuring COMAPI in Communication Services... 2 13 2.7.1. CMS1100/CPComm Migration... 2 13 Section 3. Managing the Background Run 3.1. Starting the Background Run... 3 2 3.1.1. Network Administrator Privileges... 3 2 3.1.2. Starting the Background Run with a Processor Call... 3 3 7851 5749 013 iii

Contents 3.2. Terminating the Background Run Using a System E Keyin... 3 4 3.3. User Commands to the Background Run... 3 4 3.3.1. ABORT Command... 3 5 3.3.2. BRKPT Command... 3 5 3.3.3. DUMP Command... 3 6 3.3.4. ENTITY Command... 3 6 3.3.5. ERROR Command... 3 9 3.3.6. HELP Command... 3 10 3.3.7. LOG Command... 3 10 3.3.8. STATUS Command... 3 12 3.3.9. STATUS ACTIVITY Command... 3 14 3.3.10. STATUS IA Command... 3 15 3.3.11. STATUS MULTICAST Command... 3 16 3.3.12. STATUS PORTS Command... 3 17 3.3.13. STATUS RUNS Command... 3 18 3.3.14. STATUS SOCKETS Command... 3 19 3.3.15. TERM Command... 3 21 Section 4. Designing Your Application 4.1. Key Concepts...4 1 4.1.1. Communications Options for Transaction Applications... 4 2 4.1.2. Session Tables... 4 2 4.1.3. LRCT... 4 4 4.1.4. Blocking and Nonblocking Modes... 4 6 4.1.5. COMAPI Support for Programming Languages Other Than COBOL... 4 8 4.2. Setting the Correct Values for COBOL Parameters (Copy Element)... 4 9 4.2.1. Considerations for Acquiring and Releasing Queue Banks... 4 10 4.3. Using Special COMAPI Features... 4 12 4.3.1. Using a Proxy Listener for a Group of Session Tables... 4 12 4.3.2. Inheriting a Connection... 4 14 4.3.3. Application-to-Application Data Transfers... 4 14 4.3.4. Sessions Shared Among Activities... 4 15 4.3.5. Multicast Programming... 4 16 4.3.6. SSL/TLS Protocols Over TCP/IP... 4 21 4.4. Linking Your Program... 4 22 4.4.1. Calling COMAPI Directly... 4 22 4.4.2. Calling COMAPI Using the BSD/UNIX Socket Library... 4 22 4.4.3. Calling COMAPI Using the Call Router... 4 22 4.5. Handling Contingencies... 4 24 4.5.1. Handling Session Events... 4 25 4.5.2. Recovering from Errors... 4 26 4.5.3. Using DEBUG Mode... 4 27 iv 7851 5749 013

Contents Section 5. TCP Calls 5.1. TCP_ACCEPT Accepting Connect Requests... 5 4 5.2. TCP_BEQUEATH Passing Ownership of the Connection... 5 5 5.3. TCP_BORROWQB Acquiring a Queue Bank... 5 6 5.4. TCP_CHGSECURITY Changing Security of a Connection... 5 6 5.5. TCP_CLOSE Releasing a Session Table... 5 8 5.6. TCP_CONNECT Establishing a Connection with a Peer Application... 5 9 5.7. TCP_DEREGISTER Disconnecting from COMAPI... 5 11 5.8. TCP_DISCONNECT Terminating the Connection with the Peer... 5 12 5.9. TCP_EVENT Passing an Event to a Session Table... 5 13 5.10. TCP_GETCERT Getting the Certificate of a Connection... 5 13 5.11. TCP_GETHOSTNAME Getting Remote Peer Name... 5 14 5.12. TCP_GETOPTS Retrieving Options for a Session Table... 5 15 5.13. TCP_GETREMIP Getting IP Addresses for a Remote Peer... 5 16 5.14. TCP_INHERIT Accepting Ownership from another Activity or Run... 5 17 5.15. TCP_LISTEN Establishing a Listen for OPEN Requests... 5 18 5.16. TCP_QBRECEIVE Accepting the Data in a Queue Bank... 5 19 5.17. TCP_QBRECVALL Accepting All Outstanding Data and Events... 5 22 5.18. TCP_QBREPLY Sending the Data in a Queue Bank to a Connection Not Owned by this Application... 5 23 5.19. TCP_QBSEND Sending the Data in a Queue Bank... 5 24 5.20. TCP_RECEIVE Accepting Data from the Peer... 5 25 5.21. TCP_REGISTER Registering an Application for TCP Sessions... 5 28 5.22. TCP_REPLY Sending Data to a Connection Not Owned by This Application... 5 30 5.23. TCP_RESCIND Rescinding a Listen... 5 31 5.24. TCP_RESUME Resuming Input from the Peer Application... 5 31 5.25. TCP_RETURNQB Returning a Queue Bank... 5 32 5.26. TCP_SELECT Selecting the Status of Certain Sessions... 5 33 5.27. TCP_SEND Sending Data... 5 35 5.28. TCP_SESSION Acquiring a Session Table... 5 36 5.29. TCP_SETOPTS Setting Options for a Session Table... 5 37 5.30. TCP_STOP Stopping Input from the Peer Application... 5 43 7851 5749 013 v

Contents Section 6. UDP Calls 6.1. UDP_CLOSE Releasing a Session Table... 6 2 6.2. UDP_DEREGISTER Disconnecting from COMAPI... 6 3 6.3. UDP_EVENT--Passing an Event to a Session Table... 6 3 6.4. UDP_GETHOSTNAME Getting the Remote Peer Name... 6 4 6.5. UDP_GETMSGSIZE Finding the Maximum Message Size... 6 5 6.6. UDP_GETOPTS Retrieving Options for a Session Table... 6 6 6.7. UDP_GETREMIP Getting IP Addresses for the Remote Peer... 6 7 6.8. UDP_GETSOURCE Retrieving Filter Options for a Socket... 6 8 6.9. UDP_LISTEN Establishing a Listen on a Port... 6 9 6.10. UDP_PROBLEMS Notifying Communication Services about Problems Sending Data... 6 10 6.11. UDP_QBRECEIVE-Accepting the Data in a Queue Bank or a Chain of Queue Banks... 6 11 6.12. UDP_RECEIVE Accepting Data from the Peer... 6 13 6.13. UDP_REGISTER Registering an Application for UDP Sessions... 6 15 6.14. UDP_REPLY Sending a Reply to a Request for Information... 6 17 6.15. UDP_RESCIND Rescinding a Listen... 6 18 6.16. UDP_SELECT Selecting the Receive Status of Certain Sessions... 6 19 6.17. UDP_SENDTO Sending Data... 6 20 6.18. UDP_SESSION Acquiring a Session Table... 6 22 6.19. UDP_SETOPTS Setting Options for a Session Table... 6 22 6.20. UDP_SETSOURCE Setting Filter Options for a Socket... 6 27 Section 7. COBOL Program Examples 7.1. Example 1: Using UDP_REPLY to Respond to Input Data... 7 1 7.2. Example 2: Using TCP_REPLY to Respond to Input Data... 7 4 7.3. Example 3: Using TCP_INHERIT to Inherit a Connection... 7 7 Section 8. Diagnostics and Troubleshooting 8.1. Using the SSDA Processor... 8 1 8.1.1. Analyzing a Dump... 8 2 8.1.2. Creating a Snapshot Dump and Performing the Analysis... 8 2 8.2. Using the DUMP Program... 8 3 8.2.1. Dump Analysis Commands... 8 3 vi 7851 5749 013

Contents 8.3. Using the TCP/IP RFC SERVER... 8 4 8.3.1. Echo Capabilities (Port 7)... 8 4 8.3.2. Print Generation Capabilities (Port 19)... 8 4 8.3.3. SERVER Commands... 8 4 8.4. Reporting a Software Problem to Unisys... 8 6 8.5. Submitting Documentation Corrections and Comments to Unisys... 8 7 Section 9. BSD/UNIX Socket Library 9.1. Socket Identifier... 9 1 9.2. Error Returns... 9 2 9.3. Header Files... 9 2 9.4. of Network Addresses... 9 2 9.4.1. IPv4 address format... 9 3 9.4.2. IPv6 address format... 9 3 9.5. Initial Timeout Values... 9 3 9.6. Socket Function Calls Supported... 9 4 9.6.1. accept... 9 6 9.6.2. bind... 9 6 9.6.3. closesocket... 9 7 9.6.4. connect... 9 7 9.6.5. getaddrinfo... 9 8 9.6.6. gethostbyaddr... 9 9 9.6.7. gethostbyaddr_r... 9 9 9.6.8. gethostbyname... 9 11 9.6.9. gethostbyname_r... 9 11 9.6.10. gethostname... 9 12 9.6.11. getnameinfo... 9 12 9.6.12. getpeername... 9 14 9.6.13. getsockname... 9 14 9.6.14. getsockopt... 9 15 9.6.15. getsourcefilter... 9 16 9.6.16. inet_addr... 9 17 9.6.17. inet_ntoa... 9 17 9.6.18. inet_ntop... 9 17 9.6.19. inet_pton... 9 18 9.6.20. ioctlsocket... 9 19 9.6.21. listen... 9 19 9.6.22. recv... 9 20 9.6.23. recvfrom... 9 20 9.6.24. recvmsg... 9 21 9.6.25. selectsocket... 9 22 9.6.26. send... 9 23 9.6.27. sendmsg... 9 24 9.6.28. sendto... 9 24 9.6.29. SetSockLibDebug... 9 25 9.6.30. setsockopt... 9 26 9.6.31. setsourcefilter... 9 26 9.6.32. shutdown... 9 27 9.6.33. socket... 9 28 7851 5749 013 vii

Contents 9.6.34. socketpair... 9 28 9.6.35. WSAStartup... 9 29 9.6.36. WSACleanup... 9 30 9.6.37. WSAGetLastError and WSAGetLastErrorAux... 9 30 9.7. Queue Bank Calls... 9 30 9.7.1. qballoc... 9 31 9.7.2. qbfree... 9 31 9.7.3. qbrecv... 9 31 9.7.4. qbsend... 9 31 9.8. Data ting across Multiple Hardware Platforms... 9 32 9.8.1. htonl... 9 33 9.8.2. htons... 9 34 9.8.3. ntohl... 9 34 9.8.4. ntohs... 9 35 9.8.5. shtonl... 9 35 9.8.6. shtons... 9 36 9.8.7. sntohl... 9 36 9.8.8. sntohs... 9 37 9.9. Socket Function Calls to Support Unique COMAPI Functionality... 9 37 9.9.1. bequeathsocket... 9 38 9.9.2. inheritsocket... 9 38 9.9.3. tcp_event... 9 39 9.9.4. tcp_register... 9 39 9.9.5. udp_event... 9 39 9.9.6. udp_register... 9 40 9.10. Socket Function Calls Provided But Not Supported... 9 40 9.11. Linking Your Program... 9 41 Appendix A. COMAPI Status Codes Index... 1 viii 7851 5749 013

Figures 1 1. COMAPI Components... 1 3 5 1. TCP Socket State and Event Diagram... 5 3 7851 5749 013 ix

Figures x 7851 5749 013

Tables 2 1. COMAPI Release Tape... 2 2 2 2. Installation Modes... 2 6 3 1. Required Console Privileges... 3 4 4 1. LRCT Version 0 Attributes... 4 4 4 2. LRCT Version 1 Attributes... 4 5 4 3. Application Program Interface Definition Elements... 4 9 4 4. Session Table Values... 4 16 4 5. Multicast TTL... 4 17 4 6. Session Events... 4 25 5 1. TCP Calls... 5 1 5 2. The Effect of linger_on and linger_time... 5 8 5 3. General Session Table Options... 5 38 5 4. TCP OPEN Request Values... 5 42 6 1. UDP Calls... 6 1 6 2. UDP Options... 6 23 9 1. Socket Function Calls... 9 4 9 2. Queue Bank Calls... 9 30 9 3. Data ting Calls... 9 32 9 4. Socket Function Calls for Unique Functionality... 9 37 A 1. COMAPI Status Codes... A 2 A 2. COMAPI Typical Auxiliary Statuses for Communication Services Errors... A 8 7851 5749 013 xi

Tables xii 7851 5749 013

Section 1 An Overview of Communications Application Program Interface (COMAPI) Communications Application Program Interface (COMAPI) is a combined extended mode shared subsystem and background run that allows applications to access a communications network. Purpose of This Guide This guide provides task-oriented procedures and reference information for software engineers who need to develop applications that use the services of the COMAPI. Documentation Updates This document contains all the information that was available at the time of publication. Changes identified after release of this document are included in problem list entry (PLE) 19123006. To obtain a copy of the PLE, contact your Unisys representative or access the current PLE from the Unisys Product Support Web site: http://www.support.unisys.com/all/ple/19123006 Note: If you are not logged into the Product Support site, you will be asked to do so. Section Overview This section presents an overview of COMAPI components Communications protocols supported by COMAPI COMAPI key features The relationship of COMAPI to your Communication Services product, which is Communications Platform (CPComm) or the Communications Platform for Open Systems (CPCOMMOS) 7851 5749 013 1 1

An Overview of Communications Application Program Interface (COMAPI) The relationship of COMAPI to Communications Interface for Transaction Applications (CITA) New features in COMAPI 8R2 Notation Conventions This guide uses the following notation conventions. Convention Description lowercase italic constant width UPPERCASE Names of variables to which you must assign values appear in lowercase italics. Computer dialog, both input and output, appears in constant width type. Uppercase font indicates items for which you must choose one of the values shown. For example, given ON OFF, you must enter either ON or OFF. Uppercase font is also used for command and keyword formats. However, you can enter any of these items in either uppercase or lowercase fonts. [ ] Brackets indicate optional fields or subfields. { } Braces enclose two or more fields or subfields and indicate that you must select exactly one of the fields or subfields shown. A vertical line separates exact choices. For example, ON OFF indicates a choice of on or off; and HIGH MEDIUM LOW represents a choice of high, medium, or low. 1.1. COMAPI Components COMAPI provides a new environment and sockets-like interface for application programs. It can handle either Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) connections; and with Communications Interface for Transaction Applications (CITA), it can schedule Transaction Processing (TIP) using the Message Control Bank (MCB) (refer to Figure 1 1). COMAPI consists of two components: The COMAPI shared subsystem A background run that owns all connections to the network 1 2 7851 5749 013

An Overview of Communications Application Program Interface (COMAPI) 1.1.1. Background Run Figure 1 1. COMAPI Components The background run is integral to COMAPI functionality. It owns all connections to the network and works on behalf of your applications to access Communication Services. Multiple Activities from a Single Activity Application A primary benefit of the COMAPI background run is that it can perform multiple functions for a single activity program. For example, in the case of the TCP_CONNECT call, which establishes a connection between your application and a peer application, the background run synchronizes the send and receive function calls that would normally be required through Communication Services. Your application makes a single call, and the background run performs multiple tasks as a result of that call. 7851 5749 013 1 3

An Overview of Communications Application Program Interface (COMAPI) Output Flow Control Event Logging The background run also handles basic flow control of output and eliminates the need to pace outputs to match the speed of the network. This is accomplished by suspending your program activity when a network blockage occurs and restarting the activity when Communication Services accepts the current output. The background run creates and maintains a log file that contains entries describing unusual events. It also makes entries in the log file on behalf of your application when you request tracing of your connections. Refer to the description in 4.5.3 for more information on tracing. 1.2. Communication Protocols Supported COMAPI accesses communications networks through Communication Services. COMAPI supports the following communication protocols: Network Layer Services Internet Protocol (IP), a connectionless network protocol that moves data through multiple network nodes (defined by RFC 791 and RFC 1122) Internet Control Message Protocol (ICMP), a protocol within the Internet layer that enables error messages to be transported to upper layer protocols on behalf of lower-layer protocols (defined by RFC 792, RFC 1122, and RFC 1577) Transport Layer Services Transmission Control Protocol (TCP), a connection-oriented transport protocol (defined by RFC 793 and RFC 1122) User Datagram Protocol (UDP), a connectionless transport protocol (defined by RFC 768 and RFC 1122) 1.3. Key Features of COMAPI This subsection introduces the key interface features of COMAPI. 1.3.1. Simple Procedure Calls COMAPI provides a set of program-callable procedures that allow applications to access Communication Services. By providing application programmers with a set of basic commands such as LISTEN, CONNECT, SEND, RECEIVE, and DISCONNECT, COMAPI simplifies the task of accessing Communication Services. Application programs must be modified to make the new calls that interface with COMAPI. 1 4 7851 5749 013

An Overview of Communications Application Program Interface (COMAPI) 1.3.2. Improved Data Transfer Efficiency The interface of COMAPI offers improved data transfer efficiency by decreasing the number of hand-offs between different components in the transaction environment. Instead of using position identifiers (PID) to identify TIP end users, COMAPI passes a unique identifier, a socket ID, to the transaction. This socket ID is then used for all subsequent communication with the peer. Transactions using this feature do not use the MCB to send output. Instead a new, simple command calls upon the COMAPI subsystem to perform the output. This bypasses all of the Exec step control and the MCB path on output. Because COMAPI does not rely on the Exec or the MCB to pass data to a peer, path lengths for data output are greatly shortened. However, no data recovery is available unless the application itself provides recovery. Path lengths for both input and output can be drastically reduced when COMAPI uses Communication Services to access the network. If the Communication Services queue bank feature is called correctly, data is never moved for output and need not be moved on input. Instead, the applications merely pass pointers that specify where data is located. 1.3.3. Conversational Mode Transactions COMAPI provides a conversational mode for TCP/IP connections. Rather than sending just one request per session, transactions can now create conversational loops using the SEND and RECEIVE calls. This allows longer transaction times than were previously possible in CMS 1100. Moreover, the transaction environment is maintained during this conversation with no conscious effort on the part of the application programmer. Although Communication Services do provide a conversational mode, it is more complicated than the exchanges handled by COMAPI. Communication Services conversations require that a new transaction be started for each input of a conversation, which means that the previous transaction environment must be saved and then restored for each new input in the conversation. 1.3.4. Simple Configuration of Multiple Applications Multiple applications that normally must be configured individually in Communication Services using the PROCESS configuration statement can run through COMAPI with no configuration requirements in Communication Services. Once COMAPI is configured in Communication Services, it handles all interaction between your applications and the communications interface. 7851 5749 013 1 5

An Overview of Communications Application Program Interface (COMAPI) 1.3.5. Features not Supported by COMAPI COMAPI does not provide Demand mode traffic handling A COMPOOL interface An access list feature (although the user application might retrieve the peer IP address and port number to perform security checks in the application) 1.4. Relationship between COMAPI and Communication Services Communication Services represents either Communications Platform (CPComm) or Communications Platform for Open Systems (CPCommOS). With COMAPI configured to use OS 2200 services, you no longer need to configure applications individually in Communication Services. Instead, you now configure your applications to use COMAPI, which is itself configured in Communication Services, and the background run handles the send and receive loops. This eliminates the problem of running out of space for your programs in Communication Services. Regardless of the number of your applications that make use of COMAPI services, only COMAPI needs to be known to Communication Services. 1.5. Relationship between COMAPI and Communications Interface for Transaction Applications (CITA) CITA uses COMAPI to accept incoming data or connections and pass them to TIP applications using the MCB interface. CITA allows you to listen for incoming data using Communication Services. COMAPI 5R5 and earlier versions included a program named CAS that provided an interface between COMAPI and TIP. CAS is no longer provided with COMAPI. CITA includes the capability provided by CAS and more. Refer to the CITA Configuration and Operations Guide for more information, including how to configure CITA as a replacement for CAS. CITA allows the user to configure a header that defines the length of a message within the incoming byte stream. This feature replaces the functionality provided by RFC 1006, TP0, and TELNET/INT1 in CMS 1100 and Communications Platform/SILAS. If you do not use CITA, you need to develop an equivalent application if you wish to interface with the TIP environment. 1 6 7851 5749 013

An Overview of Communications Application Program Interface (COMAPI) 1.6. New Features in COMAPI Level 8R2 1.6.1. COMAPI Operator Command Timestamps This feature adds a timestamp to a prepended existing message that echoes the input command string and the siteid of the user issuing the command. This information is placed in the COMAPI run's PRINT$ file and in the COMAPI LOG file. Time stamping provides a useful debugging aid by helping analysts find the operator command output in a PRINT$ file based on the time the command was issued. 7851 5749 013 1 7

An Overview of Communications Application Program Interface (COMAPI) 1 8 7851 5749 013

Section 2 Setting Up the COMAPI Components This section explains how to perform the following tasks to set up the COMAPI components: Description Determine the files contained on the COMAPI release tape Determine the installation requirements and steps for setting up COMAPI software Subsection Reference 2.1 2.2 Generate COMAPI with COMUS 2.3 Install COMAPI with SOLAR 2.4 Set Security Privileges for COMAPI 2.5 Create a configuration file or element for the COMAPI subsystem and background run 2.6 Configure COMAPI in Communication Services 2.7 7851 5749 013 2 1

Setting Up the COMAPI Components 2.1. COMAPI Release Tape The COMAPI software release tape contains the files in Table 2 1 in COPY, G format. Table 2 1. COMAPI Release Tape File Name Description 1 CO$UTIL Contains the following elements: The background run s program execution absolute element COMAPI The shared subsystem absolute element COMAPIFGSS INS-MODES execution element UCS header elements The executable elements DUMP-TCP, DUMP-UDP, DUMP, and SERVER The COMAPI execution runstream - STCOMAPI The SOLAR installation elements 2 ADDA Elements specific to a mode A installation. The file is added to the install file, SYS$LIB$*COMAPI. 3 ADDB Elements specific to a mode B installation. The file is added to the install file, SYS$LIB$*COMAPI$B. 4 ADDC Elements specific to a mode C installation. The file is added to the install file, SYS$LIB$*COMAPI$C. 5 ADDD Elements specific to a mode D installation. The file is added to the install file, SYS$LIB$*COMAPI$D. 6 COMAPILIB The COMAPI library file that contains the element CBEP$COMAPI for mode A. 7 COMAPILIBB The COMAPI library file that contains the element CBEP$COMAPI for mode B. 8 COMAPILIBC The COMAPI library file that contains the element CBEP$COMAPI for mode C. 9 COMAPILIBD The COMAPI library file that contains the element CBEP$COMAPI for mode D. 10 TOOLS Contains the following for use with COMAPI mode A: The COMAPI CALLER library module MCB header elements: MCB/H, MCBDEFCOPY/H Example COBOL programs that use COMAPI 11 TOOLB Contains the same elements as the TOOLS file, for use with COMAPI mode B. 12 TOOLC Contains the same elements as the TOOLS file, for use with COMAPI mode C. 13 TOOLD Contains the same elements as the TOOLS file, for use with COMAPI mode D. 2 2 7851 5749 013

Setting Up the COMAPI Components Table 2 1. COMAPI Release Tape File Name Description 14 BASE The base symbolics file 15 PCF The permanent corrections file 16 RESULTS Compiled elements 2.2. Process Overview The following table lists the tasks involved in setting up the COMAPI software. It is recommended that you perform the steps in the order listed. However, note that some of the steps are optional. Step Task Required? Subsection Reference 1 Generate COMAPI with COMUS. Required only if you need to incorporate site-developed code or code corrections from Unisys. 2.3. 2 Install COMAPI with SOLAR. Always required 2.4. 3 Set security privileges Always required 2.5. 4 Create a configuration file or element for the COMAPI subsystem and background run. 5 Add a PROCESS statement to the CPCOMM configuration for COMAPI. Always required 2.6. Always required 2.7. 2.3. Generating COMAPI If you need to apply changes to COMAPI, you must generate the software with COMUS. These are the modifications you can make to COMAPI by generating it. Site-developed code: User-written software that supplements COMAPI or replaces part of it Unisys-supplied corrections: Code fixes to resolve problems with the COMAPI software The SO file and the build print file are written to the build output tape. If you want to retain the previous handling of the SO file and print file, you can use the COMUS CO$ADDSTATEMENTS SGS, entered as a permanent or an additional SGS in the COMAPI COMUS build. 7851 5749 013 2 3

Setting Up the COMAPI Components Example CO$ADDSTATEMENTS BEFORE-SAVE,ADDTHIS ADDTHIS "@COPY SO.,<your-file.>" CO$ADDSTATEMENTS BEFORE-SAVE,ADDTHIS ADDTHIS "@SYM,U COMAPI$PRT$.,,<print-queue>" To generate COMAPI with modifications, use the procedure described in the COMUS End Use Reference Manual. If you do not need to make any modifications, you can install COMAPI as you received it on the release tape. 2.3.1. Updating the COMAPICALLER library module If you intend to use the INS-MODES utility to install modes other than mode A and mode B, you can use the following additional SGS during the COMUS generation. (You also can enter this information with the INS-MODES utility when the additional modes are installed). This SGS creates an updated COMAPICALLER library module that can be used for call routing. See 4.4.3 for a description of call routing. The format of the SGS is MODES-BDIS letterbdi[,..., letterbdi] where: letter bdi designates an installation mode. It is a single letter from the set {C...Z}. is specified as 020xxxx, where xxxx is four octal digits, representing the application-level BDI of the COMAPI gate bank for the installation mode. Each subfield, consisting of a mode letter and bdi, must be entered together as a single string, without a space or comma between them. The subfields can appear in any order. Multiple SGSs can be given to specify all 24 possible BDIs (for modes C through Z). An example of this SGS is MODES-BDIS J0204702,Z0200310 2 4 7851 5749 013

Setting Up the COMAPI Components 2.3.2. Specifying File Security When the COMAPI runstream is started, and when the COMAPI program is running, certain files are cataloged. These files include the runstream print file, the log files, and the diagnostic and dump files. You can specify whether access to the files is public or private. Use the following additional SGS during the COMUS generation. (You also can make this choice with the INS-MODES utility when the additional modes are installed). The format of the SGS is FILESECURITY {PUBLIC PRIVATE} where: PUBLIC specifies that the P option is used on the @CAT,P statements, so that files are cataloged with public access. PRIVATE specifies that the P option is absent on the @CAT statements, so that files are cataloged with private access. An example of this SGS is FILESECURITY PUBLIC In the absence of this SGS, all files are cataloged PRIVATE. 7851 5749 013 2 5

Setting Up the COMAPI Components 2.4. Installing COMAPI You must use SOLAR to install COMAPI. COMAPI has four installation modes provided by Unisys: mode A, B, C, and D. During the installation process, SOLAR creates the following files on your system from the Unisys provided tape: Table 2 2. Installation Modes Mode A SYS$LIB$*COMAPI SYS$LIB$*COMAPI$LIB SYS$LIB$*RUN$.STCOMAPI SYS$LIB$*COMAPI$TOOLS Mode B SYS$LIB$*COMAPI$B SYS$LIB$*COMAPI$LIB$B SYS$LIB$*RUN$.STCOMAPI-B SYS$LIB$*COMAPITOOL$B Mode C SYS$LIB$*COMAPI$C SYS$LIB$*COMAPI$LIB$C SYS$LIB$*RUN$.STCOMAPI-C SYS$LIB$*COMAPITOOL$C Mode D SYS$LIB$*COMAPI$D SYS$LIB$*COMAPI$LIB$D SYS$LIB$*RUN$.STCOMAPI-D SYS$LIB$*COMAPITOOL$D Refer to the Software Products Installation Guide for more information about installing products with SOLAR. 2.4.1. Additional Installation Modes In addition to the Unisys supplied modes A through D, COMAPI allows you to install modes C through Z by using a utility called INS-MODES. INS-MODES streamlines the build and installation process, allowing you to make a copy of a COMAPI mode and install it as mode n, where n is a single letter C through Z. There is overlap for modes C and D to support users having their own BDIs for modes C and D from previous levels of COMAPI. @SYS$LIB$*COMAPI.INS-MODES[,P] The P option specifies that files cataloged by the COMAPI product have PUBLIC access. This is analogous to using the FILESECURITY PUBLIC SGS at COMUS generation time. If the P option is not specified, all files have PRIVATE access. 2 6 7851 5749 013

Setting Up the COMAPI Components Operation When you execute this command, INS-MODES queries for The name of the COMAPI file to be used as the source for the SOLAR installation. The COMAPI file must be the installed file SYS$LIB$COMAPI or SYS$LIB$COMAPI$B, or the first file from the COMAPI product tape. The letter of the mode (C through Z) you want to install for COMAPI. Each installation mode must be unique. For example, if mode G is already installed, and you specify G, the existing installed mode G is replaced by the new mode G. The user BDI for the COMAPI subsystem for the mode being installed. The mode letters and associated BDIs for all COMAPIs installed on your system. The format of the input is described when this prompt appears. This information is used to generate a customized COMAPICALLER call router library module. See 4.4.3 for use of the call router. INS-MODES makes a copy of the input file and modifies some elements, compiles and links these elements, and creates new installation files. INS-MODES then calls SOLAR and installs the new installation files. When the SOLAR installation finishes successfully, the following message appears: The SOLAR install of COMAPI was successful. If an installation error occurs, the following message appears: The SOLAR install of COMAPI has failed. Please check the file, DIAG.PL-DIAGINFO/datetime for a description of the error(s). INS-MODES creates the following files: SYS$LIB$*COMAPI$n. SYS$LIB$*COMAPI$LIB$n. SYS$LIB$*COMAPITOOL$n. SYS$LIB$*RUN$.STCOMAPI-n where n is an alpha character in the range C through Z, indicating the installation mode. 2.5. Setting Security Privileges for COMAPI This subsection describes the security requirements for COMAPI. You use Apex, the Site Management Complex (SIMAN), or Security Administration (either the command line processor SECMGR or the Security Client) to assign security privileges. Refer to the Software Products Installation Guide for detailed information about installing products with Object Module Subsystems. 7851 5749 013 2 7

Setting Up the COMAPI Components 2.5.1. Privileges Required for -COMAPI- The user-id that owns the COMAPI protected fixed-gate shared subsystem (-COMAPI-) must have the privileges listed for COMAPI in Appendix A of the Software Products Installation Guide. 2.6. Configuring the COMAPI 2.6.1. COMAPI Configuration File or Element The COMAPI configuration consists of system data format (SDF) ASCII images in a data file or symbolic element. You can create the configuration file or element with any text editor that creates SDF images, including most OS 2200 editors. See Section 3 for detailed information on suggested file names. The configuration must be supplied when starting COMAPI, refer to Section 3.1.2, Starting the Background Run with a Processor Call. COMAPI does not keep the configuration file assigned after it has started; consequently, the file might get rolled out by the next time COMAPI is restarted. You can prevent the file from being rolled out by cataloging the file with the V option, by modifying your file archiving rules, or by periodically assigning the file. 2.6.2. COMAPI Configuration Statements The configuration file can include any of the following statements. The configuration must include a CPCOMM statement. ADMIN Statement ADMIN [KEYIN,keyin-name] ; [MAX-TCP-BUFFERS,number] ; [MAX-UDP-BUFFERS,number] ; [MAX-TCP-SESSIONS,number] ; [MAX-UDP-SESSIONS,number] ; [MAX-TCP-USERS,number] ; [MAX-UDP-USERS,number] ; [VERIFY-TERM-COMMANDS,{YES NO}] KEYIN,keyin-name Keyin-name is registered with the EXEC using ER KEYIN$. The keyin-name can be up to 8 characters from the set {asterisk, alphabetic, numeric} and the first character cannot be numeric. Default: APIn, where n is an alpha character in the range A through Z, indicating the installation mode. If keyin-name is specified, both keyin-name and * run-id are registered with the EXEC. If keyin-name is the special keyword GENRUNID, only the run-id (without the preceding asterisk) is registered with the EXEC. If the keyin-name is not 2 8 7851 5749 013

Setting Up the COMAPI Components specified, both APIn and * run-id are registered with the EXEC. See Section 3 for a complete list of COMAPI user commands. MAX-TCP-BUFFERS,number This parameter determines the number of data buffers in the TCP pool that are available to use for data transfers between the application user and the background run. Because these buffers do not have a very long existence time, there is no need for many buffers. However, there might be a problem if many application programs are receiving data simultaneously and are slow to take this data from the queue. In this case, the application displays a status return of API- NO-BUFFERS on a TCP_RECEIVE call, and input data is lost. If this is a regular occurrence, there may be a need to restart COMAPI with more data buffers configured. Range: 10 1,000 Default: 200 MAX-UDP-BUFFERS,number This parameter determines the number of data buffers in the UDP pool that are used when data is transferred between the application and the background run. Because these buffers do not have a very long existence time, there is no need for many buffers. However, there might be a problem if many application programs are receiving data simultaneously and are slow to take this data from the queue. In this case, the application displays a status return of API-NO-BUFFERS on a SENDTO or RECEIVE call, and input data is lost. If this is a regular occurrence, there may be a need to restart COMAPI with more data buffers configured. Range: 10 1,000 Default: 200 MAX-TCP-SESSIONS,number This parameter restricts the number of TCP sessions in use to the configured value. If a CALL is made to TCP_SESSION and there are no more session tables available, a status of API-NO-BUFFERS is returned to the application program. Range: 10 200,000 Default: 50,000 MAX-UDP-SESSIONS,number This parameter restricts the number of UDP session tables in use to the assigned value. If the application makes a UDP_SESSION call and there are no session tables available, a status of API-NO-BUFFERS is returned to the application. Range: 10 200,000 Default: 10,000 7851 5749 013 2 9

Setting Up the COMAPI Components MAX-TCP-USERS,number This parameter restricts the number of activities using TCP sessions to the assigned value. If a CALL is made to TCP_REGISTER and there are no more activity identifiers available, a status of API-NO-BUFFERS is returned to the application program. Range: 10 32,000 Default: 1,000 MAX-UDP-USERS,number This parameter restricts the number of activities using UDP sessions to the assigned value. If a CALL is made to UDP_REGISTER and there are no more activity identifiers available, a status of API-NO-BUFFERS is returned to the application program. Range: 10 32,000 Default: 1,000 VERIFY-TERM-COMMANDS,{YES NO} Specifies whether commands that terminate COMAPI (ABORT, ERROR, and TERM) should be confirmed to prevent the accidental termination of COMAPI. If the value is YES, the operator or administrator must enter the termination command twice within 2 minutes. (A warning message is displayed after the first command.) If the value is NO, COMAPI terminates the first time the command is entered. Default: NO CPCOMM Statement CPCOMM,mode NAME,process-name PASSWORD,password Use this statement to configure COMAPI to attach to Communication Services. The mode parameter specifies the mode of Communication Services to which COMAPI should attach. The possible values are MODE-A, MODE-B, MODE-C, MODE-D, MODE-E, MODE-F, MODE-G, MODE-H. Note: The mode you configure must be installed on your system or a COMAPI error occurs. The process-name and password parameters must match the values on the PROCESS statement for the COMAPI process in the Communication Services configuration. 2 10 7851 5749 013

Setting Up the COMAPI Components ENTITY Statement The ENTITY statement configures COMAPI logging for a specific entity or set of entities. General logging is set to OFF. There are four formats for the ENTITY statement. You can have one ENTITY statement of each format in your configuration. You can change the configured ENTITY values at run time with the ENTITY user command. COMAPI makes a log entry only when the log entry information matches any of the entities specified on any of the four formats. Entity logging and general logging are mutually exclusive. If a LOG statement appears in the configuration, it must be LOG OFF. 1 ENTITY IA,[ip-address],[port-number] ; [IA,[ip-address],[port-number] ; IA,[ip-address],[port-number] ; IA,[ip-address],[port-number]] where: ENTITY IA limits the logging to specific sockets that use the specified address, domain-name, and/or port-number. You can specify a maximum of four IA entities on one ENTITY statement. At least one parameter must be specified. ip-address is IPv4 address, IPv6 address, or 0. If address is not specified, all addresses that match the port-number are used. port-number must be a number from 0 to 65535. If port-number is not specified, all port numbers that use the specified address are used. 2 ENTITY PROGRAM,program-name where: ENTITY PROGRAM limits the logging to a specific program. program-name is a maximum of 12 alphanumeric characters plus the hyphen (-) and the dollar sign ($). 7851 5749 013 2 11

Setting Up the COMAPI Components 3 ENTITY RUN,runid where: ENTITY RUN runid limits the logging to a specific runid. a maximum of six alphanumeric characters is valid. 4 ENTITY SOCKET,socket-id[,socket-id,socket-id,socket-id] where: ENTITY SOCKET limits the logging to a specific socket-id or a maximum of four socket-ids. socket-id LOG Statement is an octal (leading zero) or decimal number with a prefix of T for TCP or U for UDP. Socket-id can range from 1 to MAX_SESSIONS_TCP or MAX_SESSIONS_UDP. The value from the comapi-session parameter on any COMAPI API call can also be used. The LOG statement configures the COMAPI logging level. Use this statement with caution, because logging affects the performance of the system and COMAPI. Entity logging and general logging are mutually exclusive. If both an ENTITY and a LOG statement appear in the configuration, the LOG statement must be LOG OFF. LOG {OFF LOW MEDIUM HIGH} where: Value OFF LOW MEDIUM HIGH Description COMAPI logging is OFF. This is the default. Sets only general logging to ON. Sets general logging and API logging to ON. Sets general logging and API, RCV, and SEND logging to ON. 2 12 7851 5749 013

Setting Up the COMAPI Components Value Description General API RCV SEND Logs entries for all users, similar to debug logging for specific users as described in section 4.5.3, Using DEBUG Mode. Logs every user call entry and exit into COMAPI. Logs every receive into COMAPI from the communications products. Logs every send from COMAPI to the communications products. 2.7. Configuring COMAPI in Communication Services To use COMAPI with Communication Services, you must configure COMAPI as a process by including the following statement in the CPComm configuration: PROCESS,process-id PASSWORD,password ; INPUT-QUEUE-THRESHOLDS,50,1000,1000000 where process-id and password match the corresponding fields on the CPCOMM statement in the COMAPI configuration (see 2.6.2). Note that the INPUT-QUEUE- THRESHOLDS parameters are essential for effective flow control between COMAPI and Communication Services. Examples: COMAPI Configuration Statement CPCOMM,MODE-A NAME,COMAP1 PASSWORD,COMAP1 CPCOMM Configuration Statement PROCESS,COMAP1 PASSWORD,COMAP1 INPUT-QUEUE-THRESHOLDS,50,1000,1000000 2.7.1. CMS1100/CPComm Migration Extra install modes of CPComm (e.g., CMSA-CPCA) allow you to keep legacy application programs that call CMS1100, and route their calls to CPComm. COMAPI also contains legacy calls to CMS1100 as well as calls to CPComm, and allows COMAPI application programs to choose the CMS1100 or CPComm destination via the INTERFACE cell in the LRCT. If you still have a CMS1100 statement in your COMAPI configuration because you have installed one of the CMS1100/CPComm migration modes of CPComm and you also have a CPCOMM statement in your COMAPI configuration, the process names in the NAME fields of the two statements must be different. The reason is: If the CMS1100 migration routes API calls to the same CPComm named on the CPCOMM configuration statement, COMAPI cannot detect that CMS1100 calls and CPComm calls are arriving at the same CPComm. 7851 5749 013 2 13

Setting Up the COMAPI Components If the CMS1100 migration routes API calls to a different CPComm, no further consideration is necessary. If the CMS1100 migration routes API calls to the same CPComm, a situation may develop where unnecessary duplication of effort is made to establish connections, due to COMAPI s calls through both interfaces. You can use the CPComm migration feature to segregate access to networks driven by a single CPComm. In CPComm, configure the Process named on COMAPI s CPCOMM statement, and also configure the Process named on COMAPI s CMS1100 statement. The two Processes can then be restricted to separate networks by specifying the Process names on separate IP statements. See the Communications Platform Configuration and Operations Guide for details. 2 14 7851 5749 013

Section 3 Managing the Background Run The COMAPI background run, which is installed as part of the SOLAR installation of COMAPI, acts as an interface between the application user and the network. It uses Communication Services to access the network. This section explains how to manage the COMAPI background run by performing the following tasks: Task Command to the Background Run Subsection Start the background run 3.1 Terminate the background run with a system E keyin Terminate the background run immediately with a subsystem dump only Close the current COMAPI breakpointed print$ file and start a new one Create a snapshot dump of the COMAPI subsystem 3.2 ABORT 0 BRKPT 3.3.2 DUMP 3.3.3 Control Entity logging. ENTITY 3.3.4 Terminate the background run with diagnostics. Display description of COMAPI user commands. ERROR 3.3.5 HELP 3.3.6 Control COMAPI logging. LOG 3.3.7 Check the status of the background run. List all sockets owned by a given activity. List the sockets whose LRCTs match a supplied IPv4 or IPv6 address, domain-name, and/or port number. STATUS 3.3.8 STATUS ACTIVITY 3.3.9 STATUS IA 3.3.10 7851 5749 013 3 1

Managing the Background Run Task Command to the Background Run Subsection List multicast IPv4 or Ipv6 addresses that are listening or sockets that are listening on a specific address. List port numbers that are in use by COMAPI or sockets that are using a specific port. List runs that are registered with COMAPI or activities for a specific run. STATUS MULTICAST 3.3.11 STATUS PORTS 3.3.12 STATUS RUNS 3.3.13 List the status of a specific socket. STATUS SOCKETS 3.3.14 Terminate the background run without diagnostics. TERM 3.3.15 3.1. Starting the Background Run The COMAPI background run acts as an interface between your application programs and Communication Services. You can start the background run in two ways. From the operator's console with an ST keyin In demand mode or a batch runstream with a processor call To specify your own configuration file or element, you must use the processor call. 3.1.1. Network Administrator Privileges The COMAPI background run requires the following privileges: The account number must allow real-time execution. The user-id that starts the background run must have the SSCONSOLE privilege (also known as the ER KEYIN$ privilege), and the same privileges as the owner of the COMAPI protected fixed-gate subsystem as listed in Appendix A of the OS 2200 Software Products Installation Guide (7831 0612). Starting the Background Run with an ST Keyin To start the background run from the operator s console, enter the following keyin: For Mode A ST STCOMAPI 3 2 7851 5749 013

Managing the Background Run For Modes B through Z ST STCOMAPI-n where n is an alpha character B through Z, indicating a specific installation mode. These keyins execute the standard COMAPI start runstream, which assumes that your COMAPI configuration is in a data file named either COMAPI*CONFIG or COMAPI*CONFIG$n. See the COMAPI subsystem configuration and background run explanation in Section 2 for more information about configuring COMAPI. 3.1.2. Starting the Background Run with a Processor Call for Mode A If you want to start COMAPI with a configuration file or element other than COMAPI*CONFIG. or if you want to create your own start runstream, use the following processor call to start COMAPI in mode A: @SYS$LIB$*COMAPI.COMAPI,options configuration-file.[element] for Modes B through Z If you want to start COMAPI with a configuration file or element other than COMAPI*CONFIG. or if you want to create your own start runstream, use the following processor call to start COMAPI in mode n: @SYS$LIB$*COMAPI$n.COMAPI[,P] configuration-file.[element] where: n is an alpha character B through Z, indicating a specific installation mode. P option The P option specifies that files cataloged by the COMAPI product have PUBLIC access. This is analogous to using the FILESECURITY PUBLIC SGS at COMUS generation time. If the P option is not specified, all files have PRIVATE access. If you change the option on the COMAPI processor call line, ensure to make corresponding changes to the @CAT statements in the start runstream. 7851 5749 013 3 3

Managing the Background Run The following banner line is displayed for COMAPI: Communications Application Program Interface external-id build-id Mode mode Site site-id (execution creation date) today s date/time Example Communications Application Program Interface 8R2 COMAPI-GEN Mode A Site RS05 (150922 1343:45) Wed Sep 23 10:49:39 2015 3.2. Terminating the Background Run Using a System E Keyin Normally, you should use a COMAPI user command to terminate the background run (ABORT, ERROR, or TERM). If these fail, use a system E keyin to stop the run. Do not use the X keyin. Using the X keyin can cause part or all COMAPI functionality to be lost. 3.3. User Commands to the Background Run The following user commands help you to manage the background run. Precede each command with the keyin-name from the ADMIN configuration statement (see section 2.6.2). @@cons apia STATUS To use @@CONS, a demand user must be assigned suitable console privilege. The minimum privilege required varies by command and is shown in Table 3 1. 1 basic keyin mode 2 limited keyin mode 3 full keyin mode 4 display and keyin mode 5 response console mode Table 3 1. Required Console Privileges Command Name @@CONS Minimum Privilege ABORT 4 BRKPT 3 DUMP 3 ENTITY 3 3 4 7851 5749 013

Managing the Background Run Table 3 1. Required Console Privileges Command Name @@CONS Minimum Privilege ERROR 4 HELP 2 LOG 3 STATUS 2 STATUS ACTIVITY 3 STATUS IA 3 STATUS MULTICAST 3 STATUS PORTS 3 STATUS RUNS 3 STATUS SOCKET 3 TERM 4 Example @@cons comapib log close CCC102019: Log file closed COMAPI$B*COMAPI$LOG(6). CCC102020: Log file opened COMAPI$B*COMAPI$LOG(7). 3.3.1. ABORT Command The ABORT command writes the subsystem contents to a dump file, and then terminates the background run. No other information is saved, and COMAPI does not notify applications that the background run has terminated. The background run performs a DEACT of the COMAPI subsystem when it is restarted after an ABORT command. ABORT Example @@cons apia abort Response CCC102051: Panic dump saved in file COMAPI*COMAPI$DUMP(7). 3.3.2. BRKPT Command 7851 5749 013 3 5