OpenTP1 Version 7

Programming Reference COBOL Language

3000-3-D55-30(E)


Contents

Notices
Summary of amendments
Preface

1. Creating Application Programs
1.1 Coding application program
1.1.1 Relationship between UAPs and programs
1.1.2 Coding rules
1.2 Creating application programs (TCP/IP)
1.2.1 Procedure for creating application programs
1.2.2 Creating stubs
1.2.3 Creating stub source file
1.2.4 stbmake - Stub source file creation
1.2.5 Compiling and linking application program
1.3 Creating XATMI interface application programs (TCP/IP, OSI TP)
1.3.1 Procedure for creating XATMI-Interfaced application programs
1.3.2 Creating stubs for XATMI interface
1.3.3 Creating stub source files for XATMI interface
1.3.4 stbmake - Stub source file creation for XATMI interface
1.3.5 tpstbmk - XATMI-interfaced stub creation for OSI TP communication
1.4 Executing application programs
1.4.1 Starting and terminating application programs
1.4.2 Operating environment of application programs started by OpenTP1
1.4.3 Environment variables of application programs
1.4.4 Troubleshooting

2. Syntax of OpenTP1 Programs for COBOL-UAP Creation Programs
Format for explaining COBOL-UAP creation programs
Creating main and service programs
Create a main program (SUP, SPP, MHP)
Create a service program (SPP)
Create a service program (MHP)
System operation management (CBLDCADM)
CBLDCADM ('COMMAND ') - Execute an operation command
CBLDCADM ('COMPLETE') - Report the completion of user server start processing
CBLDCADM('STATUS ') - Report the status of a user server
Audit log output (CBLDCADT)
CBLDCADT('PRINT ') - Output audit log data
DAM file service (online facility: CBLDCDAM, offline facility: CBLDCDMB)
CBLDCDAM('CLOS') - Close a logical file
CBLDCDAM('END ') - Terminate using an unrecoverable DAM file
CBLDCDAM('HOLD') - Shut down a logical file
CBLDCDAM('OPEN') - Open a logical file
CBLDCDAM('READ') - Input a logical file block
CBLDCDAM('REWT') - Update a logical file block
CBLDCDAM('RLES') - Release a logical file from the shutdown state
CBLDCDAM('STAT') - Reference the status of a logical file
CBLDCDAM('STRT') - Start using an unrecoverable DAM file
CBLDCDAM('WRIT') - Output a logical file block
CBLDCDMB('BSEK') - Seek a physical file block
CBLDCDMB('CLOS') - Close a physical file
CBLDCDMB('CRAT') - Allocate a physical file
CBLDCDMB('DGET') - Input directly a physical file block
CBLDCDMB('DPUT') - Output directly a physical file block
CBLDCDMB('GET ') - Input a physical file block
CBLDCDMB('OPEN') - Open a physical file
CBLDCDMB('PUT ') - Output a physical file block
IST service (CBLDCIST)
CBLDCIST('CLOS') - Close an internode shared table
CBLDCIST('OPEN') - Open an internode shared table
CBLDCIST('READ') - Input an internode shared table record
CBLDCIST('WRIT') - Output an internode shared table record
User journal acquisition (CBLDCJNL)
CBLDCJNL('UJPUT ') - Acquire a user journal
Journal data editing (CBLDCJUP)
CBLDCJUP('CLOSERPT') - Close the jnlrput output file
CBLDCJUP('OPENRPT ') - Open the jnlrput output file
CBLDCJUP('RDGETRPT') - Input journal data of the jnlrput output file
Resource lock control (CBLDCLCK)
CBLDCLCK('GET ') - Enable locking of a resource
CBLDCLCK('RELALL ') - Release all resources from lock
CBLDCLCK('RELNAME ') - Release resource from lock specified by name
Message log output (CBLDCLOG)
CBLDCLOG('PRINT ') - Output message log
Message exchange (CBLDCMCF)
CBLDCMCF('ADLTAP ') - Delete an application timer start request
CBLDCMCF('APINFO ') - Report the application information
CBLDCMCF('CLOSE ') - Close the MCF environment
CBLDCMCF('COMMIT ') - Commit an MHP
CBLDCMCF('CONTEND ') - Terminate continuous-inquiry-response processing
CBLDCMCF('EXECAP ') - Activate an application program
CBLDCMCF('MAINLOOP') - Start an MHP service
CBLDCMCF('OPEN ') - Open the MCF environment
CBLDCMCF('RECEIVE ') - Receive a message
CBLDCMCF('RECVSYNC') - Receive a synchronous message
CBLDCMCF('REPLY ') - Send a response message
CBLDCMCF('RESEND ') - Resend a message
CBLDCMCF('ROLLBACK') - Enable MHP rollback
CBLDCMCF('SEND ') - Send a message
CBLDCMCF('SENDRECV') - Exchange a synchronous message
CBLDCMCF('SENDSYNC') - Send a synchronous message
CBLDCMCF('TACTCN ') - Establish connection
CBLDCMCF('TACTLE ') - Release a logical terminal from shutdown status
CBLDCMCF('TDCTCN ') - Release connection
CBLDCMCF('TDCTLE ') - Shut down a logical terminal
CBLDCMCF('TDLQLE ') - Delete a logical terminal's output queue
CBLDCMCF('TEMPGET ') - Accept temporarily-stored data
CBLDCMCF('TEMPPUT ') - Update temporarily-stored data
CBLDCMCF('TIMERCAN') - Cancel user timer monitoring
CBLDCMCF('TIMERSET') - Set user timer monitoring
CBLDCMCF('TLSCN ') - Acquire a connection status
CBLDCMCF('TLSCOM ') - Acquire status of MCF communication services
CBLDCMCF('TLSLE ') - Acquire a logical terminal status
CBLDCMCF('TLSLN ') - Acquire the acceptance status for a server-type connection establishment request
CBLDCMCF('TOFLN ') - Stop accepting server-type connection establishment requests
CBLDCMCF('TONLN ') - Start accepting server-type connection establishment requests
Performance verification trace (CBLDCPRF)
CBLDCPRF('PRFGETN ') - Report the sequential number for an acquired performance verification trace
CBLDCPRF('PRFPUT ') - Acquire user-specific performance verification traces
Remote API facilities (CBLDCRAP)
CBLDCRAP('CONNECT ') - Establish connection with a RAP-processing listener
CBLDCRAP('CONNECTX') - Establish connection with a RAP-processing listener
CBLDCRAP('DISCNCT ') - Release a connection with a RAP-processing listener
Remote procedure calls (CBLDCRPC, CBLDCRSV)
CBLDCRPC('CALL ') - Request a remote service
CBLDCRPC('CLOSE ') - Terminate an application program
CBLDCRPC('CLTSEND ') - Report data to CUP unidirectionally
CBLDCRPC('DISCARDF') - Reject the receiving of processing results
CBLDCRPC('DISCARDS') - Reject acceptance of specific processing results
CBLDCRPC('GETCLADR') - Acquire the node address of a client UAP
CBLDCRPC('GETERDES') - Acquire the descriptor of an asynchronous response-type RPC request which has encountered an error
CBLDCRPC('GETGWADR') - Acquire the node address of a gateway
CBLDCRPC('GETSVPRI') - Reference the schedule priority of a service request
CBLDCRPC('GETWATCH') - Reference the service response waiting interval
CBLDCRPC('OPEN ') - Start an application program
CBLDCRPC('POLLANYR') - Receive processing results in asynchronous mode
CBLDCRPC('SETSVPRI') - Set a schedule priority of a service request
CBLDCRPC('SETWATCH') - Update the service response waiting interval
CBLDCRPC('SVRETRY ') - Retry a service program
CBLDCRSV('MAINLOOP') - Start an SPP service
Real time statistical information service (CBLDCRTS)
CBLDCRTS('RTSPUT ') - Acquire real-time statistical information for arbitrary section
TAM file service (CBLDCTAM)
CBLDCTAM('ERS '/'ERSR'/'ZRS '/'ZRSR') - Delete a TAM table record
CBLDCTAM('FxxR'/'FxxU'/'VxxR'/'VxxU') - Input a TAM table record
CBLDCTAM('GST ') - Acquire TAM table status
CBLDCTAM('INFO') - Acquire TAM table information
CBLDCTAM('MFY '/'MFYS'/'STR '/'WFY '/'WFYS'/'YTR ') - Update/add a TAM table record
Transaction control (CBLDCTRN)
CBLDCTRN('BEGIN ') - Start a transaction
CBLDCTRN('C-COMMIT') - Enable commitment in chained mode
CBLDCTRN('C-ROLL ') - Enable rollback in chained mode
CBLDCTRN('INFO ') - Report the information about the current transaction
CBLDCTRN('U-COMMIT') - Enable commitment in unchained mode
CBLDCTRN('U-ROLL ') - Enable rollback in unchained mode
Online tester management (CBLDCUTO)
CBLDCUTO('T-STATUS') - Report the test status of a user server

3. Syntax of OpenTP1 Programs for COBOL-UAP Creation Programs (DML Interface)
Coding in data manipulation language
Data communication facility
RECEIVE - Receive a message
SEND - Send a message
Service facility
DISABLE - Terminate continuous-inquiry-response processing
RECEIVE - Accept temporarily-stored data
ROLLBACK - Enable MHP rollback
SEND - Activate an application program
SEND - Update temporarily-stored data
SEND - Execute an operation command
SEND - Acquire a user journal

4. X/Open-compliant Application Programming Interface
X/Open-compliant function
XATMI-interfaced application programming interface (TP~)
TPINTRO - COPY files for the XATMI interface
TPACALL - Send a service request
TPADVERTISE - Advertise a service name
TPCALL - Send a service request and synchronously await its reply
TPCANCEL - Cancel a communication handle for an outstanding reply
TPCONNECT - Establish a conversational service connection
TPDISCON - Terminate a conversational service connection abortively
TPGETRPLY - Get a reply from a previous service request
TPRECV - Receive a message in a conversational connection
TPRETURN - Return from a service routine
TPSEND - Send a message in a conversational connection
TPSVCSTART - Start a service routine
TPUNADVERTISE - Unadvertise a service name
TX-interfaced application programming interface (TX~)
TXINTRO - COBOL data structures
TXBEGIN - Begin a transaction
TXCLOSE - Close a set of resource managers
TXCOMMIT - Commit a global transaction
TXINFORM - Return global transaction information
TXOPEN - Open a set of resource managers
TXROLLBACK - Roll back a global transaction
TXSETCOMMITRET - Set commit_return characteristic
TXSETTIMEOUT - Set transaction_timeout characteristic
TXSETTRANCTL - Set transaction_control characteristic

5. Syntax of OpenTP1 COBOL-UAP Creation Programs (Association Status Notification)
Association operation (CBLDCXAT)
CBLDCXAT('CONNECT') - Establish an association
Format of received communication events

6. Coding Samples
6.1 Coding samples for client/server UAPs (SUP, SPP DAM access)
6.2 Coding samples for client/server UAPs (SPP TAM access)
6.3 Coding samples for message exchange UAPs (MHP)
6.4 Coding samples for X/Open-compliant UAPs
6.4.1 XATMI interface samples
6.4.2 TX interface sample

7. Reference for Application Activation
Function format of user exit routine that determines the inheriting timer-start message
Data format of MCF event that reports discarding of a timer-start message (ERREVT4)

Appendix
A. Using OpenTP1 Remote Procedure Calls and XATMI-interfaced API Functions in Combination
A.1 Modes of combined use
A.2 How to create stubs of application programs that use both OpenTP1 remote procedure calls and XATMI-interfaced API functions
A.3 Callable XATMI-interfaced API functions

Index