Professional Documents
Culture Documents
OS 2200 Distributed Data Processing (DDP-PPC) OSI Interface COBOL
OS 2200 Distributed Data Processing (DDP-PPC) OSI Interface COBOL
()+ OS 2200
Distributed Data
Processing (DDP-PPC)
OSI Interface COBOL
Programming
Guide
(
Copyright 1997 Unisys Corporation.
All rights reserved.
Unisys is a registered trademark of Unisys Corporation.
Printed in U S America
Priced Item 3787 3296-200
The names, places, and/or events used in this publication are not intended to correspond to any
individual, group, or association existing, living, or otherwise. Any similarity or likeness of the names,
places, and/or events with the names of any individual, living or otherwise, or that of any group or
association is purely coincidental and unintentional.
NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THE DOCUMENT. Any product and related
material disclosed herein are only furnished pursuant and subject to the terms and conditions of a duly
executed Program Product License or Agreement to purchase or lease equipment. The only warranties
made by Unisys, if any, with respect to the products described in this document are set forth in such
License or 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, indirect, 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.
RESTRICTED - Use, reproduction, or disclosure is subject to the restrictions set forth in DFARS
252.227-7013 and 252.11-15/FAR 52.227-14 and 52.227-19 for commercial computer software.
Correspondence regarding this publication should be forwarded to Unisys Corporation either by using
the Business Reply Mail form included with this document, or by addressing remarks to Unisys
Corporation, Tredyffrin/Malvern Product Information, Malvern Development Center, P.O. Box 203, Paoli,
PA, 19301, U.S.A. Comments about documentation can also be sent through e-mail to
aspgpi@unisys.com
All terms mentioned in this document that are known to be trademarks or service marks have been
appropriately capitalized. Unisys Corporation cannot attest to the accuracy of this information. Use of a
term in this document should not be regarded as affecting the validity of any trademark or service mark.
Contents
Section 1. Introduction
iv 3787 3296-200
Contents
3787 3296-200 v
Contents
vi 3787 3296-200
Contents
Glossary
Bibliography
3787 3296-200 ix
Figures
3787 3296-200 xi
Tables
2-1. OSI Functions and Their Associated DDP-PPC COBOL Function Calls : : : : 2-3
2-2. DDP-PPC COBOL Function Calls and Their Associated Data Packets : : : : 2-4
This guide is one of a series designed to instruct and guide you in using Unisys Distributed
Data Processing Program-to-Program Communications (DDP-PPC) in an Open Systems
Interconnection (OSI) network. The DDP-PPC OSI interface lets users write
program-to-program COBOL application programs in a network that adheres to OSI
standards. ASCII or Universal Compiling System (UCS) COBOL program-to-program
applications can exchange data in batch, demand, or transaction processing (TIP)
environments with similar programs in the same or in remote systems in an OSI network.
Purpose
The purpose of this guide is to instruct an applications programmer how to:
Scope
This guide provides detailed information on DDP-PPC/OSI COBOL function calls and data
packets. It describes how to organize the calls and packets so users can write customized
COBOL applications that can exchange data between programs in the same or on remote
nodes of a multihost OSI network.
3787 3296-200 xv
About This Guide
Audience
This person is typically a COBOL programmer with several years of experience in the
language. He or she must have a thorough background in communications, as well as a
working knowledge of the session service definition.
If this person will be writing applications using the application-layer service entry, rather
than the session-layer service entry, then he or she must also have a working knowledge of
the presentation service definition and the Association Control Service Element (ACSE)
service definition. This person must also be able to encode user data as defined by the
presentation protocol specification and user information as defined by the ACSE protocol
specification using the Basic Encoding Rules for Abstract Syntax Notation One (ASN.1).
Prerequisites
To understand this guide, you must know the COBOL programming language as well as the
open systems interconnection services and protocol as described in the International
Standards Organization (ISO) documents listed in the Bibliography.
Organization
Section 1. Introduction
Explains open systems interconnection and how DDP-PPC supports an OSI interface.
Describes what you can do with a DDP-PPC/OSI COBOL application. Gives an overview of
how to write a DDP-PPC COBOL program for the OSI interface. Discusses interaction with
communications elements.
Describes, in alphabetical order, each of the DDP-PPC/OSI COBOL function calls and its
associated data packets.
Discusses how to design and construct OSI application programs that can transfer data
between programs in the same or remote hosts in an OSI environment using COBOL
function calls. Also describes how to schedule batch runs and TIP transactions to run
automatically.
Describes the executive control language (ECL) runstream to compile, collect (map), and
execute the DDP-PPC/OSI COBOL programs.
Contains the data packets and values to be copied into the working-storage section of the
application program.
Shows the relationship between the DDP-PPC/OSI functions and the OSI services invoked.
$ Changes to the considerations and limitations for D-Bank address ranges and
multi-activity programs.
$ A new parameter in the OSI-ADDRESS-PKT that can be used for the OSI$OPEN
function.
International standards for open system networking are based on the OSI reference model,
a conceptual model for a communications network developed by the International
Standards Organization (ISO).
This model represents each system in a network as a logical series of seven functional
layers (see Figure 1-1). Each layer interfaces with the layer below and the layer above.
Application
Presentation
Session
Transport
Network
Data Link
Physical
Each logical layer represents a single service performed by the system. Because different
systems perform these services in different ways, these logical layers may or may not
correspond to physical components of the system. A hardware or software entity can
overlap layers or include more than one layer by performing more than one service.
Hardware or software components that perform comparable services within a single layer
of the model but on different systems in the network are called peer entities. A set of rules
for communication between peer entities is called a peer protocol. The peer protocols for
each layer are independent of the protocols of any other layer.
According to the model, when different systems in an OSI network agree on the peer
protocols, peer entities across the network can exchange information, regardless of the
internal functioning of each system. That is, application programs on one system can
exchange messages with application programs on any system in the network regardless of
system architecture.
7
Application
6
DDP-PPC Presentation
5
Session
4
Transport
3
Transport Network
Services 2
Data Link
1
Physical
In an OS 2200 system, DDP-PPC performs the application, presentation, and session layer
processes (Figure 1-3) as follows:
$ The application layer provides the means to establish an association between itself and
another application program for the purpose of exchanging information.
$ The presentation layer provides translation or interpretation of data formats.
$ The session layer coordinates the exchange of information between the end-user
applications.
Host A Host B
DDP-PPC
Host LAN
Transport CMS 1100 Connection
Services
TELCON
3787 3296
F01_03
When you use DDP-PPC/OSI applications in a network with only OS 2200 or U Series, you
can use one of three kinds of transport:
When you use DDP-PPC/OSI applications in a network with foreign hosts, you normally
use the OSI transport protocols but, depending on the foreign system, may also be able to
use TCP/IP transport protocols. The software that provides OSI Transport Layer Services
is located in CMS 1100 or in the DCP. Depending on your configuration, you may use either
of these transport service providers or, in some cases, both.
If you want to use DDP-PPC/OSI with a foreign vendor using TCP/IP Transport Services,
that vendor must have implemented RFC 1006, which allows OSI Transport Layer Services
to be mapped onto TCP/IP.
The function call is the same for both interfaces. Specify a parameter
(OSI-SERVICE-ENTRY) at connection establishment to determine the interface for the
remainder of the connection.
When you select the application layer entry, DDP-PPC provides the OSI ACSE and
presentation layer services. These consist of:
However, when you specify the application level entry, the application program may still
have to perform some of the following presentation layer functionality, depending on
which user data type is used:
$ Encode the user data with the correct transfer syntax before requesting any
DDP-PPC/OSI services. This involves coding the data according to the rules of the
selected transfer syntax. DDP-PPC expects the data to be encoded correctly as it has
no way of verifying the encoding. The application program should use the presentation
context list, negotiated during connection establishment, when encoding the data.
$ Decode any user data received in a message from DDP-PPC and return the appropriate
presentation layer error messages if it encounters errors during the decoding.
Computer A Computer B
COBOL
Program
A
Data
COBOL COBOL
Program Data Program
B C
This section discusses procedures for writing DDP-PPC/OSI COBOL programs. The
following topics are discussed:
Data packets consist of control information and data needed for program-to-program
communications.
where:
function
Is the name of the DDP-PPC function the application program requested (see
Table 2-1).
USING
Is the clause that references data packets in the working-storage section.
param
Is the name of the data packet storage area in the working-storage section.
Parameters in the USING list are positional. Code them in the order in which they are
shown in each function call described in this section. Failure to do so causes
unpredictable results when the program is executed.
After processing a function call, DDP-PPC returns a general status code, a detailed status
code, and, possibly, a specific error code. The DDP-PPC/DDP-FJT Messages Reference
Manual explains these codes.
Table 2-1. OSI Functions and Their Associated DDP-PPC COBOL Function Calls
Table 2-2. DDP-PPC COBOL Function Calls and Their Associated Data Packets
OSI$ABORT OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-APPL-PRES-PKT
OSI$ACTMGT OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-ACTIVITY-PKT
OSI$BIND OSI-STATUS-PKT
OSI-REGISTER-PKT
OSI$CLOSE OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$CLRESP OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$CPDATA OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$CPRESP OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$DUMP OSI-STATUS-PKT
OSI$GVCNTRL OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$GVTOKEN OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
continued
Table 2-2. DDP-PPC COBOL Function Calls and Their Associated Data Packets (cont.)
OSI$OPEN OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-CONNECT-PKT
OSI-APPL-PRES-PKT
OSI-ADDRESS-PKT
OSI$OPRESP OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-CONNECT-PKT
OSI-APPL-PRES-PKT
OSI-ADDRESS-PKT
OSI$PLTOKEN OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$RECEIVE OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-CONNECT-PKT
OSI$RESYNC OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-RESYNC-PKT
OSI$SEND OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$SYNC OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI-SYNC-PKT
OSI$TPDATA OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
OSI$UNBIND OSI-STATUS-PKT
OSI$XRPT OSI-STATUS-PKT
OSI-MSG-BUFFER
OSI-DATA-PKT
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY OSI-PKTS.
produces
01 OSI-STATUS-PKT.
.
.
01 OSI-REGISTER-PKT.
.
.
01 OSI-CONNECT-PKT.
.
.
01 OSI-APPL-PRES-PKT.
.
.
01 OSI-ADDRESS-PKT.
.
.
01 OSI-DATA-PKT.
.
.
01 OSI-RCV-PKT.
.
.
01 OSI-ACTIVITY-PKT.
.
.
01 OSI-SYNC-PKT.
.
.
01 OSI-RESYNC-PKT.
.
.
This area does not have to have a specific name, since it is passed as a parameter on all the
function calls or macros that require it. In fact, you can define different areas for different
types of functions such as INPUT-MESSAGE-BUFFER for the OSI$RECEIVE function,
OUTPUT-MESSAGE-BUFFER for the OSI$SEND function, and ERROR-BUFFER for the
OSI$ABORT function.
Example:
01 OSI-MSG-BUFFER PIC X(1024).
For example, the OSI$OPEN function (using session version 1) is the most susceptible to
this type of error because of the 512-byte size limitation and the large amount of protocol
header information it generates to open a connection.
The normal and typed data session services (using session version 2) allow for the transfer
of messages of unlimited size. Since DDP-PPC limits the user program message size for
each function to 13000 bytes, it supports unlimited-size messages by using OSI session and
transport layer segmentation and treating the data passed on each function call as a
segment of the larger message.
You can send segmented messages on the OSI$SEND and OSI$TPDATA functions by
setting the OSI-UNIT-INDICATOR parameter in OSI-DATA-PKT to 0, OSI-MSG-INCOMPL.
This tells DDP-PPC to treat the data passed on this function as a segment of a larger
message. DDP-PPC will treat data from subsequent OSI$SEND or OSI$TPDATA functions
in the same manner until one of the functions sets the OSI-UNIT-INDICATOR to 1,
OSI-MSG-COMPL, which signifies the end of the large message.
DDP-PPC also uses the unit-indicator on the OSI$RECEIVE function to indicate that the
data given to the user program is part of a larger message. It returns a value of
OSI-MSG-INCOMPL on subsequent OSI$RECEIVE functions, until it receives an
end-of-message indication from the transport layer services.
To prevent data loss, the receiving program should be prepared to receive messages as
large as 13000 bytes if segmentation can be used on the connection, even if the peer
program has always sent smaller segments. This is necessary because the OSI protocol
does not provide a way to reconstruct the segments on the receiving side the same as they
were constructed on the sending side. Consequently, DDP-PPC may receive a message as
large as 13000 bytes from the lower layers.
producing
CALL 'OSI$RECEIVE' USING OSI-STATUS-PKT OSI-MSG-BUFFER OSI-DATA-PKT
OSI-CONNECT-PKT OSI-APPL-PRES-PKT OSI-ADDRESS-PKT
OSI-RCV-PKT OSI-SYNC-PKT OSI-ACTIVITY-PKT OSI-RESYNC-PKT.
This section provides detailed information on setting data packets and issuing function
calls. It describes the DDP-PPC/OSI COBOL program-to-program function calls and their
associated COPY verbs. The function calls appear alphabetically in this section. For each
function call, this section:
An abort can cause messages that were previously sent but not received to be discarded.
or
CALL 'OSI$ABORT' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-APPL-PRES-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$ABORT request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an abort permits you to send a message along with the
abort request. OSI-MSG-BUFFER is the default name. You can specify your own name in
the working-storage section for this area, but because the USING clause contains
positional parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.1.2. OSI-STATUS-PKT
Appendix A contains the status packet. The OSI$ABORT function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol
you are using. This value must be 1538 for this release. This
value is set automatically if you use the COPY verb format. If
you use the function call format, you must set this value using a
standard COBOL statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the user-information
parameter of the ABRT-apdu in ISO 8650 - Open Systems Interconnection - Protocol
specification for the Association Control Service Element. It should be encoded
according to ISO 8825 - Specification of Basic Encoding Rules for Abstract Syntax
Notation One (ASN.1).
The following diagram shows what part of the user-information parameter DDP-PPC
encodes and what part the user program must encode for data types 134, 135, 138, and 139:
encoded by user-
DDP-PPC information [30] length
EXTERNAL length
3.1.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT- TYPE 134 DDP-PPC does not reformat the user data. The user TYPE
must encode the ASN.1 EXTERNAL type as part of user data.
v OSI-PAD- TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes.
This is called padding the data and is necessary to send nine-bit
bytes over communication networks that only support eight-bit
bytes. The user must encode the ASN.1 EXTERNAL type as
part of user data.
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes,
and also compresses the data. If it cannot perform
compression, it treats the data type as a 138 type. The user
must encode the ASN.1 EXTERNAL type as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-OCTET- STRING 141 DDP-PPC encodes user data as an octet string using
ASN.1 Basic Encoding Rules, and also compresses the data. If
it cannot perform compression, it treats the data type as a 140
type. This data type does not require any additional protocol to
be encoded as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the first
byte of the buffer is to be used. DDP-PPC ignores this
parameter if the OSI-TEXT-LENGTH parameter is 0.
3.1.5. OSI-APPL-PRES-PKT
Parameter Description
OSI-PRES-CONTEXT-TABLE
v OSI-ABSTRACT-SYNTAX- ALIAS The alias for the abstract syntax used to describe the
user SYNTAX-ALIAS data for this connection. It is paired
with its corresponding presentation context identifier.
v OSI-TRANSFER-SYNTAX- ALIAS The alias for the transfer syntax used to encode the user
SYNTAX-ALIAS data for the presentation context
identified by OSI-PRES-CONTEXT-IDENT.
Note: Although you can include the ACSE context in this list, it is not necessary
because DDP-PPC automatically includes it.
Call DDP-PPC.
Call DDP-PPC
continued
continued
Data can be passed with this function only when the activity management subfunction
(OSI-ACT-MGT-FUNC, ACTIVITY packet) is one of the following:
or
CALL 'OSI$ACTMGT' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-ACTIVITY-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$ACTMGT request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an activity request permits you to send a message along
with the request. OSI-MSG-BUFFER is the default name. You can specify your own name
in the working-storage section for this area, but because the USING clause contains
positional parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.The OSI-ACTIVITY-PKT parameter
references the activity packet to select the activity function to be performed.
3.2.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$ACTMGT function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you are
using. This value must be 1538 for this release. This value is set
automatically if you use the COPY verb format. If you use the function
call format, you must set this value using a standard COBOL
statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the SS-user data parameter of
the session layer activity management service requests. It should be encoded according to
the rules specified in ISO 8823 Connection oriented presentation protocol specification
for encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.2.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The
user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. This parameter is
ignored if OSI-TEXT-LENGTH is 0.
continued
Parameter Description
OSI-SYNC-POINT-SERIAL- NUMBER Must be supplied only for the activity resume subfunction
(OSI-ACT-MGT-FUNC = 1, OSI-ACT-RES). Set it to the
synchronization point serial number where you want the
activity to be resumed; the number is passed to the peer
program.
3.2.5. OSI-ACTIVITY-PKT
Parameter Description
continued
Parameter Description
OSI-ACT-MGT-FUNC (cont.)
continued
Parameter Description
OSI-ACT-MGT-FUNC (cont.)
continued
Parameter Description
OSI-ACT-MGT-FUNC (cont.)
continued
Parameter Description
OSI-ACT-MGT-FUNC (cont.)
continued
Parameter Description
OSI-ACT-DEMAND-DATA- TOKEN 128 The user program demands the data token.
continued
Parameter Description
OSI-ACT-SESSION- CONNECTION-ID This parameter contains user-defined fields that can help
determine the connection on which the activity being
resumed was originally started.
DDP-PPC only uses this parameter for the activity resume
subfunction (OSI-ACT-MGT-FUNC = 1, OSI-ACT-RES).
v OLD-SCI-CALLING-REF ISO 8326 suggests that these four fields match the
corresponding parameters passed on the open request
v OLD-SCI-CALLED-REF for the connection. However, this is not required and
v OLD-SCI-COMMON-REF DDP-PPC passes their contents without validation against
previous information.
v OLD-SCI-ADD-REF
Call DDP-PPC.
13. Put the message in the output buffer. MOVE ACTMGT-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
You must issue this call before issuing any other DDP-PPC calls. When you receive a
user-id from DDP-PPC, you must use it on all subsequent calls to DDP-PPC.
or
CALL 'OSI$BIND' USING OSI-STATUS-PKT OSI-REGISTER-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas in your
working-storage section for the release version, user-id, and status codes. On completion
of the function, DDP-PPC returns a user-id in the status packet. Your program must then
supply the user-id on all subsequent calls to DDP-PPC. DDP-PPC also returns general and
detailed status codes that you should check after completion of each function call.
The OSI-REGISTER-PKT parameter references the information packet in which you insert
the name of this program before issuing the call.
3.3.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$BIND function call uses the following status
packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you are
using. This value must be 1538 for this release. This value is set
automatically if you use the COPY verb format. If you use the function call
format, you must set this value using a standard COBOL statement.
OSI-USER-ID An identifier for this application program. This value must remain
unchanged as long as this application program is signed on to DDP-PPC.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
3.3.3. OSI-REGISTER-PKT
Parameter Description
Call DDP-PPC.
Call DDP-PPC.
The following chart indicates the relationship of token availability and the functional units
selected during conversation establishment.
OSI-DATA-TOKEN FUNC-UNIT-HALF-DUPLEX
OSI-SYNC-MINOR-TOKEN FUNC-UNIT-MINOR-SYNC
OSI-ACT-MAJOR-TOKEN FUNC-UNIT-ACT-MGT
or
CALL 'OSI$CLOSE' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$CLOSE request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a close permits you to send a message along with the
close request. OSI-MSG-BUFFER is the default name. You can specify your own name in
the working-storage section for this area, but because the USING clause contains
positional parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.4.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$CLOSE function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the user-information
parameter of the RLRQ-apdu in ISO 8650 Protocol specification for the Association
Control Service Element. It should be encoded according to ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the user-information parameter DDP-PPC
encodes and what part the user program must encode for data types 134, 135, 138, and 139:
encoded by user-
DDP-PPC information [30] length
EXTERNAL length
3.4.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the ASN.1 EXTERNAL type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes. This
is called padding the data and is necessary to send nine-bit bytes
over communication networks that only support eight-bit bytes. The
user must encode the ASN.1 EXTERNAL type as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
ASN.1 EXTERNAL type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
Call DDP-PPC.
10. Put the message in the output buffer. MOVE CLOSE-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$CLRESP' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$CLRESP request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a OSI$CLRESP function call permits you to send a
message along with the close response request. OSI-MSG-BUFFER is the default name.
You can specify your own name in the working-storage section for this area, but because
the USING clause contains positional parameters, the name you specify must be the
second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.5.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$CLRESP function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the user-information
parameter of the RLRE-apdu in the ISO 8650 Protocol specification for the Association
Control Service Element. It should be encoded according to ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the user-information parameter DDP-PPC
encodes and what part the user program must encode for data types 134, 135, 138, and 139:
encoded by user-
DDP-PPC information [30] length
EXTERNAL length
Legend
[] Context-specific class tags
EXTERNAL
OBJECT-IDENTIFIER
Universal class tags
INTEGER
OBJECT-DESCRIPTOR
3.5.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the ASN.1 EXTERNAL type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes. This
is called padding the data and is necessary to send nine-bit bytes
over communication networks that only support eight-bit bytes. The
user must encode the ASN.1 EXTERNAL type as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
ASN.1 EXTERNAL type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
Call DDP-PPC.
10. Put the message in the output buffer. MOVE CLRESP-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
The OSI$CPDATA function call is only allowed if the following set of conditions is true:
or
CALL 'OSI$CPDATA' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$CPDATA request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an OSI$CPDATA function call permits you to send
capability data that you have placed in this area. OSI-MSG-BUFFER is the default name.
You can specify your own name in the working-storage section for this area, but because
the USING clause contains positional parameters, the name you specify must be the
second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.6.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$CPDATA function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you are using.
This value must be 1538 for this release. This value is set automatically if
you use the COPY verb format. If you use the function call format, you must
set this value using a standard COBOL statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the User-data parameter of
the presentation protocol data unit TC PPDU. It should be encoded according to the rules
specified in ISO 8823, Connection oriented presentation protocol specification, for
encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.6.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the presentation layer User-data type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes.
This is called padding the data and is necessary to send nine-bit
bytes over communication networks that only support eight-bit
bytes. The user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
presentation layer User-data type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
Call DDP-PPC.
11. Put the message in the output buffer. MOVE CPDATA-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$CPRESP' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$CPRESP request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a OSI$CPRESP function call permits you to send a
message along with the capability data received response. OSI-MSG-BUFFER is the default
name. You can specify your own name in the working-storage section for this area, but
because the USING clause contains positional parameters, the name you specify must be
the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.7.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$CPRESP function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you are using.
This value must be 1538 for this release. This value is set automatically if
you use the COPY verb format. If you use the function call format, you must
set this value using a standard COBOL statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the User-data parameter of
the presentation protocol data unit TCC PPDU. It should be encoded according to the rules
specified in ISO 8823, Connection-oriented presentation protocol specification, for
encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.7.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the presentation layer User-data type as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes.
This is called padding the data and is necessary to send nine-bit
bytes over communication networks that only support eight-bit
bytes. The user must encode the presentation layer User-data type
as part of user data.
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
presentation layer User-data type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data. However,
this data type can only be used with non-OS 2200 hosts if they
support session segmentation.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
Call DDP-PPC.
10. Put the message in the output buffer. MOVE CPRESP-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$DUMP' USING OSI-STATUS-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$DUMP request, DDP-PPC returns the status codes for you to test.
3.8.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$DUMP function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you are using.
This value must be 1538 for this release. This value is set automatically if
you use the COPY verb format. If you use the function call format, you must
set this value using a standard COBOL statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
Call DDP-PPC.
The OSI$GVCNTRL function call is only allowed if the following set of conditions is true:
The following chart indicates the relationship of token availability and the functional units
selected during conversation establishment.
DATA-TOKEN FUNC-UNIT-HALF-DUPLEX
SYNC-MINOR-TOKEN FUNC-UNIT-MINOR-SYNC
ACT-MAJOR-TOKEN FUNC-UNIT-ACT-MGT
If you selected OSI-SESSION-VERSION-1, no data can be sent with this function. If you
selected OSI-SESSION-VERSION-2, then up to 10240 bytes of data can be sent.
or
CALL 'OSI$GVCNTRL' USING OSI-STATUS-PKT OSI-MSG-BUFFER OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an OSI$GVCNTRL function call permits you to send a
message along with the request. OSI-MSG-BUFFER is the default name. You can specify
your own name in the working-storage section for this area, but because the USING clause
contains positional parameters, the name you specify must be the second parameter in the
clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.9.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$GVCNTRL function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you are
using. This value must be 1538 for this release. This value is set
automatically if you use the COPY verb format. If you use the function call
format, you must set this value using a standard COBOL statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the application layer entry is being used, this field maps to the SS-user data parameter of
the session layer give control service request. It should be encoded according to the rules
specified in ISO 8823 Connection-oriented presentation protocol specification for
encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.9.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the presentation layer User-data type as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes.
This is called padding the data and is necessary to send nine-bit
bytes over communication networks that only support eight-bit
bytes. The user must encode the presentation layer User-data type
as part of user data.
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
presentation layer User-data type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data. However,
this data type can only be used with non-OS 2200 hosts if they
support session segmentation.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
Call DDP-PPC.
Call DDP-PPC.
OSI-DATA-TOKEN FUNC-UNIT-HALF-DUPLEX
OSI-SYNC-MINOR-TOKEN FUNC-UNIT-MINOR-SYNC
OSI-ACT-MAJOR-TOKEN FUNC-UNIT-ACT-MGT
or
CALL 'OSI$GVTOKEN' USING OSI-STATUS-PKT OSI-MSG-BUFFER OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$GVTOKEN request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an OSI$GVTOKEN function call permits you to send a
message along with the tokens. OSI-MSG-BUFFER is the default name. You can specify
your own name in the working-storage section for this area, but because the USING clause
contains positional parameters, the name you specify must be the second parameter in the
clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.10.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$GVTOKEN function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the SS-user data parameter of
the session layer give tokens service request. It should be encoded according to the rules
specified in ISO 8823 Connection-oriented presentation protocol specification for
encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.10.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the presentation layer User-data type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes.
This is called padding the data and is necessary to send nine-bit
bytes over communication networks that only support eight-bit
bytes. The user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
presentation layer User-data type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data. However,
this data type can only be used with non-OS 2200 hosts if they
support session segmentation.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
Call DDP-PPC.
10. Put the message in the output buffer. MOVE GVTOKEN-MSG TO OSI-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$OPEN' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-CONNECT OSI-APPL-PRES-PKT
OSI-ADDRESS-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$OPEN request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an open permits you to send a message along with the
open request. OSI-MSG-BUFFER is the default name. You can specify your own name in
the working-storage section for this area, but because the USING clause contains
positional parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and information concerning the data to be sent.
The OSI-CONNECT-PKT parameter references the connect packet statements for all
information necessary to establish a connection with a peer program.
The OSI-ADDRESS-PKT parameter references the data packet that contains addressing
information necessary to establish a connection with a peer program.
3.11.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$OPEN function call uses the following
status packet parameters:
Parameter Description
Notes:
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the user-information
parameter of the AARQ-apdu in ISO 8650 Protocol specification for the Association
Control Service Element. It should be encoded according to ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the user-information parameter DDP-PPC
encodes and what part the user program must encode for data types 134, 135, 138, and 139:
encoded by user-
DDP-PPC information [30] length
EXTERNAL length
3.11.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the ASN.1 EXTERNAL type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes. This
is called padding the data and is necessary to send nine-bit bytes
over communication networks that only support eight-bit bytes. The
user must encode the ASN.1 EXTERNAL type as part of user data.
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it
treats the data type as a 138 type. The user must encode the
ASN.1 EXTERNAL type as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any
additional protocol to be encoded as part of user data.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This
data type does not require any additional protocol to be encoded
as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter
to a multiple of 4. A value of 0 indicates the first byte of the buffer
is to be used. DDP-PPC ignores this parameter if the
OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
continued
Parameter Description
3.11.5. OSI-CONNECT-PKT
Parameter Description
continued
Parameter Description
continued
Parameter Description
OSI-SERVICE-ENTRY Sets the interface level for the OSI connection. Valid values are:
$ 5 The session level.
If you select the session level, it is assumed that application
and presentation protocols are not required or will be supplied
by your program in the OSI-MSG-BUFFER area.
$ 7 The application level.
OSI-SESSION-VERSION Indicates the versions of the session layer protocol you propose
for this connection. Move a 1 into the specific version(s) you want
OSI-SESSION-VERSION-1
to propose. If you propose more than one version, the version
selected is the highest both you and the peer program proposed.
OSI-SESSION-VERSION-2
If you do not propose a version, DDP-PPC proposes version 1.
continued
Parameter Description
OSI-FUNC-UNITS-SELECTED
(cont.)
v FUNC-UNIT-TYPED-DATA Allows for the transfer of data in a manner that is not subject to the
control imposed by the availability of the data token.
v FUNC-UNIT-EXCEPTIONS Allows for the reporting of detected errors without aborting the
connection.
v FUNC-UNIT-CAP-DATA Allows for the confirmed transfer of data when the activity
(capability data) management functional unit has been selected but no activity is in
progress.
v FUNC-UNIT-ACT-MGT (activity Allows for the management of synchronized logical pieces of work.
management)
v FUNC-UNIT-RESYNC Allows for modification of synchronization point serial numbers and
(resynchronize) reassignment of tokens.
continued
Parameter Description
OSI-FUNC-UNITS-SELECTED
(cont.)
v FUNC-UNIT-DATA-SEP (data Allows for the protection of data in the event of resynchronization.
separation)
The following rules apply when proposing functional units for the
OSI$OPEN function:
$ You can only propose FUNC-UNIT-CAP-DATA if you also
propose FUNC-UNIT-ACT-MGT.
$ You can only propose FUNC-UNIT-EXCEPTIONS if you also
propose FUNC-UNIT-HALF-DUPLEX.
$ You can only propose FUNC-UNIT-DATA-SEP if you also
propose FUNC-UNIT-MINOR-SYNC.
$ You must propose one or both of the duplex and half-duplex
functional units (FUNC-UNIT-HALF-DUPLEX and
FUNC-UNIT-DUPLEX) on the OSI$OPEN request unless you do
not propose any functional units. If you do not propose any
functional unit, the half-duplex functional unit is the default.
If you do not propose any functional units, DDP-PPC does not
encode this parameter. As a result, the session services provider
(DDP-PPC) on the remote host proposes the OSI-defined default
value for functional units on your behalf. It appears to the peer
program as though you proposed those functional units. The
default includes the following functional units:
$ FUNC-UNIT-HALF-DUPLEX
$ FUNC-UNIT-MINOR-SYNC
$ FUNC-UNIT-ACT-MGT
$ FUNC-UNIT-CAP-DATA
$ FUNC-UNIT-EXCEPTIONS
continued
Parameter Description
OSI-CN-SESSION- The three fields for this parameter are user-defined. DDP-PPC
CONNECTION-ID passes the contents of each of these fields to the peer program
unless you set the respective reference length field to 0.
v SCI-CALLING- REFERENCE
v SCI-COMMON- REFERENCE
v SCI-ADDITIONAL-
REFERENCE
OSI-TRANSPORT- FACILITIES The value for the transport facilities as set in the Configuration
Services database.
0 2 4 20
3.11.6. OSI-APPL-PRES-PKT
Parameter Description
continued
Parameter Description
continued
Parameter Description
OSI-PRES-CONTEXT-TABLE
v OSI-TRANSFER-SYNTAX-ALIAS An alias name for a transfer syntax. DDP-PPC uses this value
to obtain the actual transfer syntax identifier from the
Configuration Services database. This field should be
left-justified and blank-filled.
DDP-PPC returns the following parameters if the OSI-APPL-CONTEXT-NAME-ALIAS parameter is not set
to spaces. DDP-PPC uses that field to obtain the information from an APPLICATION CONTEXT record
in the Configuration Services database with the same name.
$ DDP-PPC uses this packet only when the application layer interface is selected
(CONNECT packet, OSI-SERVICE-ENTRY = 7).
$ You must enter the ALIAS names used in this packet into the DDP-PPC Configuration
Services database before executing this program. See the DDP-PPC Implementation
and Administration Guide for information about using DDP-PPC Configuration
Services.
$ You can only associate a presentation context identifier with a single abstract syntax.
You can perform this association by entering the OSI-PRES-CONTEXT-IDENT and
OSI-ABSTRACT-SYNTAX-ALIAS values in an OSI-PRES-CONTEXT-TABLE entry.
$ To propose more than one transfer syntax for the same abstract syntax, use the same
OSI-ABSTRACT-SYNTAX-ALIAS and OSI-PRES-CONTEXT-IDENT values in multiple
OSI-PRES-CONTEXT-TABLE entries. Vary the OSI-TRANSFER-SYNTAX-ALIAS
parameter for each of those entries.
$ DDP-PPC requires the following entries in the OSI-PRES-CONTEXT-TABLE so that it
can encode and pass ACSE protocol using ASN.1 Basic Encoding Rules as the transfer
syntax:
v OSI-ABSTRACT-SYNTAX-ALIAS must be set to ’ACSE-AS’.
v OSI-TRANSFER-SYNTAX-ALIAS must be set to ’ASN1-TS’.
v OSI-PRES-CONTEXT-IDENT must be set to any user-defined value.
You cannot use this value for any other OSI-PRES-CONTEXT-IDENT value in the
OSI-PRES-CONTEXT-TABLE.
v OSI-PRES-CONTEXT-TABLE-ENTRIES must be set to at least 1.
$ If either this program or the peer program will use data type 135 when sending any
message across this connection, you must make the following entries in the
OSI-PRES-CONTEXT-TABLE so DDP-PPC can encode or decode the data properly:
v OSI-ABSTRACT-SYNTAX-ALIAS must be set to ’OS1100-AS’.
v OSI-TRANSFER-SYNTAX-ALIAS must be set to ’DDP-COMPRESS-TS’.
v OSI-PRES-CONTEXT-IDENT must be set to any valid user-defined value.
You cannot use this value for any other OSI-PRES-CONTEXT-IDENT value in the
OSI-PRES-CONTEXT-TABLE.
$ If either this program or the peer program will use data type 138 when sending any
message across this connection, you must make the following entries in the
OSI-PRES-CONTEXT-TABLE so DDP-PPC can encode or decode the data properly:
v OSI-ABSTRACT-SYNTAX-ALIAS must be set to ’OS1100-AS’.
v OSI-TRANSFER-SYNTAX-ALIAS must be set to ’DDP-PADDED-TS’.
v OSI-PRES-CONTEXT-IDENT must be set to any valid user-defined value.
You cannot use this value for any other OSI-PRES-CONTEXT-IDENT value in the
OSI-PRES-CONTEXT-TABLE.
$ If either this program or the peer program will use data type 139 when sending any
message across this connection, you must make the following entries in the
OSI-PRES-CONTEXT-TABLE so DDP-PPC can encode or decode the data properly:
v OSI-ABSTRACT-SYNTAX-ALIAS must be set to ’OS1100-AS’.
v OSI-TRANSFER-SYNTAX-ALIAS must be set to ’DDP-COMP-PAD-TS’.
v OSI-PRES-CONTEXT-IDENT must be set to any valid user-defined value.
You cannot use this value for any other OSI-PRES-CONTEXT-IDENT value in the
OSI-PRES-CONTEXT-TABLE.
$ The 140 data type allows you to send messages consisting of strings of eight-bit bytes.
When you use the 140 data type, DDP-PPC uses the NIST-OIW-ULSIG-AS octet string
for the abstract syntax and encodes the data using ASN.1 Basic Encoding Rules. This
assumes, for encoding purposes, that the user data is one large eight-bit byte octet
string. Since these are ISO-registered abstract and transfer syntaxes, non-OS 2200
systems that support these syntaxes can encode and decode the data, thus allowing
transfer of these messages between OS 2200 and non-OS 2200 systems.
When you use this data type, DDP-PPC encodes all the user data. The program is not
required to encode any of the data in ASN.1 format.
If either this program or the peer program uses data type 140 when sending any
message across this connection, you must make the following entries in the
OSI-PRES-CONTEXT-TABLE so DDP-PPC can encode or decode the data properly:
v OSI-ABSTRACT-SYNTAX-ALIAS = ’OIW-OCTET-AS’
v OSI-TRANSFER-SYNTAX-ALIAS = ’ASN1-TS’
v OSI-PRES-CONTEXT-IDENT must be set to any valid user-defined value.
You cannot use this value for any other OSI-PRES-CONTEXT-IDENT value in the
OSI-PRES-CONTEXT-TABLE.
$ The 141 data type attempts to compress a message consisting of a string of eight-bit
bytes. When you use this data type, DDP-PPC encodes all the user data. The program is
not required to encode any of the data in ASN.1 format.
If either this program or the peer program uses data type 141 when sending any
message across this connection, you must make the following entries in the
OSI-PRES-CONTEXT-TABLE so DDP-PPC can encode or decode the data properly:
v OSI-ABSTRACT-SYNTAX-ALIAS = ’OIW-OCTET-AS’
v OSI-TRANSFER-SYNTAX-ALIAS = ’DDP-COMPRESS-TS’
v OSI-PRES-CONTEXT-IDENT must be set to any valid user-defined value.
You cannot use this value for any other OSI-PRES-CONTEXT-IDENT value in the
OSI-PRES-CONTEXT-TABLE.
Notes:
3.11.8. OSI-ADDRESS-PKT
Parameter Description
OSI-CALLING-AE-TITLE
v OSI-CALLING-AE-QUAL The value of the Application Entity Qualifier for this application.
Its contents must be a directory RelativeDistinguishedName
type as defined in ISO 9594-2 or the contents octets of an
ASN.1 integer. It must be encoded according to ASN.1 Basic
Encoding Rules.
This field is ignored if the session layer is used.
continued
Parameter Description
OSI-CALLING-P-ADDRESS
v OSI-CALLING-S-SELECTOR The value of the Session Selector (S-SEL) for this application. It
should be set to the name the program set in the
OSI-INT-AP-NAME parameter of the REGISTER packet when it
issued the OSI$BIND function.
v OSI-CALLING-T-SELECTOR The value of the Transport Selector for this application. It must
match a T-SEL parameter on the DDP-PPC process statement in
the CMS configuration on the local host.
continued
Parameter Description
OSI-CALLING-P-ADDRESS-LEN
OSI-CALLED-AE-TITLE
v OSI-CALLED-AP-TITLE The Application Process title of the peer program. Its contents
must be either a directory name as defined by ISO 9594-2 or
the contents octets of an ASN.1 object identifier. It must be
encoded according to ASN.1 Basic Encoding Rules.
This field is ignored if the session layer entry is used.
continued
Parameter Description
OSI-CALLED-AE-TITLE (cont.)
v OSI-CALLED-AE-QUAL The value of the Application Entity Qualifier for the peer
program. Its contents must be a directory
RelativeDistinguishedName type as defined in ISO 9594-2 or
the contents octets of an ASN.1 integer. It must be encoded
according to ASN.1 Basic Encoding Rules.
This field is ignored if the session layer entry is used.
continued
Parameter Description
OSI-CALLED-P-ADDRESS
v OSI-CALLED-P-SELECTOR The Presentation Selector (P-SEL) for the peer program. This
parameter is normally not set for OS 2200 applications.
This field is ignored if the session layer entry is used.
OSI-OPEN-APPL-NO
The number of the Message Control Bank (MCB)
application group that the peer TIP program
will execute.
OSI-OPEN-TPX-CODE
The TIP transaction code, which is six
alphanumeric characters.
v OSI-CALLED-T-SELECTOR The value of the Transport Selector (T-SEL) for the peer
program.
If the peer host is an OS 2200 system using OSI Transport
Services (OSITS), this parameter should match the T-SEL
parameter, which the peer host’s Telcon configuration uses to
route incoming open requests to the proper OS 2200 system.
If the peer host is an OS 2200 system using CMS Transport
Services, this parameter must match the T-SEL parameter on
the DDP-PPC process statement in the CMS configuration on
that host
continued
Parameter Description
OSI-CALLED-P-ADDRESS (cont.)
v OSI-CALLED-NSAP The NSAP for the peer program. It should be left-justified and
expressed in octet format, with each octet containing two hex
digits. If the number of hex digits is uneven, pad the octet
containing the odd hex digit on the right with an x’F. For
example, encode an NSAP of hex
47 04 00 00 18 00 00 08 00 0B DC 00 09 00
as octal
107 00 04 00 00 30 00 00 10 00 13 334 00 11 00
If you are using an X.121 address, instead of an NSAP, encode
it as follows:
$ Combine two digits from the X.121 into each octet.
If the X.121 address is an odd number of digits, encode
the second digit of the last byte as an x’F’. If it starts with a
0, pad the X.121 address to seven bytes by preceding it
with one or more bytes of x’11’; otherwise, pad it to seven
bytes by preceding it with one or more bytes of x’0’.
$ Precede the resulting seven bytes with x’36’ when the
X.121 address (prior to padding) starts with a non-zero
digit or x’52’ when it starts with a zero digit.
continued
Parameter Description
hex 36 00 00 21 56 90 49 00
octal 66 00 00 41 126 220 111 00
$ Encode an X.121 address of 31342156904900 as
hex 36 31 34 21 56 90 49 00
octal 66 61 64 41 126 220 111 00
$ Encode an X.121 address of 035678 as
hex 52 11 11 11 11 03 56 78
octal 122 21 21 21 21 03 126 170
If you are using an internet address instead of an NSAP
(OSI-TRANSPORT-CLASS = 32), this field should be left-justified
and expressed in octet format, with each octet representing
one of the four parts of the internet address. For example,
encode an internet address of
192:63:246:011
as
300077366013
v OSI-CALLED-TRANSPORT This field specifies the name of a TRANSPORT NDS in the local
CMS configuration file. Use this field when there is more than
one possible path to the peer host, and the application has a
preference as to which path is taken.
This field is only used for CMS connections that use BRIDGE
protocol. It applies to packet version 1539.
Specifying called_transport overrides the normal CMS process
of matching the OSI-CALLED_NSAP value against a
corresponding value on an OSI-NSAP NDS in the local CMS
configuration to determine the transport path.
If there is only one path to the peer, or if there are multiple
paths but the application has no preference, the application
may use packet version 1539 with OSI-CALLED_TRANSPORT
set to blanks, or use packet version 1538. If there are multiple
paths, CMS will select one.
continued
Parameter Description
OSI-CALLED-P-ADDRESS-LEN
continued
continued
Call DDP-PPC.
continued
continued
Call DDP-PPC.
or
CALL 'OSI$OPRESP' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-CONNECT-PKT OSI-APPL-PRES-PKT
OSI-ADDRESS-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$OPRESP request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on an open response permits you to send a message along
with the open response request. OSI-MSG-BUFFER is the default name. You can specify
your own name in the working-storage section for this area, but because the USING clause
contains positional parameters, the name you specify must be the second parameter in the
clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
The OSI-CONNECT-PKT parameter references the connect packet statements for all
information necessary to establish a connection with a peer program.
The OSI-ADDRESS-PKT parameter references the data packet statements for addressing
information necessary to establish a connection with a peer program.
3.12.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$OPRESP function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the user-information
parameter of the AARE-apdu in ISO 8650 Protocol specification for the Association
Control Service Element. It should be encoded according to ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1)
The following diagram shows what part of the user-information parameter DDP-PPC
encodes and what part the user program must encode for data types 134, 135, 138, and 139:
encoded by user-
DDP-PPC information [30] length
EXTERNAL length
Legend
[] Context-specific class tags
EXTERNAL
OBJECT-IDENTIFIER
Universal class tags
INTEGER
OBJECT-DESCRIPTOR
3.12.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the ASN.1 EXTERNAL type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes.
This is called padding the data and is necessary to send nine-bit
bytes over communication networks that only support eight-bit
bytes. The user must encode the ASN.1 EXTERNAL type as
part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes,
and also compresses the data. If it cannot perform
compression, it treats the data type as a 138 type. The user
must encode the ASN.1 EXTERNAL type as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the first
byte of the buffer is to be used. DDP-PPC ignores this
parameter if the OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
OSI-SYNC-POINT-SERIAL- NUMBER The proposed initial minor synchronization point serial number.
It identifies a value for the initial synchronization point
(checkpoint) in a connection. This value must be set if you
select the minor synchronize (FUNC-UNIT-MINOR-SYNC) or
resynchronize (FUNC-UNIT-RESYNC) functional unit but do not
select the activity management functional unit
(FUNC-UNIT-ACT-MGT).
DDP-PPC sets this value on the OSI$RECEIVE of the new
connection. You can alter it but the new value becomes the
accepted value for the connection.
The value of this parameter can be in the range 0 to 999999.
You must set it to 0 if you select FUNC-UNIT-ACT-MGT or if you
do not select either FUNC-UNIT-MINOR-SYNC or
FUNC-UNIT-RESYNC.
Note: Certain functions increment this value throughout the
connection or activity. If it exceeds 999999, you
receive an error. Therefore, start with an initial value
low enough to prevent this error from occurring.
3.12.5. OSI-CONNECT-PKT
Parameter Description
OSI-SESSION-RESULT This field is only used when the session layer entry is used. It
indicates whether this program, acting as a session service
user, accepted or rejected the connection. Set this parameter
to one of the following values:
v OSI-SESSION-VERSION-1 If you are using the session layer entry and set the
OSI-SESSION-RESULT parameter to 0 (OSI-CN-ACCEPT), or are
v OSI-SESSION-VERSION-2 using the application layer entry and set the
OSI-APPL-PRES-RESULT parameter to 0
(OSI-AU-ASSOC-ACCEPTED), you must specify the version(s)
your implementation supports. You can specify more versions
on the response to the open than were proposed on the open
request. At least one version proposed on the response must
be proposed on the open request.
continued
Parameter Description
continued
Parameter Description
OSI-SESSION-VERSION (cont.) If you are using the session layer entry and set the
OSI-SESSION-RESULT parameter to other than 0
(OSI-CN-ACCEPT), or are using the application layer entry and
set the OSI-APPL-PRES-RESULT parameter to other than 0
(OSI-AU-ASSOC-ACCEPTED), you can optionally specify
version(s) your implementation supports. You can specify more
or different versions on the response to the open than were
proposed on the open request.
continued
Parameter Description
continued
Parameter Description
continued
Parameter Description
v FUNC-UNIT-TYPED-DATA Allows for the transfer of data in a manner that is not subject to
the control imposed by the availability of the data token.
v FUNC-UNIT-EXCEPTIONS Allows for the reporting of detected errors without aborting the
connection.
vdata)FUNC-UNIT-CAP-DATA (capability Allows for the confirmed transfer of data when the activity
management functional unit has been selected but no activity is
in progress.
continued
Parameter Description
OSI-FUNC-UNITS-SELECTED (cont.)
continued
Parameter Description
v SCI-CALLED-REFERENCE
v SCI-COMMON-REFERENCE
v SCI-ADDITIONAL-REFERENCE
3.12.6. OSI-APPL-PRES-PKT
Parameter Description
continued
Parameter Description
continued
Parameter Description
OSI-APPL-PRES-RESULT (cont.)
continued
Parameter Description
OSI-APPL-PRES-RESULT-TYPE The type of reject. Only set this parameter if you set the
OSI-APPL-PRES-RESULT parameter to a value other than
0. Do not set it to 0 (NULL). The following values are
valid:
$ 1 OSI-PERMANENT
The error is permanent and will probably reoccur if
the open request is retried.
$ 2 OSI-TRANSIENT
The error is temporary and a subsequent open
request may be successful.
continued
Parameter Description
DDP-PPC returns the following parameters if the OSI-APPL-CONTEXT-NAME-ALIAS parameter was not
set to all spaces. DDP-PPC uses that field to obtain the information from an APPLICATION CONTEXT
record in the Configuration Services database.
$ If this connection is between OS 2200 systems and uses data type 141 for any message,
DDP-PPC requires you to accept the OSI-PRES-CONTEXT-TABLE entry that contains
the following so that it can encode the data properly:
v OSI-ABSTRACT-SYNTAX-ALIAS = ’OIW-OCTET-AS’.
v OSI-TRANSFER-SYNTAX-ALIAS = ’DDP-COMPRESS-TS’.
Notes:
1. When setting the presentation context list on an OSI$OPRESP, accept all contexts
that will be used during the life of the connection. For example, at a minimum,
accept at least one context for ACSE protocol and one for user data.
2. When accepting contexts for compressed data types (135, 139, 141), also accept the
contexts for the corresponding non-compressed data types (134, 138, 140). This
allows for the case where DDP-PPC cannot perform compression and must encode
the data in the non-compressed form.
3. If either or both of the octet data types (140, 141) are accepted, DDP-PPC restricts
the entries in the presentation context table to:
DDP-PPC returns the application context proposed by the peer program in the
APPL-CONTEXT-NAME parameter on the OSI$RECEIVE function (receive new format).
DDP-PPC also returns the corresponding APPL-CONTEXT-NAME-ALIAS parameter if it
finds an Application Context Id in the Configuration Services database that matches the
value of the Application Context Id received on the open request. This program can return
that value or select a new value. In either case, the value this program selects is used for
the connection.
3.12.8. OSI-ADDRESS-PKT
Parameter Description
continued
Parameter Description
continued
continued
22. Set the transfer syntax alias identifier. MOVE ’ASN1-TS’ TO OSI-TRANSFER-
SYNTAX-ALIAS (1).
25. Set the abstract syntax alias identifier. MOVE ’ACSE-AS’ TO OSI-ABSTRACT-
SYNTAX-ALIAS (2).
26. Set the transfer syntax alias identifier. MOVE ’ASN1-TS’ TO OSI-TRANSFER-
SYNTAX-ALIAS (2).
Call DDP-PPC.
continued
continued
24. Set the transfer syntax alias identifier. MOVE ’ASN1-TS’ TO OSI-TRANSFER-
SYNTAX-ALIAS (1).
27. Set the abstract syntax alias identifier. MOVE ’ACSE-AS’ TO OSI-ABSTRACT-
SYNTAX-ALIAS (2).
28. Set the transfer syntax alias identifier. MOVE ’ASN1-TS’ TO OSI-TRANSFER-
SYNTAX-ALIAS (2).
Call DDP-PPC.
OSI-DATA-TOKEN FUNC-UNIT-HALF-DUPLEX
OSI-SYNC-MINOR-TOKEN FUNC-UNIT-MINOR-SYNC
OSI-ACT-MAJOR-TOKEN FUNC-UNIT-ACT-MGT
or
CALL 'OSI$PLTOKEN' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$PLTOKEN request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a token request permits you to send a message along
with the request. OSI-MSG-BUFFER is the default name. You can specify your own name
in the working-storage section for this area, but because the USING clause contains
positional parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.13.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$PLTOKEN function call uses the following
status packet parameters:
Parameter Description
OSI-VERSION The version of the DDP-PPC COPY packets and OSI protocol you
are using
This value must be 1538 for this release. This value is set
automatically if you use the COPY verb format. If you use the
function call format, you must set this value using a standard
COBOL statement.
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the SS-user data parameter of
the session layer please tokens service request. It should be encoded according to the rules
specified in ISO 8823 Connection-oriented presentation protocol specification for
encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
encoded by
user-data [APPLICATION 1] length
user
PDV-list SEQUENCE length
SEQUENCE length
3.13.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The
user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP u
139 DDP-PPC reformats the data from nine to eight-bit
bytes, and also compresses the data. If it cannot
perform compression, it treats the data type as a 138
type. The user must encode the presentation layer
User-data type as part of user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer must be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
Call DDP-PPC
Call DDP-PPC
$ Receive new
This format receives an open message (new connection) from a peer program. It is
also referred to as the receive new mode because the mode parameter (OSI-MODE in
the RECEIVE packet) must be set to OSI-NEW-CONV.
$ Receive open response
This format receives an open response message format from the peer program.
$ Receive existing
This format is used to receive messages once the connection has been established
between the two applications.
Each of the formats is described in separate subsections following the descriptions of the
general format and the OSI-STATUS-PKT below, which are the same for all three formats.
If the message received is not a type that uses a specific packet, then DDP-PPC does not
return any information in that packet.
COPY OSI-RECEIVE.
or
CALL 'OSI$RECEIVE' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-CONNECT-PKT OSI-APPL-PRES-PKT
OSI-ADDRESS-PKT OSI-RCV-PKT OSI-SYNC-PKT
OSI-ACTIVITY-PKT OSI-RESYNC-PKT.
The OSI-STATUS-PKT argument references the data structures defined in your program
for the user-id and the status codes. On completion of this function call, DDP-PPC returns
the status codes for you to test. Parameters in this packet are set and returned the same
way for all formats of the OSI$RECEIVE function.
The OSI-MSG-BUFFER argument references the input buffer storage area. This is where
DDP-PPC stores the user data it returns on the OSI$RECEIVE function. All OSI$RECEIVE
function formats use this area.
The OSI-DATA-PKT argument references the data packet statements for the connection-id
and all information concerning the data received. The parameters in this packet are set and
returned for all formats of the OSI$RECEIVE function.
The OSI-CONNECT-PKT argument references the connect packet statements for all
information necessary to establish a connection with a peer program. The receive existing
format does not use the parameters in this packet.
The OSI-ADDRESS-PKT argument references the data packet statements for addressing
information necessary to establish a connection with a peer program. The receive existing
format does not use the parameters in this packet.
The OSI-RCV-PKT argument references the receive packet to determine the mode (receive
new or receive existing) and the type of message received. The parameters in this packet
are set and returned for all formats of the OSI$RECEIVE function.
The OSI-ACTIVITY-PKT argument references the activity packet for activity management
information that DDP-PPC has received. Only the receive existing format uses the
parameters in this packet.
3.14.2. OSI-STATUS-PKT
The status packet is shown in Appendix A. All OSI$RECEIVE function call formats use the
following status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
The OSI$RECEIVE function for the receive new format uses the packets and settings
shown in the following subsections.
This is a storage area where DDP-PPC moves the data received on the OSI$RECEIVE
function. It is specified as a data structure in this application program.
If the session layer entry is being used, then the data DDP-PPC returns to the user program
consists of eight-bit bytes of information. The two communicating programs determine the
form of the data.
If the application layer entry is being used, this field maps to the user-information
parameter of the AARQ-apdu in ISO 8650 Information Processing Systems - Open
Systems Interconnection - Protocol Specification for the Association Control Service
Element. It should be decoded according to ISO 8825 Basic Encoding Rules for Abstract
Syntax Notation One (ASN.1).
Because the user program must decode the user data from the transfer syntax for any data
type except 140 or 141, it is performing a function of the OSI presentation layer. If it
encounters errors during this decoding process and must reject the open request, it should
use the presentation provider reasons of the OSI-APPL-PRES-RESULT parameter, values
13 through 20.
The following diagram shows what part of the user-information parameter DDP-PPC
decodes and what part the user program must decode for data types 134, 135, 138, and 139:
decoded by user-
DDP-PPC information [30] length
EXTERNAL length
Legend
[] Context-specific class tags
EXTERNAL
OBJECT-IDENTIFIER
Universal class tags
INTEGER
OBJECT-DESCRIPTOR
Parameter Description
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
OSI-TEXT-START The byte index into the message at which the transfer
between DDP’s buffers and OSI-MSG-BUFFER begins. You
must set this value to a multiple of 4.
continued
Table 3-36. OSI-DATA-PKT Parameters for OSI$RECEIVE (Receive New Format) (cont.)
Parameter Description
OSI-DATA-TYPE (cont.)
continued
Table 3-36. OSI-DATA-PKT Parameters for OSI$RECEIVE (Receive New Format) (cont.)
Parameter Description
Parameter Description
OSI-SERVICE-ENTRY Sets the interface level for the OSI connection. Valid
values are:
$ 5 uThe session level
If you select the session level, it is assumed that
application and presentation protocols are not
required or will be supplied by your program in the
user data.
$ 7 uThe application level
Values Returned by DDP-PPC
continued
Parameter Description
v FUNC-UNIT-CAP-DATA (capability data) Allows for the confirmed transfer of data when the
activity management functional unit has been selected
but no activity is in progress.
OSI-FUNC-UNITS-SELECTED (cont.)
continued
Parameter Description
OSI-CN-SESSION-CONNECTION-ID
Parameter Description
continued
Parameter Description
continued
Parameter Description
OSI-PRES-CONTEXT-TABLE
Parameter Description
OSI-CALLING-AE-TITLE DDP-PPC does not return these fields if the session layer
entry is used.
v OSI-CALLING-AE-QUAL The value of the Application Entity Qualifier for the peer
program. Its contents are a directory
RelativeDistinquishedName type as defined in ISO 9594-2
or the contents octets of an ASN.1 integer. It is encoded
according to ASN.1 Basic Encoding Rules.
continued
Parameter Description
OSI-CALLING-P-ADDRESS
v OSI-CALLING-S-SELECTOR The value of the Session Selector (S-SEL) for the peer
program.
v OSI-CALLING-T-SELECTOR The value of the Transport Selector (T-SEL) for the peer
program.
OSI-CALLING-AE-TITLE-LEN DDP-PPC does not return these fields if the session layer
entry is used.
continued
Parameter Description
OSI-CALLING-P-ADDRESS-LEN
continued
Parameter Description
OSI-CALLED-AE-TITLE
OSI-CALLED-P-ADDRESS
continued
Parameter Description
OSI-CALLED-AE-TITLE-LEN DDP-PPC does not return these fields if the session layer
entry is used.
OSI-CALLED-P-ADDRESS-LEN
Parameter Description
he response may be either acceptance or rejection of the open request, depending on the
setting of the OSI-APPL-PRES-RESULT field if the application layer entry is used or the
OSI-SESSION-RESULT field if the session layer entry is used.
The OSI$RECEIVE function for the receive open response format uses the packets and
settings described in the following subsections.
If the session layer entry is being used, then the data DDP-PPC returns to the user program
consists of eight-bit bytes of information. The two communicating programs determine the
form of the data.
If the application layer entry is being used, this field maps to the user-information
parameter of the AARE-apdu in ISO 8650 Information Processing Systems - Open
Systems Interconnection - Protocol Specification for the Association Control Service
Element. It should be decoded according to ISO 8825 Basic Encoding Rules for Abstract
Syntax Notation One (ASN.1).
The following diagram shows what part of the user-information parameter DDP-PPC
decodes and what part the user program must decode for data types 134, 135, 138, and 139:
decoded by user-
DDP-PPC information [30] length
decoded by
EXTERNAL EXTERNAL length
user
direct-reference OBJECT-IDENTIFIER length value
EXTERNAL length
Legend
[] Context-specific class tags
EXTERNAL
OBJECT-IDENTIFIER
Universal class tags
INTEGER
OBJECT-DESCRIPTOR
Parameter Description
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
OSI-TEXT-START The byte index into the message at which the transfer
between the DDP-PPC buffers and the OSI-MSG-BUFFER
begins. It must be a multiple of 4.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
continued
Parameter Description
The user does not set any values in the CONNECT packet for the receive open response
function.
Parameter Description
continued
Parameter Description
OSI-SESSION-RESULT This field is only used when the session layer entry is
used. It indicates whether the program or session
service provider accepted or rejected the open request.
DDP-PPC returns one of the following values:
continued
Parameter Description
OSI-FUNC-UNITS-SELECTED The OSI functional units selected for this connection. The
contents depend on whether the connection was
accepted or how it was rejected:
$ If the session layer interface was used and
OSI-SESSION-RESULT was set to 0 (OSI-CN-ACCEPT)
or
If the application layer interface was used and
OSI-APPL-PRES-RESULT was set to 0
(OSI-AU-ASSOC-ACCEPTED),
then the condition was accepted. DDP-PPC sets
those functional units that the peer program
proposes and supports to 1. It resets the other
functional units to 0. The functional units selected
for use on this connection are the ones that were
proposed on both the open request and open
response.
$ If the session layer interface was used and
OSI-SESSION-RESULT was set to 3
(OSI-CN-REJ-USR-SEE-DATA), DDP-PPC sets those
functional units the peer program proposes to 1.
$ If the application layer interface was used and
OSI-APPL-PRES-RESULT was set to 1 through 10
(indicating the ACSE service user rejected the
connection), DDP-PPC sets those functional units the
peer program proposes to 1.
$ If the application layer interface was used and
OSI-APPL-PRES-RESULT was set to 11 through 20
(indicating the ACSE service provider or the
presentation service provider rejected the
connection), DDP-PPC sets the functional units to the
OSI default value. For details, see
OSI-FUNC-UNITS-SELECTED in the description of the
OSI$OPRESP function call in 3.12.
$ If the connection is rejected for any other reason,
DDP-PPC does not return the functional unit
parameters.
continued
Parameter Description
v SCI-CALLED-REFERENCE
v SCI-COMMON-REFERENCE
v SCI-ADDITIONAL-REFERENCE
For the receive open response, this packet contains the results of the presentation context
negotiations. Only those contexts that were accepted can be used to encode the data
during this connection.
continued
continued
OSI-APPL-PRES-RESULT (cont.)
continued
OSI-APPL-PRES-RESULT (cont.)
continued
OSI-PRES-CONTEXT-TABLE
v OSI-PRES-CONTEXT-IDENT The presentation context for this abstract and transfer
syntax combination. This value is the same as the one
supplied on the open request.
continued
OSI-APPL-CONTEXT-TABLE (cont.)
v OSI-PU-CONTEXT-ACCEPTED u
0 The remote host accepted the presentation context
and it can be used during the connection as a way to
encode data.
Parameter Description
OSI-RESPONDING-AE-QUAL The value of the Application Entity Qualifier for the peer
program. Its contents are a directory
RelativeDistinguishedName type as defined in ISO 9594-2
or the contents octets of an ASN.1 integer. It is encoded
according to ASN.1 Basic Encoding Rules.
DDP-PPC does not return this field if the session layer
entry is used.
OSI-RESPONDING-S-SELECTOR The value of the Session Selector (S-SEL) for the peer
program.
continued
Parameter Description
OSI-RESPONDING-T-SELECTOR The value of the Transport Selector (T-SEL) for the peer
program.
Parameter Description
The OSI$RECEIVE function for the receive existing format uses the packets and settings
shown in the following subsections.
If the session layer entry is being used, then the data DDP-PPC returns to the user program
consists of eight-bit bytes of information. The two communicating programs determine the
form of the data.
If the application layer entry is being used, the program must decode the data that
DDP-PPC moves into the OSI-MSG-BUFFER. How to decode it depends upon the transfer
and abstract syntax the peer program used to encode it.
Another consideration for decoding is the type of message received. If the message type
(OSI-MSG-TYPE) is one of the following:
then the data is part of an ACSE protocol data unit (pdu). In this case, this parameter maps
to the user-information parameter of an ACSE pdu in ISO 8650 Information Processing
Systems - Open Systems Interconnection - Protocol Specification for the Association
Control Service Element. It should be decoded according to ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the user-information parameter DDP-PPC
decodes and what part the user program must decode for data types 134, 135, 138, and 139:
decoded by user-
DDP-PPC information [30] length
EXTERNAL length
Legend
[] Context-specific class tags
EXTERNAL
OBJECT-IDENTIFIER
Universal class tags
INTEGER
OBJECT-DESCRIPTOR
The remaining message types are mapped to either the SS-user data parameter of a session
layer service request or to the User-data parameter of a presentation layer pdu. In either
case, this parameter should be decoded according to the rules for decoding the
presentation layer User-data parameter specified in ISO 8823 Information Processing
Systems - Open Systems Interconnection - Connection-Oriented Presentation Protocol
Specification using ISO 8825 Basic Encoding Rules for Abstract Syntax Notation One
(ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC decodes and
what part the user program must decode for data types 134, 135, 138, and 139:
SEQUENCE length
Legend
[ APPLICATION ] Application class tags
[] Context-specific class tags
SEQUENCE
OBJECT-IDENTIFIER Universal class tags
INTEGER
Parameter Description
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the first
byte of the buffer is to be used. DDP-PPC ignores this
parameter if the OSI-TEXT-LENGTH parameter is 0.
OSI-TEXT-START The byte index into the message at which the transfer
between DDP-PPC buffers and the user program message
buffer begins. This value must be 0 or a multiple of 4.
OSI-DATA-TYPE Used on the application level entry only; indicates the way
the peer program encoded that data and whether the user
program must decode the data returned by DDP-PPC
according to ASN.1 Basic Encoding Rules. See the section
on the OSI-MSG-BUFFER area for more information.
v OSI-COMPRESSED-TRANSP 135 DDP-PPC on the peer host compressed the user data
before sending it. DDP-PPC on this host decompresses it
before giving it to the user program. The peer program
encoded the data in ASN.1 format and this program must
decode the EXTERNAL type and the user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-PAD-TRANSPARENT 138 DDP-PPC on the peer host reformatted the data from
nine to eight-bit bytes. DDP-PPC on this host reformats the
data before giving it to the user program. The peer program
encoded the data in ASN.1 format and this program must
decode the EXTERNAL type and the user data.
v OSI-COMP-PAD-TRANSP 139 DDP-PPC on the peer host compressed and
reformatted the data from nine to eight-bit bytes. DDP-PPC
decompresses and reformats the data before giving it to the
user program. The peer program encoded the data in ASN.1
format and this program must decode the EXTERNAL type
and the user data.
v OSI-COMP-OCTET-STRING 141 DDP-PPC on the peer host compressed the data and
encoded it as an ASN.1 octet string. DDP-PPC
decompresses and decodes the ASN.1 octet string and
return the contents octets to the user program.
continued
Parameter Description
CASE 1
continued
Parameter Description
CASE 3
continued
Parameter Description
CASE 1
continued
Parameter Description
OSI-SYNC-POINT-SERIAL-NUMBER CASE 2
(cont.)
CASE 3
continued
Parameter Description
This packet provides information about the presentation contexts the peer program used
to encode the data in the abort message.
The parameters in this packet are returned only if the application layer is used and an
abort message is received (OSI-MSG-TYPE = 7, OSI-MSG-ABORT).
Parameter Description
OSI-PRES-CONTEXT-TABLE
Parameter Description
continued
Parameter Description
OSI-MSG-TYPE (cont.)
continued
Parameter Description
OSI-MSG-TYPE (cont.)
This packet indicates the type of minor synchronization subfunction received. DDP-PPC
returns the parameters in this packet only if a minor synchronization message was
received (OSI-MSG-TYPE = 8, OSI-MSG-SYNC).
Parameter Description
This packet provides information about the activity management message received.
DDP-PPC returns the parameters in this packet only if an activity management message
was received (OSI-MSG-TYPE = 9, OSI-MSG-ACTMGT).
Parameter Description
continued
Parameter Description
continued
Parameter Description
Parameter Description
Call DDP-PPC
Call DDP-PPC.
or
CALL 'OSI$RESYNC' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-RESYNC-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$RESYNC request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a resynchronization request permits you to send a
message along with the resynchronization request. OSI-MSG-BUFFER is the default name.
You can specify your own name in the working-storage section for this area, but because
the USING clause contains positional parameters, the name you specify must be the
second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.15.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$RESYNC function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the User-data parameter of
the presentation protocol data units RS PPDU and RSA PPDU. It should be encoded
according to the rules specified in ISO 8823, Information Processing Systems - Open
Systems Interconnection - Connection-Oriented Presentation Protocol Specification, for
encoding the presentation layer User-data parameter using ISO 8825 Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.15.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The
user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
continued
Parameter Description
3.15.5. OSI-RESYNC-PKT
Parameter Description
continued
Parameter Description
OSI-RESYNC-FUNC (cont.)
continued
Parameter Description
OSI-RESYNC-FUNC (cont.)
Call DDP-PPC.
12. Put the message in the output buffer. MOVE RESYNC-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$SEND' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$SEND request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. OSI-MSG-BUFFER is the default name. You can specify your own name in the
working-storage section for this area, but because the USING clause contains positional
parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.16.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$SEND function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the User-data parameter of
the presentation protocol data unit TD PPDU. It should be encoded according to the rules
specified in ISO 8823, Information Processing Systems - Open Systems Interconnection -
Connection-Oriented Presentation Protocol Specification, for encoding the presentation
layer User-data parameter using ISO 8825 Basic Encoding Rules for Abstract Syntax
Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.16.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The
user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
11. Put the message in the output buffer. MOVE SEND-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$SYNC' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT OSI-SYNC-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$SYNC request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a synchronization request permits you to send a
message along with the synchronization request. OSI-MSG-BUFFER is the default name.
You can specify your own name in the working-storage section for this area, but because
the USING clause contains positional parameters, the name you specify must be the
second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.17.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$SYNC function call uses the following status
packet parameters:
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the SS-user data parameter of
the session layer minor synchronize service requests. It should be encoded according to
the rules specified in ISO 8823 Information Processing Systems - Open Systems
Interconnection - Connection-Oriented Presentation Protocol Specification for encoding
the presentation layer User-data parameter using ISO 8825 Basic Encoding Rules for
Abstract Syntax Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.17.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The
user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
3.17.5. OSI-SYNC-PKT
Parameter Description
continued
Parameter Description
OSI-SYNC-FUNC (cont.)
continued
Parameter Description
OSI-SYNC-FUNC (cont.)
Call DDP-PPC.
10. Put the message in the output buffer. MOVE SYNC-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$TPDATA' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$TPDATA request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. OSI-MSG-BUFFER is the default name. You can specify your own name in the
working-storage section for this area, but because the USING clause contains positional
parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.18.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$TPDATA function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the User-data parameter of
the presentation protocol data unit TTD PPDU. It should be encoded according to the rules
specified in ISO 8823, Information Processing Systems - Open Systems Interconnection -
Connection-Oriented Presentation Protocol Specification, for encoding the presentation
layer User-data parameter using ISO 8825 Basic Encoding Rules for Abstract Syntax
Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.18.4. OSI-DATA-PKT
Parameter Description
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The
user must encode the presentation layer User-data type
as part of user data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this
parameter to a multiple of 4. A value of 0 indicates the
first byte of the buffer is to be used. DDP-PPC ignores
this parameter if the OSI-TEXT-LENGTH parameter is 0.
continued
Parameter Description
10. Put the message in the output buffer. MOVE TPDATA-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
or
CALL 'OSI$UNBIND' USING OSI-STATUS-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$UNBIND request, DDP-PPC returns the status codes for you to test.
3.19.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$UNBIND function call uses the following
status packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
Call DDP-PPC.
or
CALL 'OSI$XRPT' USING OSI-STATUS-PKT OSI-MSG-BUFFER
OSI-DATA-PKT.
The OSI-STATUS-PKT parameter of the USING clause references the storage areas defined
in your working-storage section for the user-id and the status codes. On completion of this
OSI$XRPT request, DDP-PPC returns the status codes for you to test.
The OSI-MSG-BUFFER parameter references the storage area you specify for the output
message. Referencing this area on a report-errors permits you to send a message along with
the report-errors request. OSI-MSG-BUFFER is the default name. You can specify your own
name in the working-storage section for this area, but because the USING clause contains
positional parameters, the name you specify must be the second parameter in the clause.
The OSI-DATA-PKT parameter references the data packet statements for the connection-id
and all information concerning the data to be sent.
3.20.2. OSI-STATUS-PKT
Appendix A shows the status packet. The OSI$XRPT function call uses the following status
packet parameters:
Parameter Description
Note: The DDP-PPC/DDP-FJT Messages Reference Manual describes the error codes.
If the session layer entry is being used, then the user program determines how the user
data is encoded. DDP-PPC does not perform any additional encoding of the user data.
If the application layer entry is being used, this field maps to the SS-user data parameter of
the session layer U-Exception service request. It should be encoded according to the rules
specified in ISO 8823 Information Processing Systems - Open Systems Interconnection -
Connection-Oriented Presentation Protocol Specification for encoding the presentation
layer User-data parameter using ISO 8825 Basic Encoding Rules for Abstract Syntax
Notation One (ASN.1).
The following diagram shows what part of the User-data parameter DDP-PPC encodes and
what part the user program must encode for data types 134, 135, 138, and 139:
SEQUENCE length
3.20.4. OSI-DATA-PKT
Parameter Description
OSI-DATA-TYPE Used on the application level entry only; indicates whether DDP-PPC
should encode, compress, or pad the entire user data buffer. If you
do not want encoding, compression, or padding, set this parameter to
134 (OSI-TRANSPARENT-TYPE). Also set to 134 or 140 for
connections to non-OS 2200 hosts because any other value requires
the use of DDP-PPC proprietary abstract and transfer syntaxes that
those hosts will probably not recognize. See 3.11 for additional
information on application presentation packet context table syntaxes.
If you want any messages sent during this conversation to be
encoded, padded, or compressed, then the DDP-PPC abstract and
transfer syntaxes for these values must be selected during
connection establishment. See the OSI-APPL-PRES-PKT (3.11) for
details about syntax selection. See the OSI-APPL-PRES-PKT (3.12) for
information about negotiating syntaxes on the open response.
v OSI-TRANSPARENT-TYPE 134 DDP-PPC does not reformat the user data. The user must
encode the presentation layer User-data type as part of user data.
v OSI-PAD-TRANSPARENT 138 DDP-PPC reformats the data from nine to eight-bit bytes. This is
called padding the data and is necessary to send nine-bit bytes over
communication networks that only support eight-bit bytes. The user
must encode the presentation layer User-data type as part of user
data.
continued
Parameter Description
OSI-DATA-TYPE (cont.)
v OSI-COMP-PAD-TRANSP 139 DDP-PPC reformats the data from nine to eight-bit bytes, and
also compresses the data. If it cannot perform compression, it treats
the data type as a 138 type. The user must encode the presentation
layer User-data type as part of user data.
v OSI-OCTET-STRING 140 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules. This data type does not require any additional
protocol to be encoded as part of user data. However, this data type
can only be used with non-OS 2200 hosts if they support session
segmentation.
v OSI-COMP-OCTET-STRING 141 DDP-PPC encodes user data as an octet string using ASN.1
Basic Encoding Rules, and also compresses the data. If it cannot
perform compression, it treats the data type as a 140 type. This data
type does not require any additional protocol to be encoded as part of
user data.
OSI-BUFFER-OFFSET Where the data begins in the user data buffer. Set this parameter to a
multiple of 4. A value of 0 indicates the first byte of the buffer is to be
used. DDP-PPC ignores this parameter if the OSI-TEXT-LENGTH
parameter is 0.
continued
Parameter Description
OSI-EXCEPTION-REASON An integer that indicates what non-fatal error the program is reporting:
0 No specific reason reported
1 User receiving ability jeopardized
2 Reserved
3 User sequence error
4 Reserved
5 Local SS-user error
6 Unrecoverable procedural error
128 Demand data token
Call DDP-PPC.
11. Put the message in the output buffer. MOVE XRPT-MSG TO OSI-MSG-BUFFER.
Call DDP-PPC.
$ A sample program flow design that illustrates a basic conversation between two
programs in two separate hosts
$ A description of the automatic scheduling feature, which allows you to call runstream
elements to initiate the execution of paired programs or to start TIP applications
This example shows OSI protocol and data flow. Appendix B contains the COBOL
language source statements for primary and secondary programs that follow this data
u
flow. There are two sets of programs one that uses the DDP-PPC application layer
interface and one that uses the session layer interface.
For illustration reasons, the examples show both the primary and secondary programs as
DDP-PPC programs. In actuality, either the primary or secondary program can be an
application program on any vendor’s equipment that conforms to the OSI standards.
Node A Node B
1A BIND BIND 1B
RECEIVE
2A OPEN 2B
(NEW)
RECEIVE
3A OPRESP 3B
(OPEN RESPONSE)
SYNC
4A RECEIVE 4B
(CONFIRM REQED)
SYNC
5A RECEIVE 5B
(CONFIRM)
6A SEND RECEIVE 6B
7A SYNC 7B
RECEIVE
(CONFIRM REQED)
SYNC
8A RECEIVE 8B
(CONFIRM)
9A CLOSE RECEIVE 9B
RECEIVE
10A CLRESP 10B
(CLRESP)
(1A)(1B) Both programs register with DDP-PPC on their respective hosts by issuing
OSI$BIND functions.
(2A) The primary program issues an OSI$OPEN function to establish the connection with
the secondary program.
(2B)(3B) The secondary program receives the open request by issuing an OSI$RECEIVE
function (receive new format), then accepts the connection by issuing an OSI$OPRESP
function.
(3A) The primary program issues an OSI$RECEIVE function (receive open response
format) to accept the open response.
(4A)(4B) The primary program sets a minor sync point by issuing an OSI$SYNC function
with a subfunction of OSI-SYNC-SET-CNFRM-EXPLICIT. The secondary program accepts
it by issuing an OSI$RECEIVE function (receive existing format).
(5B)(5A) The secondary program confirms the sync point by issuing an OSI$SYNC
function with a subfunction of OSI-SYNC-CONFIRM. The primary program accepts this by
issuing an OSI$RECEIVE function (receive existing format).
(6A)(6B) The primary program issues OSI$SEND functions sending data to the secondary
program, which accepts these by issuing the OSI$RECEIVE function (receive existing
format).
(7A)(7B) The primary program sets a new sync point serial number by issuing the
OSI$SYNC function with a subfunction of OSI-SYNC-SET-CNFRM-EXPLICIT. The
secondary program accepts this by issuing an OSI$RECEIVE function (receive existing
format).
(8B)(8A) The secondary program confirms the sync point by issuing an OSI$SYNC
function with a subfunction of OSI-SYNC-CONFIRM. The primary program accepts this by
issuing an OSI$RECEIVE function (receive existing format).
(9A)(9B) The primary program issues an OSI$CLOSE function to release the connection.
The secondary program accepts this by issuing an OSI$RECEIVE function (receive
existing format).
(10B)(10A) The secondary program accepts the close request by responding with an
OSI$CLRESP function. The primary program receives the close confirmation by issuing an
OSI$RECEIVE function (receive existing format).
The paired programs do not have to be the same type. TIP transactions can start batch
runs. Demand or batch runs can start TIP transactions.
1. Store an Executive Control Language (ECL) runstream that executes the program in
any program file or system data format (SDF) file on the host where DDP-PPC will
initiate the batch program after receiving an OSI$OPEN request.
2. Define a PROGRAM record with a TYPE = BATCH parameter in the Configuration
Services database on the same host as in Step 1. The PROGRAM record references
the runstream file that executes the program.
3. If the program that issues the OSI$OPEN function uses Configuration Services to
obtain the called addressing information, then the APPLICATION ENTITY record it
references through the OSI-CALLED-AE-TITLE-ALIAS parameter should contain an
S-SEL parameter that matches the name of the PROGRAM record on the remote host.
If the program that issues the OSI$OPEN function supplies its own called addressing
information, then the OSI-CALLED-S-SELECTOR parameter should match the name
of the PROGRAM record on the remote host.
To receive the OSI$OPEN request, the program executed by the ECL runstream must:
If a program is already registered with DDP-PPC using the same name that was specified in
the OSI-CALLED-S-SELECTOR parameter on an incoming request (see the parameter
description in 3.11 on the OSI$OPEN function (Table 3-27- ADDRESS packet parameters),
then:
$ A new peer program is started if the Configuration Services PROGRAM record with
the same name has its COPIES keyword set to MULTIPLE.
$ A new peer program is not started if the Configuration Services PROGRAM record with
the same name has its COPIES keyword set to SINGLE. In this case, the incoming open
request is queued to the program that is already running and registered with DDP-PPC.
Any error encountered while trying to start a runstream is returned to the program that
issued the OSI$OPEN request. The program receives the error when it issues the
OSI$RECEIVE function call to receive the open response message. In addition, errors are
written to the DDP-PPC log file on the destination host.
@RUN run-id,,proj-id
@XQT LOCAL*RUN-STREAMS.PROGBPROGRAM
@FIN
ADD PROGRAM
NAME=PROGB
TYPE=BATCH
FILE=LOCAL*RUN-STREAMS.RUNPROGB
ACCOUNT-NUMBER=ABC123
COPIES=MULTIPLE;
ADD APPLICATION-ENTITY
NAME=PUBS-PROGB
S-SEL=PROGB
T-SEL=xxxx
NSAP=xxxx
. .
$ Register your program with DDP-PPC by placing the program name (PROGA) in the
OSI-INT-AP-NAME field of OSI-REGISTER-PKT and issuing an OSI$BIND function call.
$ Specify the application entity alias name in the OSI-CALLED-AE-TITLE-ALIAS field.
This name is defined in an APPLICATION ENTITY record in the Configuration
Services database on the local host. The S-SEL keyword of this record (PROGB)
references a PROGRAM record in the Configuration Services database on the remote
host that identifies the runstream containing the execute statement for the program
you want to initiate.
$ Issue an OSI$OPEN function call.
When DDP-PPC receives the OSI$OPEN request, it starts the runstream file that initiates
the program (PROGBPROGRAM).
$ This program registers with DDP-PPC by setting the program name (PROGB) in the
OSI-INT-AP-NAME field of OSI-REGISTER-PKT.
$ It then issues an OSI$RECEIVE function call (receive new format) to receive the
incoming open request from DDP-PPC.
Note: For both methods, the MCB application group number must also be defined in
the MCB record in the Configuration Services database. See the DDP-PPC
Implementation and Administration Guide.
There must be an MCB keyword for each MCB application in which you want
to start TIP transactions. See the Transaction Processing Administration and
Operations Reference Manual for VALTAB setup information.
DDP-PPC does not schedule TIP transactions if TIP Session Control is
configured in the Exec on the host that receives the open request.
Any errors encountered while trying to start a TIP transaction are sent back to the program
that issued the OSI$OPEN request. The program receives the error when it issues the
OSI$RECEIVE function call to receive the open response message. In addition, errors are
written to the DDP-PPC log file on the destination host.
Note: DDP-PPC starts the TIP transaction by executing a CMSTOR function, which
causes a zero-length message to be created in the MCB. Your TIP transaction
should execute a TRINIT function to remove the message from the MCB.
The PROGRAM record provides the transaction code that starts the program. It also
references the MCB application under which the transaction was configured.
ADD PROGRAM
NAME=PROGBTIP
TYPE=TPX
MCB=02
CODE=TPROGB;
ADD APPLICATION-ENTITY
NAME=PUBS-PROGBTIP
S-SEL=PROGBTIP
T-SEL=xxxx
NSAP=xxxx
. .
. .
$ Register your program with DDP-PPC by placing the program name (PROGA) in the
OSI-INT-AP-NAME field of OSI-REGISTER-PKT and issuing an OSI$BIND function call.
$ Specify the application entity alias name in the OSI-CALLED-AE-TITLE-ALIAS field
(PUBS-PROGBTIP). This name is defined in an APPLICATION ENTITY record in the
Configuration Services database on the local host. The S-SEL keyword of this record
references a PROGRAM record in the Configuration Services database that contains
the transaction code (TPROGB) and MCB information to start the transaction.
$ Issue an OSI$OPEN function call.
$ The TIP program issues an OSI$RECEIVE function (receive new format) to receive the
incoming open request from DDP-PPC.
Method 2: Defining the Transaction Using the TIP$ Called Session Selector
Format
DDP-PPC automatically starts a TIP transaction when it receives an OSI$OPEN request
with the OSI-CALLED-SELECTOR field in the following format:
TIP$aatttttt
where:
TIP$
Indicates the program is a TIP application program.
aa
Is the MCB application group number that matches the AUDIT field in the VALTAB of
the TIP transaction that is to be started.
If this number is 00, DDP-PPC does a VINDEX read function to look up the AUDIT
field value in the VALTAB.
tttttt
Matches a TIP transaction code (one to six alphanumeric characters) defined in
VALTAB for the program that is to be started.
To receive the OSI$OPEN request, the TIP transaction that is started must:
The example in Figure 4-4 shows the program statements to automatically schedule a TIP
transaction using the TIP$ format of the Called Session Selector.
ADD APPLICATION-ENTITY
NAME=PUB-PROGBTIP2
S-SEL=TIP$07TRANSB
T-SEL=xxxx
NSAP=xxxx
. .
. .
Initiating Program Receiving Program
on HOST 1 on HOST 2
$ Register your program with DDP-PPC by placing the program name (PROGA) in the
OSI-INT-AP-NAME field of OSI-REGISTER-PKT and issuing an OSI$BIND function call.
$ Specify the application entity alias name in the OSI-CALLED-AE-TITLE-ALIAS field
(PUB-PROGBTIP2). This name is defined in an APPLICATION ENTITY record in the
Configuration Services database on the local host. The S-SEL keyword of this record
(TIP$07TRANSB) is the special format that contains the information DDP-PPC needs
to initiate the transaction.
When DDP-PPC receives the open request, it initiates the TIP transaction (TRANSB).
$ The TIP program registers with DDP-PPC by setting the program name
(TIP$07TRANSB) in the OSI-INT-AP-NAME field of OSI-REGISTER-PKT and issuing
an OSI$BIND function.
$ The TIP program then issues an OSI$RECEIVE function (receive new format) to
receive the incoming open request from DDP-PPC.
This section describes how to prepare programs for execution and the runstream for an
ASCII COBOL program-to-program application.
A program compiled under UCS COBOL can be dynamically linked at execution time or
statically linked using the LINK processor. The program is linked to a Unisys-supplied
object module, OSI-UCSIF-OM, that converts the COBOL function calls into DDP format.
Compile, collect, and execute DDP-PPC COBOL programs the same as any other ASCII or
UCS COBOL program. There are only three special requirements. You must:
$ You must follow the recommended MAP instructions in the collection of your
programs. Failure to do so can corrupt DDP banks, resulting in abnormal program
termination.
$ All buffer addresses, message lengths, user-ids, and conversation-ids must be correct.
Errors passed to DDP can cause abnormal program termination (that is, guard mode
violation).
$ Use only an E console keyin or @@X T command to terminate your run while in
session with DDP. Do not use an X console keyin.
LIB (ibank-name/$ODD,dbank-name/$EVEN)
LIB COBOL-relocatable-library() Parens ( ) are
LIB SYS$LIB$*DDP-PPC-1() optional. File
contains DDP
COBOL interface
relocatables.
IBANK,M ibank-name
FRSTIN user-filename.application-program-relocatable-element-name
DBANK,MC d-bank-name
FRSTIN user-filename.application-program-relocatable-element-name
END
@XQT filename.absolute-element-name
After you obtain a clean compilation, you must collect the relocatable application element
and the DDP relocatable COBOL interface element and store them as one absolute element
in a program file. The COBOL/DDP interface relocatable elements are located in the DDP
relocatable file (SYS$LIB$*DDP-PPC-1).
The packets and message buffer may reside in the same or different data banks.
Multiple activities are supported only if they are generated using the ASCII COBOL
synchronous processing feature.
The packets and message buffer may reside in the same bank or different banks.
$ B.1 is the ASCII COBOL ECL runstream for the session-level primary program in B.3.
$ B.2 is the UCS COBOL ECL runstream for the session-level primary program in B.3.
$ B.4 is the ASCII COBOL ECL runstream for the session-level secondary program in B.6.
$ B.5 is the UCS COBOL ECL runstream for the session-level secondary program in B.6.
$ B.7 is the ASCII COBOL ECL runstream for the application-level primary program in
B.9.
$ B.8 is the UCS COBOL ECL runstream for the application-level primary program in B.9.
$ B.10 is the ASCII COBOL ECL runstream for the application-level primary program in
B.12.
$ B.11 is the UCS COBOL ECL runstream for the application-level primary program in
B.12.
Step Description
1 Add a data type to the data packet for OSI$SOPEN, OSI$SYNC, OSI$SEND,
OSI$RECEIVE, and OSI$OPRESP procedure division routines. For example:
MOVE 140 TO OSI-DATA-TYPE.
2 Change the service entry point in the connect packet from session-level entry to
application-level entry in both the OSI$OPEN and OSI$RECEIVE procedure division
routines. For example:
MOVE 7 TO OSI-SERVICE-ENTRY.
3 Initialize the context table syntaxes in the application presentation packet for
OSI$OPEN and OSI$OPRESP to the corresponding abstract and transfer syntaxes.
For example:
MOVE 1 TO OSI-PRESENTATION-CONTEXT-IDENT (1).
MOVE 'ACSE-AS' TO OSI-ABSTRACT-SYNTAX-ALIAS(1).
MOVE 'ACN1-TS' TO OSI-TRANSFER-SYNTAX-ALIAS(1).
MOVE 2 TO OSI-PRES-CONTEXT-TABLE-ENTRIES.
4 Set an application context name alias in the application presentation packet. For
example:
MOVE 'MYAPPL' TO OSI-APPL-CONTEXT-NAME-ALIAS.
TYPE EXTDIAG
NOT TPF$.
LIB (I$1/$ODD,D$2/$EVEN)
LIB sys$lib$*acob()
LIB ppc-rel()
IBANK,M I$1
FRSTIN rel.acobosi5pri/7r1
DBANK,UMC D$2
FRSTIN rel.acobosi5pri/7r1
END
01 SEND-MESSAGE-1.
05 FILLER PIC X(51) VALUE
'THIS WAS THE 1ST MESSAGE SENT WITH A SEND FUNCTION '.
05 FILLER PIC X(21) VALUE 'IN THIS CONVERSATION.'.
*
01 SEND-MESSAGE-2.
05 FILLER PIC X(54) VALUE
'THIS WAS THE LAST MESSAGE SENT BY THE CALLING PROGRAM '.
/
COPY OSI-PKT.
/
PROCEDURE DIVISION.
******************************************************************
* *
* BIND - AP NAME IS FIXED AT SAMPLE-PROGRAM-1 *
* *
* *
******************************************************************
0100-BIND-ROUTINE.
COPY OSI-BIND.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'BIND CLASS IS ', AP-CLASS-CODE, ' STATUS IS ',
AP-DETAIL-STATUS, ' SPECIFIC ERROR IS ',
AP-SPECIFIC-ERROR, '.'.
******************************************************************
* *
* *
* SETUP PACKETS TO OPEN CONVERSATION *
* *
* *
******************************************************************
0200-OPEN-CONVERSATION.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE OPEN-MESSAGE TO OUTPUT-MESSAGE-AREA.
MOVE 132 TO OSI-TEXT-LENGTH.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 0 TO OSI-SYNC-POINT-SERIAL-NUMBER.
MOVE 5 TO OSI-SERVICE-ENTRY.
MOVE 1 TO OSI-SESSION-VERSION-1.
MOVE 1 TO OSI-SESSION-VERSION-2.
MOVE 0 TO FUNC-UNIT-TYPED-DATA.
MOVE 0 TO FUNC-UNIT-EXCEPTIONS.
MOVE 0 TO FUNC-UNIT-CAP-DATA.
MOVE 0 TO FUNC-UNIT-ACT-MGT.
MOVE 0 TO FUNC-UNIT-RESYNC.
MOVE 1 TO FUNC-UNIT-MINOR-SYNC.
MOVE 0 TO FUNC-UNIT-DUPLEX.
MOVE 1 TO FUNC-UNIT-HALF-DUPLEX.
MOVE 0 TO FUNC-UNIT-DATA-SEP.
MOVE 0 TO SCI-CALLING-REFERENCE-LEN.
MOVE 0 TO SCI-COMMON-REFERENCE-LEN.
MOVE 0 TO SCI-ADDITIONAL-REFERENCE-LEN.
ACCEPT AE-ALIAS.
INSPECT AE-ALIAS REPLACING CHARACTERS BY ' ' AFTER
INITIAL SPACE.
MOVE AE-ALIAS TO OSI-CALLED-AE-TITLE-ALIAS.
ACCEPT AE-ALIAS.
INSPECT AE-ALIAS REPLACING CHARACTERS BY ' ' AFTER
INITIAL SPACE.
MOVE AE-ALIAS TO OSI-CALLING-AE-TITLE-ALIAS.
COPY OSI-OPEN.
******************************************************************
* *
* *
* RECEIVE OPEN RESPONSE FROM SAMPLE-PROGRAM-2 *
* *
* *
******************************************************************
*
0300-RECEIVE-OPEN-RESPONSE.
PERFORM 4000-RECEIVE-MSG.
IF NOT OSI-CN-ACCEPTED
DISPLAY 'PEER REFUSED OPEN REQUEST DUE TO REASON ',
OSI-SESSION-RESULT
GO TO 9000-ABNORMAL-TERMINATION.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
B - 3787 3296-200
Session-level Entry Primary Program
* *
* SYNC WITH CONFIRM REQUESTED *
* *
* *
*****************************************************************
0400-SYNC-1.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE SYNC CONFIRM *
* *
* *
*****************************************************************
0500-RECEIVE-SYNC-1-CONFIRM.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SEND 1ST MESSAGE *
* *
* *
*****************************************************************
0600-SEND-MSG-1.
PERFORM 3000-SEND-MSG.
*****************************************************************
* *
* *
* SEND LAST MESSAGE *
* *
* *
*****************************************************************
0700-SEND-MSG-2.
PERFORM 3000-SEND-MSG.
*****************************************************************
* *
* *
* SYNC WITH CONFIRM REQUESTED *
* *
* *
*****************************************************************
0800-SYNC-2.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE SYNC CONFIRM *
* *
* *
*****************************************************************
0810-RECEIVE-SYNC-2-CONFIRM.
MOVE 0 TO OSI-MODE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SETUP FOR CLOSE *
* *
* *
*****************************************************************
0900-CLOSE.
COPY OSI-CLOSE.
*****************************************************************
* *
* *
* RECEIVE CLOSE CONFIRM *
* *
* *
*****************************************************************
1000-RECEIVE-CLRESP.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SETUP FOR UNBIND *
* *
* *
*****************************************************************
1100-UNBIND.
COPY OSI-UNBIND.
MOVE 0 TO BOUND.
MOVE 1 TO DONE.
*****************************************************************
* *
* TERMINATE PROGRAM *
* *
* *
*****************************************************************
1200-NORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'NORMAL TERMINATION.'.
STOP RUN.
*****************************************************************
* *
B - 3
Session-level Entry Primary Program
* *
* SETUP PACKET FOR SYNC *
* *
* *
*****************************************************************
2000-SYNC-WITH-CONFIRM.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-SYNC-FUNC.
MOVE 0 TO OSI-SYNC-DATA-SEP.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 0 TO OSI-SYNC-POINT-SERIAL-NUMBER.
COPY OSI-SYNC.
2001-SYNC-END.
EXIT.
*****************************************************************
* *
* *
* SETUP PACKET FOR SEND *
* *
* *
*****************************************************************
3000-SEND-MSG.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 30 TO OSI-FLWCTL-WAIT.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
COPY OSI-SEND.
3001-SEND-END.
EXIT.
*****************************************************************
* *
* *
* SETUP PACKETS FOR RECEIVE *
* *
* *
*****************************************************************
4000-RECEIVE-MSG.
COPY OSI-RECEIVE.
4001-RECEIVE-END.
EXIT.
*****************************************************************
* *
* *
* ABNORMAL TERMINATION *
* *
* *
*****************************************************************
9000-ABNORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'ABNORMAL TERMINATION.'.
*
*
STOP RUN.
TYPE EXTDIAG
NOT TPF$.
LIB (I$1/$ODD,D$2/$EVEN)
LIB sys$lib$*acob()
LIB ppc-rel()
IBANK,M I$1
FRSTIN rel.acobosi5sec/7r1
DBANK,UMC D$2
FRSTIN rel.acobosi5sec/7r1
END
01 CLRESP-MESSAGE.
05 FILLER PIC X(47) VALUE
******************************************************************
* *
* BIND - AP NAME IS FIXED AT SAMPLE-PROGRAM-1 *
* *
* *
******************************************************************
0100-BIND-ROUTINE.
DISPLAY
'ENTER THE S-SELECTOR NAME (FROM CS-DATA BASE S-SELECTOR).'.
ACCEPT S-SELECTOR.
COPY OSI-BIND.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'BIND CLASS IS ', AP-CLASS-CODE, ' STATUS IS ',
******************************************************************
* *
* *
* RECEIVE-NEW *
* *
* *
******************************************************************
*
0200-RECEIVE-NEW.
PERFORM 4000-RECEIVE-MSG.
******************************************************************
* *
* *
* SETUP PACKETS FOR OPRESP *
* *
* *
******************************************************************
0300-OPRESP.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE OPRESP-MESSAGE TO OUTPUT-MESSAGE-AREA.
MOVE 132 TO OSI-TEXT-LENGTH.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 0 TO OSI-SYNC-POINT-SERIAL-NUMBER.
MOVE 0 TO OSI-SESSION-RESULT.
MOVE 0 TO OSI-SESSION-VERSION-1.
MOVE 1 TO OSI-SESSION-VERSION-2.
MOVE 0 TO FUNC-UNIT-TYPED-DATA.
MOVE 0 TO FUNC-UNIT-EXCEPTIONS.
MOVE 0 TO FUNC-UNIT-CAP-DATA.
MOVE 0 TO FUNC-UNIT-ACT-MGT.
MOVE 0 TO FUNC-UNIT-RESYNC.
MOVE 1 TO FUNC-UNIT-MINOR-SYNC.
MOVE 0 TO FUNC-UNIT-DUPLEX.
MOVE 1 TO FUNC-UNIT-HALF-DUPLEX.
MOVE 0 TO FUNC-UNIT-DATA-SEP.
MOVE 0 TO SCI-CALLED-REFERENCE-LEN.
MOVE 0 TO SCI-COMMON-REFERENCE-LEN.
MOVE 0 TO SCI-ADDITIONAL-REFERENCE-LEN.
COPY OSI-OPRESP.
******************************************************************
* *
* *
* RECEIVE 1ST SYNC *
* *
* *
******************************************************************
*
0400-RECEIVE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* CONFIRM 1ST SYNC *
* *
* *
*****************************************************************
0410-SYNC-1.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE 1ST MESSAGE *
* *
* *
*****************************************************************
0500-RECEIVE-1.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
******************************************************************
* *
* *
* RECEIVE LAST MESSAGE *
* *
* *
******************************************************************
*
0510-RECEIVE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* RECEIVE 2ND SYNC *
* *
* *
*****************************************************************
0520-RECEIVE-SYNC-2.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* CONFIRM 2ND SYNC *
* *
* *
*****************************************************************
0530-SYNC-MSG-2.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE CLOSE MESSAGE *
* *
B - 3
Session-level Entry Secondary Program
* *
*****************************************************************
0600-RECEIVE-CLOSE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SETUP FOR CLRESP *
* *
* *
*****************************************************************
0900-CLRESP.
COPY OSI-CLRESP.
*****************************************************************
* *
* *
* SETUP FOR UNBIND *
* *
* *
*****************************************************************
1100-UNBIND.
COPY OSI-UNBIND.
MOVE 0 TO BOUND.
MOVE 1 TO DONE.
*****************************************************************
* *
* TERMINATE PROGRAM *
* *
* *
*****************************************************************
1200-NORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'NORMAL TERMINATION.'.
STOP RUN.
*****************************************************************
* *
* *
* SETUP PACKET FOR SYNC *
* *
* *
*****************************************************************
2000-SYNC-WITH-CONFIRM.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 2 TO OSI-SYNC-FUNC.
MOVE 0 TO OSI-SYNC-DATA-SEP.
COPY OSI-SYNC.
2001-SYNC-END.
EXIT.
*****************************************************************
* *
* *
* SETUP PACKETS FOR RECEIVE *
* *
* *
*****************************************************************
4000-RECEIVE-MSG.
COPY OSI-RECEIVE.
4001-RECEIVE-END.
EXIT.
*****************************************************************
* *
* *
* ABNORMAL TERMINATION *
* *
* *
*****************************************************************
9000-ABNORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'ABNORMAL TERMINATION.'.
*
*
STOP RUN.
TYPE EXTDIAG
NOT TPF$.
LIB (I$1/$ODD,D$2/$EVEN)
LIB sys$lib$*acob()
LIB ppc-rel()
IBANK,M I$1
FRSTIN rel.acobosi7pri/7r1
DBANK,UMC D$2
FRSTIN rel.acobosi7pri/7r1
END
01 SEND-MESSAGE-1.
05 FILLER PIC X(51) VALUE
'THIS WAS THE 1ST MESSAGE SENT WITH A SEND FUNCTION '.
05 FILLER PIC X(21) VALUE 'IN THIS CONVERSATION.'.
*
01 SEND-MESSAGE-2.
/
COPY OSI-PKT.
/
PROCEDURE DIVISION.
******************************************************************
* *
* BIND - AP NAME IS FIXED AT SAMPLE-PROGRAM-1 *
* *
* *
******************************************************************
0100-BIND-ROUTINE.
COPY OSI-BIND.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'BIND CLASS IS ', AP-CLASS-CODE, ' STATUS IS ',
AP-DETAIL-STATUS, ' SPECIFIC ERROR IS ',
AP-SPECIFIC-ERROR, '.'.
******************************************************************
* *
* *
* SETUP PACKETS TO OPEN CONVERSATION *
* *
* *
******************************************************************
0200-OPEN-CONVERSATION.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE OPEN-MESSAGE TO OUTPUT-MESSAGE-AREA.
MOVE 132 TO OSI-TEXT-LENGTH.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 0 TO OSI-SYNC-POINT-SERIAL-NUMBER.
MOVE 140 TO OSI-DATA-TYPE.
MOVE 7 TO OSI-SERVICE-ENTRY.
MOVE 1 TO OSI-SESSION-VERSION-1.
MOVE 1 TO OSI-SESSION-VERSION-2.
MOVE 0 TO FUNC-UNIT-TYPED-DATA.
MOVE 0 TO FUNC-UNIT-EXCEPTIONS.
MOVE 0 TO FUNC-UNIT-CAP-DATA.
MOVE 0 TO FUNC-UNIT-ACT-MGT.
MOVE 0 TO FUNC-UNIT-RESYNC.
MOVE 1 TO FUNC-UNIT-MINOR-SYNC.
MOVE 0 TO FUNC-UNIT-DUPLEX.
MOVE 1 TO FUNC-UNIT-HALF-DUPLEX.
MOVE 0 TO FUNC-UNIT-DATA-SEP.
MOVE 0 TO SCI-CALLING-REFERENCE-LEN.
MOVE 0 TO SCI-COMMON-REFERENCE-LEN.
MOVE 0 TO SCI-ADDITIONAL-REFERENCE-LEN.
MOVE 0 TO OSI-PRES-MODE.
MOVE 0 TO OSI-CALLED-P-INVOC-ID-LEN.
MOVE 0 TO OSI-CALLED-E-INVOC-ID-LEN.
MOVE 0 TO OSI-CALLING-P-INVOC-ID-LEN.
MOVE 0 TO OSI-CALLING-E-INVOC-ID-LEN.
MOVE 2 TO OSI-PRES-CONTEXT-TABLE-ENTRIES.
MOVE 1 TO OSI-PRES-CONTEXT-IDENT(1).
MOVE 'ACSE-AS ' TO
OSI-ABSTRACT-SYNTAX-ALIAS(1).
MOVE 'ASN1-TS ' TO
OSI-TRANSFER-SYNTAX-ALIAS(1).
MOVE 3 TO OSI-PRES-CONTEXT-IDENT(2).
MOVE 'OIW-OCTET-AS ' TO
OSI-ABSTRACT-SYNTAX-ALIAS(2).
MOVE 'ASN1-TS ' TO
OSI-TRANSFER-SYNTAX-ALIAS(2).
ACCEPT AE-ALIAS.
INSPECT AE-ALIAS REPLACING CHARACTERS BY ' ' AFTER
INITIAL SPACE.
MOVE AE-ALIAS TO OSI-CALLED-AE-TITLE-ALIAS.
ACCEPT AE-ALIAS.
INSPECT AE-ALIAS REPLACING CHARACTERS BY ' ' AFTER
INITIAL SPACE.
MOVE AE-ALIAS TO OSI-CALLING-AE-TITLE-ALIAS.
COPY OSI-OPEN.
******************************************************************
* *
* *
* RECEIVE OPEN RESPONSE FROM SAMPLE-PROGRAM-2 *
* *
* *
******************************************************************
*
0300-RECEIVE-OPEN-RESPONSE.
PERFORM 4000-RECEIVE-MSG.
IF NOT OSI-AU-ASSOC-ACCEPTED
DISPLAY 'PEER REFUSED OPEN REQUEST DUE TO REASON ',
OSI-APPL-PRES-RESULT
GO TO 9000-ABNORMAL-TERMINATION.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SYNC WITH CONFIRM REQUESTED *
* *
* *
*****************************************************************
0400-SYNC-1.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE SYNC CONFIRM *
* *
* *
*****************************************************************
0500-RECEIVE-SYNC-1-CONFIRM.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SEND 1ST MESSAGE *
* *
* *
*****************************************************************
0600-SEND-MSG-1.
PERFORM 3000-SEND-MSG.
*****************************************************************
* *
* *
* SEND LAST MESSAGE *
* *
* *
*****************************************************************
0700-SEND-MSG-2.
PERFORM 3000-SEND-MSG.
*****************************************************************
* *
* *
* SYNC WITH CONFIRM REQUESTED *
* *
* *
*****************************************************************
0800-SYNC-2.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE SYNC CONFIRM *
* *
* *
*****************************************************************
0810-RECEIVE-SYNC-2-CONFIRM.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SETUP FOR CLOSE *
* *
* *
*****************************************************************
0900-CLOSE.
COPY OSI-CLOSE.
*****************************************************************
* *
* *
* RECEIVE CLOSE CONFIRM *
* *
* *
*****************************************************************
1000-RECEIVE-CLRESP.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SETUP FOR UNBIND *
* *
* *
*****************************************************************
1100-UNBIND.
COPY OSI-UNBIND.
MOVE 0 TO BOUND.
MOVE 1 TO DONE.
*****************************************************************
* *
* TERMINATE PROGRAM *
* *
* *
*****************************************************************
1200-NORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'NORMAL TERMINATION.'.
STOP RUN.
*****************************************************************
* *
* *
* SETUP PACKET FOR SYNC *
* *
* *
*****************************************************************
2000-SYNC-WITH-CONFIRM.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-SYNC-FUNC.
MOVE 0 TO OSI-SYNC-DATA-SEP.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 0 TO OSI-SYNC-POINT-SERIAL-NUMBER.
MOVE 140 TO OSI-DATA-TYPE.
COPY OSI-SYNC.
2001-SYNC-END.
EXIT.
*****************************************************************
* *
* *
* SETUP PACKET FOR SEND *
* *
* *
*****************************************************************
3000-SEND-MSG.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 30 TO OSI-FLWCTL-WAIT.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 140 TO OSI-DATA-TYPE.
COPY OSI-SEND.
3001-SEND-END.
EXIT.
*****************************************************************
* *
* *
* SETUP PACKETS FOR RECEIVE *
* *
* *
*****************************************************************
4000-RECEIVE-MSG.
COPY OSI-RECEIVE.
4001-RECEIVE-END.
EXIT.
*****************************************************************
* *
* *
* ABNORMAL TERMINATION *
* *
* *
*****************************************************************
9000-ABNORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'ABNORMAL TERMINATION.'.
*
*
STOP RUN.
TYPE EXTDIAG
NOT TPF$.
LIB (I$1/$ODD,D$2/$EVEN)
LIB sys$lib$*acob()
LIB ppc-rel()
IBANK,M I$1
FRSTIN rel.acobosi7sec/7r1
DBANK,UMC D$2
FRSTIN rel.acobosi7sec/7r1
END
01 CLRESP-MESSAGE.
05 FILLER PIC X(47) VALUE
******************************************************************
* *
* BIND - AP NAME IS FIXED AT SAMPLE-PROGRAM-1 *
* *
* *
******************************************************************
0100-BIND-ROUTINE.
DISPLAY
'ENTER THE S-SELECTOR NAME (FROM CS-DATA BASE S-SELECTOR).'.
ACCEPT S-SELECTOR.
COPY OSI-BIND.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'BIND CLASS IS ', AP-CLASS-CODE, ' STATUS IS ',
AP-DETAIL-STATUS, ' SPECIFIC ERROR IS ',
AP-SPECIFIC-ERROR, '.'.
******************************************************************
* *
* *
* RECEIVE-NEW *
* *
* *
******************************************************************
*
0200-RECEIVE-NEW.
PERFORM 4000-RECEIVE-MSG.
******************************************************************
* *
* *
* SETUP PACKETS FOR OPRESP *
* *
* *
******************************************************************
0300-OPRESP.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE OPRESP-MESSAGE TO OUTPUT-MESSAGE-AREA.
MOVE 132 TO OSI-TEXT-LENGTH.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 0 TO OSI-SYNC-POINT-SERIAL-NUMBER.
MOVE 140 TO OSI-DATA-TYPE.
MOVE 0 TO OSI-SESSION-RESULT.
MOVE 0 TO OSI-SESSION-VERSION-1.
MOVE 1 TO OSI-SESSION-VERSION-2.
MOVE 0 TO FUNC-UNIT-TYPED-DATA.
MOVE 0 TO FUNC-UNIT-EXCEPTIONS.
MOVE 0 TO FUNC-UNIT-CAP-DATA.
MOVE 0 TO FUNC-UNIT-ACT-MGT.
MOVE 0 TO FUNC-UNIT-RESYNC.
MOVE 1 TO FUNC-UNIT-MINOR-SYNC.
MOVE 0 TO FUNC-UNIT-DUPLEX.
MOVE 1 TO FUNC-UNIT-HALF-DUPLEX.
MOVE 0 TO FUNC-UNIT-DATA-SEP.
MOVE 0 TO SCI-CALLED-REFERENCE-LEN.
MOVE 0 TO SCI-COMMON-REFERENCE-LEN.
MOVE 0 TO SCI-ADDITIONAL-REFERENCE-LEN.
IF NOT OSI-PU-CONTEXT-ACCEPTED(1)
OR
NOT OSI-PU-CONTEXT-ACCEPTED(2)
GO TO 9000-ABNORMAL-TERMINATION.
MOVE 0 TO OSI-CONTEXT-INDICATOR(1).
MOVE 0 TO OSI-CONTEXT-INDICATOR(2).
COPY OSI-OPRESP.
******************************************************************
* *
* *
* RECEIVE 1ST SYNC *
* *
* *
******************************************************************
*
0400-RECEIVE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* CONFIRM 1ST SYNC *
* *
* *
*****************************************************************
0410-SYNC-1.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE 1ST MESSAGE *
* *
* *
*****************************************************************
0500-RECEIVE-1.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
******************************************************************
* *
* *
* RECEIVE LAST MESSAGE *
* *
* *
******************************************************************
*
0510-RECEIVE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* RECEIVE 2ND SYNC *
* *
* *
*****************************************************************
0520-RECEIVE-SYNC-2.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* CONFIRM 2ND SYNC *
* *
* *
*****************************************************************
0530-SYNC-MSG-2.
PERFORM 2000-SYNC-WITH-CONFIRM.
*****************************************************************
* *
* *
* RECEIVE CLOSE MESSAGE *
* *
* *
*****************************************************************
0600-RECEIVE-CLOSE.
PERFORM 4000-RECEIVE-MSG.
DISPLAY INPUT-MESSAGE-AREA.
*****************************************************************
* *
* *
* SETUP FOR CLRESP *
* *
* *
*****************************************************************
0900-CLRESP.
COPY OSI-CLRESP.
*****************************************************************
* *
* *
* SETUP FOR UNBIND *
* *
* *
*****************************************************************
1100-UNBIND.
COPY OSI-UNBIND.
MOVE 0 TO BOUND.
MOVE 1 TO DONE.
*****************************************************************
* *
* TERMINATE PROGRAM *
* *
* *
*****************************************************************
1200-NORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'NORMAL TERMINATION.'.
STOP RUN.
*****************************************************************
* *
* *
* SETUP PACKET FOR SYNC *
* *
* *
*****************************************************************
2000-SYNC-WITH-CONFIRM.
MOVE 0 TO OSI-BUFFER-OFFSET.
MOVE 1 TO OSI-UNIT-INDICATOR.
MOVE 0 TO OSI-DATA-TOKEN, OSI-SYNC-MINOR-TOKEN,
OSI-ACT-MAJOR-TOKEN.
MOVE 140 TO OSI-DATA-TYPE.
MOVE 2 TO OSI-SYNC-FUNC.
MOVE 0 TO OSI-SYNC-DATA-SEP.
COPY OSI-SYNC.
2001-SYNC-END.
EXIT.
*****************************************************************
* *
* *
* SETUP PACKETS FOR RECEIVE *
* *
* *
*****************************************************************
4000-RECEIVE-MSG.
COPY OSI-RECEIVE.
4001-RECEIVE-END.
EXIT.
*****************************************************************
* *
* *
* ABNORMAL TERMINATION *
* *
* *
*****************************************************************
9000-ABNORMAL-TERMINATION.
DISPLAY LOCAL-PROGRAM-NAME.
DISPLAY 'ABNORMAL TERMINATION.'.
*
*
STOP RUN.
Table C-1 and Table C-2 show the relationship between the DDP-PPC COBOL functions
and the ISO/OSI services that are invoked. Table C-3 shows the relationship between the
OSI parameters and the DDP-PPC COBOL fields.
continued
Table C-3. Relationship between OSI Parameters and DDP-PPC COBOL Fields
continued
Table C-3. Relationship between OSI Parameters and DDP-PPC COBOL Fields (cont.)
continued
Table C-3. Relationship between OSI Parameters and DDP-PPC COBOL Fields (cont.)