Reference

This document covers the following topics:


Methods

This section describes the methods of Broker ActiveX Control.

Broker ACI

The following methods are useful for writing applications using the native interface.

Method Description
BSTR GetReceiveData() Return the received data inner string
BSTR GetErrorText() Return the last received error message.
BOOL SetSendDataLong(String, Long) or BOOL SetSendData (String, Short) Copy user's data buffer into the send buffer.
BOOL InvokeBrokerFunction() Invoke the broker function call. Set the properties Function and Option.

Transaction Objects

Method Description
Bool DefineTOMethods(String) Starts the TO editor. If you specify a valid TOR name, this TO is then loaded into the editor. If a valid TOR name is not specified, the currently loaded TO will be displayed or an empty editor will be started.
Bool LoadTransObject(String) Loads and initializes a transaction object. You must specify a valid TOR file name; otherwise FALSE will be returned.
Object CreateTransObject(String) Loads and initializes a transaction object. You must specify a valid TOR file name. An object reference will be returned, which can be used to call the methods defined in the TO. If loading fails, a null reference will be returned.
Object CreateTransObjectSA(String) This method uses the safe array implementation for arrays instead of the collection implementation. If you experience problems accessing arrays with an automation controller, try using this method to instantiate a TOR object.

Properties

Most properties of Broker ActiveX Control correspond to the Broker ACI fields. The properties must be set to the appropriate values before using any function.

If transaction object repository (TOR) files are used, it will not be necessary to set all the properties. See Transaction Objects in Broker ActiveX Control. The properties can also be supplied by means of the property pages (see Using the Property Pages).

Property Name Broker ACI Field Format Length API Version Description
AdapterError not used String 8 2  
AdCount not used Long   2  
APIVersion API-VERSION Short   2 Possible values: 1, 2, 3, 4, 5, 6, 7, 8, 9.

The default is 2. This value can be changed dynamically by setting the property. If the current value of the Function or Option property requires a minimal API version, the value of APIVersion will be adjusted automatically.

BrokerID BROKER-ID String 32 1 Target Broker ID. See Using the Broker ID in Applications and details on TCP/IP in Transport Methods.
BrokerSecurity KERNELSECURITY String 1 7  
ClientUserid CLIENT-UID String 32 2 The partner's user ID.
CommitTime COMMITTIME String 17 7 Readonly property.
Time when UOW was committed.
Format: YYYYMMDDHHMMSSms
ms = milliseconds in Possible Values field.
CompressLevel COMPRESSLEVEL String 1 7 Compression level. Possible values: N/Y/0-9.

The first character of the string will be used as the compression value. If you type YES, the character Y will be used and ES will be cut off. Example: Broker1.CompressLevel = "6".

See also Data Compression.

ConvID CONV-ID String 16 1 Conversation ID, see Managing Conversation Contexts.
ConvStatus CONV-STAT Short   2
Contains the status of the conversation when the RECEIVE function is complete. See Managing Conversation Contexts. Possible values:
1 NEW
2 OLD
3 NONE
EncryptionLevel   Short   6 Deprecated. For encrypted transport we strongly recommend using the Secure Sockets Layer/Transport Layer Security protocol. See SSL/TLS, HTTP(S), and Certificates with EntireX.
Environment ENVIRONMENT String 32 1 Pass additional information to Translation User Exit. For more information see ACI ENVIRONMENT.
ErrorCode ERROR-CODE String 8 1 Broker error code, see Error Handling.
ErrorMsg not used String 40 1 Contains the error message to the corresponding error code.
ForceLogon FORCE-LOGON Boolean   6 Possible values: Y, N.
Function
FUNCTION
Possible values:
1 SEND
2 RECEIVE
4 UNDO
5 EOC
6 REGISTER
7 DEREGISTER
8 VERSION
9 LOGON
10 LOGOFF
13 SYNCPOINT
14 KERNELVERS
Short   1 The functions to be performed by Broker.
localeString LOCALE-STRING String 40 4 The Broker ActiveX Control uses the Windows ANSI codepage to convert the Unicode (UTF-16) representation within BSTRINGS to the encoding sent to or received from the broker. This codepage is also transferred as part of the locale string to tell the broker the encoding of the data. It is not possible to use any codepage other than the codepage configured for Windows in the Regional Settings. If you want to adapt the Windows ANSI codepage, see the Regional Settings in the Windows Control Panel and your Windows documentation.

Enable character conversion in the broker by setting the service-specific attribute CONVERSION to "SAGTCHA". See also Configuring ICU Conversion under z/OS | UNIX | Windows | BS2000. More information can be found under Internationalization with EntireX.

MessageId not used String 32 2  
MessageType not used String 32 2  
NewPassword NEWPASSWORD String 32 2  
Option
OPTION

Possible values:

0 NULL
1 MSG
2 HOLD
3 IMMED
4 QUIESCE
5 EOC
6 CANCEL
7 LAST
8 NEXT
9 PREVIEW
10 COMMIT
11 BACKOUT
12 SYNC
13 ATTACH
14 DELETE
15 EOCCANCEL
16 QUERY
17 SETUSTATUS
18 ANY
19 no longer used
20 no longer used
21 CHECKSERVICE
Short   1  
Password PASSWORD String 32 1  
ReceiveBufferLength RECEIVE-LENGTH Long   3 Length of the receive buffer.
ReceiveBufferSize RECEIVE-LENGTH Short   1 This is an old property. Can be used instead of ReceiveBufferLength - for buffers with less than 32 KB only.
ReturnDataLength RETURN-LENGTH Long   3 Length of returned data.
ReturnLength RETURN-LENGTH Short   1 This is an old property. Can be used instead of ReturnDataLength - for buffers with less than 32 KB only.
SecurityToken SECURITY-TOKEN String 32 2 This is handled automatically, but can be filled in by the user if required.
SendBufferSize   Short   1 No longer used.
ServerClass SERVER-CLASS String 32 1 These three Broker parameters form the target service.
ServerName SERVER-NAME String 32 1
Service SERVICE String 32 1
Store STORE Short   2
Possible values:
0 NULL
1 OFF
2 BROKER
Token TOKEN String 32 1  
UOWID UOWID String 16 3  
UOWStatus
UOWSTATUS

Possible values:

0 NONE
1 RECEIVED
2 ACCEPTED
3 DELIVERED
4 BACKEDOUT
5 PROCESSED
6 CANCELLED
7 TIMEOUT
8 DISCARDED
9 FIRST
10 MIDDLE
11 LAST
12 ONLY
Short   3  
UOWStatusPersist UOW-STATUS-PERSIST Short   3  
UOWTime UWTIME String 8 3  
UserData USER-DATA String 16 2 This field is not converted by the Broker. If the field contains H'00', only the data up to the first H'00' will be sent.
UserID USER-ID String 32 1 User ID.
UserStatus USTATUS String 32 3  
Wait WAIT String 8 1 Possible values: Yes No <n>S - waiting n Seconds (max 99999) <n>M - waiting n Minutes (Max 99999) <n>H - waiting n Hours (max 99999). See Blocked and Non-blocked Broker Calls.
UOWStatusLife   String 8 8