CONTENTS Title Page Copyright Page Information Map Information Table Preface Technical Changes and New Features 1 Overview of the ACMS Systems Interface 1.1 The ACMS Systems Interface 1.2 Systems Interface Services 1.3 Agent Programs 1.3.1 Calling Tasks 1.3.2 Using Streams 1.3.3 Using SI Identifiers 2 Common Features of the Systems Interface 2.1 Features Common to the SI Services 2.1.1 Service Call Specification 2.1.2 Parameter Notation 2.1.3 Return Status 2.1.4 Synchronous and Asynchronous Calling Formats 2.1.5 ACMS$SIGNAL and ACMS$WAIT Support Services 2.1.5.1 ACMS$SIGNAL 2.1.5.2 ACMS$WAIT 2.1.6 Single-Threaded and Multithreaded Agent Programs 2.1.7 Default Submitter Feature 2.1.8 Running an Agent Program 2.1.9 Debugging an Agent Program with ACMS$CHECK 2.2 Features Common to Languages that Call the Systems Interface 2.2.1 BLISS 2.2.2 C 2.2.3 FORTRAN 2.2.4 MACRO 2.2.5 Pascal 2.2.6 PL/I 2.2.7 Other Languages 3 Agent Programs that Coordinate Distributed Transactions 3.1 Starting a Distributed Transaction 3.2 Rolling Back a Distributed Transaction 3.3 Accessing Remote Data 3.4 Step Procedure in C that Acts as an Agent Program 4 Agent Program Initialization and Exchange I/O Services 4.1 Authorizing an Agent Program in ACMS 4.2 Signing a Task Submitter in to ACMS 4.3 Specifying the Type of I/O 4.4 Terminating Exchange I/O 4.5 Signing a Task Submitter Out of ACMS 4.6 ACMS$INIT_EXCHANGE_IO 4.7 ACMS$SIGN_IN 4.8 ACMS$SIGN_OUT 4.9 ACMS$TERM_EXCHANGE_IO 5 Submitter Services 5.1 Preparing to Call a Task 5.2 Calling a Task 5.2.1 Passing a Transaction ID (TID) 5.2.2 Supplying Workspaces to a Task 5.2.3 Supplying the Correct Number of Task Argument Workspaces 5.2.4 Accessing Task Workspaces 5.3 Canceling a Task 5.4 ACMS$CALL 5.5 ACMS$CANCEL_CALL 5.6 ACMS$GET_PROCEDURE_INFO 5.7 ACMS$START_CALL 5.8 ACMS$WAIT_FOR_CALL_END 6 Stream Services 6.1 Overview of Stream Services 6.2 ACMS$REPLY_TO_STREAM_IO 6.3 ACMS$WAIT_FOR_STREAM_IO 7 Sample Agent Programs 7.1 C Agent Program that Starts a Distributed Transaction 7.2 FORTRAN General-Purpose Agent Program 7.3 C Agent Program that Performs Stream I/O or No I/O 7.4 BLISS Agent Program that Uses Superseded Services 7.5 Pascal Agent Program that Uses ACMS$WAIT A Superseded Services and Parameters A.1 ACMS$CLOSE_RR A.2 ACMS$CONNECT_STREAM A.3 ACMS$CREATE_STREAM A.4 ACMS$DELETE_STREAM A.5 ACMS$DISCONNECT_STREAM A.6 ACMS$OPEN_RR A.7 Superseded Parameters of the Task I/O Argument A.7.1 Argument List for a Task That Performs Request I/O A.7.2 Argument List for a Task That Passes Only Stream I/O A.7.3 Argument List with Selection String, Extended Status, and Terminal I/O Defined EXAMPLES 3-1 A Specialized User-Written Agent 3-2 Task Definition that Calls a Procedure Used as an Agent 3-3 Task Definition that Calls a Procedure to Update Remote Data 3-4 Step Procedure in C that Acts as an Agent Program 7-1 C Agent Program that Starts a Distributed Transaction 7-2 FORTRAN General-Purpose Agent Program 7-3 C Agent Program that Performs Stream I/O or No I/O 7-4 BLISS Agent Program that Uses Superseded Services 7-5 Pascal Agent Program that Uses ACMS$WAIT FIGURES 1-1 Agent Programs Submitting Tasks to ACMS 1-2 Stream Connection 3-1 Using a Step Procedure as an Agent Program 4-1 Signing a Task Submitter in to ACMS 5-1 Calling a Task in ACMS 5-2 Arguments Passed for a Task Using a Full Task Argument List 5-3 Arguments Passed for a Task Doing No I/O 6-1 Using Stream Services to Communicate with ACMS A-1 Arguments Passed for a Task Doing Request I/O A-2 Arguments Passed for a Task Doing Stream I/O A-3 Arguments Passed for a Task Doing Terminal I/O TABLES 1-1 Systems Interface Services 2-1 Procedure Parameter Notation 3-1 System Services Used in Distributed Transactions 4-1 SI Initialization Services 4-2 SI Exchange I/O Services 5-1 Submitter Services 6-1 SI Stream Services A-1 Superseded Services