Enables APPC and DTP programming.
#include <iccseseh.hpp>
class
{
protected:
IccSession();
public:
IccSession(const IccPartnerId&);
IccSession(const IccSysId& sysId);
IccSession(const char* sysName);
void allocate(AllocateOpt option=queue);
void connectProcess(SyncLevel level,
const IccTransId& transId,
const IccBuf* PIP=0);
void connectProcess(syncLevel level,
const IccTPNameId& TPName,
const IccBuf* PIP=0);
const IccBuf& converse(const IccBuf& send);
const IccConvId& convId();
const char* errorCode() const;
void extractProcess();
void flush();
void free();
virtual const IccBuf& get();
Icc::Bool isErrorSet() const;
Icc::Bool isNoDataSet() const;
Icc::Bool isSignalSet() const;
void issueAbend();
void issueConfirmation();
void issueError();
void issueSignal();
IccBuf& PIPList();
const IccBuf& process() const;
virtual void put(const IccBuf& data);
const IccBuf& receive();
void send(const IccBuf& send,
SendOpt option=normal);
void send(sendOpt option=normal);
void sendInvite(const IccBuf& send,
SendOpt option=normal);
void sendInvite(SendOpt option=normal);
void sendLast(const IccBuf& send,
SendOpt option=normal);
void sendLast(SendOpt option=normal);
IccValue::CVDA state(StateOpt option=lastCommand);
const char* stateText(StateOpt option=lastCommand);
SyncLevel syncLevel() const;
type enum {
queue,
noQueue,
} AllocateOpt,
type enum {
normal,
confirmation,
wait,
} SendOpt;
type enum {
lastCommand,
extractState,
} StateOpt;
type enum {
level0,
level1,
} SyncLevel;
};
The IccSession class enables APPC and DTP programming.
IccSession constructor
protected IccSession();
This constructor is for back end DTP CICS® tasks that have a session as their principal facility. In this case, the application program uses the session method on the IccControl object to gain access to their IccSession object.
IccSession constructor (1)
IccSession(const IccPartnerId&);
IccSession constructor (2)
IccSession(const IccSysId& sysId);
IccSession constructor (3)
IccSession(const char* sysName);
IccSession::allocate
void allocate(AllocateOpt option=queue);
This method establishes a session (communication channel) to the remote system.
Equivalent EXEC CICS call: ALLOCATE
Conditions: INVREQ, SYSIDERR
IccSession::connectProcess (1)
void connectProcess(SyncLevel level,
const IccTransId& transId,
const IccBuf* PIP=0);
Equivalent EXEC CICS call: CONNECT PROCESS CONVID
IccSession::connectProcess (2)
void connectProcess(SyncLevel level,
const IccTPNameId& TPName,
const IccBuf* PIP=0);
This method starts a partner process on the remote system in preparation for sending and receiving information.
Equivalent EXEC CICS call: CONNECT PROCESS CONVID
Conditions: INVREQ, LENGERR, NOTALLOC, CBIDERR (Open Systems only), SYSIDERR (Open Systems only), SYSBUSY (Open Systems only)
IccSession::converse
const IccBuf& converse(const IccBuf& send);
This method sends the contents of send and returns a reference to an IccBuf object that holds the reply from the remote APPC partner.
Equivalent EXEC CICS call: CONVERSE CONVID
Conditions: INVREQ, LENGERR, NOTALLOC, SIGNAL, TERMERR
IccSession::convId
const IccConvId& convId();
This method returns a reference to an IccConvId object that contains the four-byte conversation identifier.
IccSession::errorCode
const char* errorCode() const;
This method returns the four-byte error code that is received when isErrorSet remains true. See the relevant DTP Guide for more information.
IccSession::extractProcess
void extractProcess();
This method retrieves information from an APPC conversation attach header and holds it inside the object. See PIPList, process, and syncLevel methods to retrieve the information from the object. This method should be used by the back end task if it wants access to the PIP data, the process name, or the synclevel under which it is running.
Equivalent EXEC CICS call: EXTRACT PROCESS CONVID
Conditions: INVREQ, NOTAUTH
IccSession::flush
void flush();
This method ensures that accumulated data and control information are transmitted on an APPC mapped conversation.
Equivalent EXEC CICS call: WAIT CONVID
Conditions: INVREQ, NOTALLOC
IccSession::free
void free();
This method returns the APPC session to CICS so that it can be used by other tasks.
Equivalent EXEC CICS call: FREE CONVID
Conditions: INVREQ, NOTALLOC
IccSession::get
virtual const IccBuf& get();
This method is a synonym for receive. See Polymorphic behavior for more information about polymorphism.
IccSession::isErrorSet
Icc::Bool isErrorSet() const;
This method returns a Boolean variable, which is defined in Icc structure, that indicates whether an error has been set.
IccSession::isNoDataSet
Icc::Bool isNoDataSet() const;
This method returns a Boolean variable, which is defined in Icc structure, that indicates if no data was returned on a send; only control information.
IccSession::isSignalSet
Icc::Bool isSignalSet() const;
This method returns a Boolean variable, which is defined in Icc structure, that indicates whether a signal has been received from the remote process.
IccSession::issueAbend
void issueAbend();
This method abnormally ends the conversation. The partner transaction sees the TERMERR condition.
Equivalent EXEC CICS call: ISSUE ABEND CONVID
Conditions: INVREQ, NOTALLOC, TERMERR
IccSession::issueConfirmation
void issueConfirmation();
This method sends positive response to a partner's send request that specified the confirmation option.
Equivalent EXEC CICS call: ISSUE CONFIRMATION CONVID
Conditions: INVREQ, NOTALLOC, TERMERR
IccSession::issueError
void issueError();
This method signals an error to the partner process.
Equivalent EXEC CICS call: ISSUE ERROR CONVID
Conditions: INVREQ, NOTALLOC, TERMERR
IccSession::issueSignal
void issueSignal();
This method signals that a mode change is needed.
Equivalent EXEC CICS call: ISSUE SIGNAL CONVID
Conditions: INVREQ, NOTALLOC, TERMERR
IccSession::PIPList
IccBuf& PIPList();
This method returns a reference to an IccBuf object that contains the PIP data that is sent from the front end process. A call to this method should be preceded by a call to extractProcess on back end DTP processes.
IccSession::process
const IccBuf& process() const;
This method returns a reference to an IccBuf object that contains the process data that is sent from the front end process. A call to this method should be preceded by a call to extractProcess on back end DTP processes.
IccSession::put
virtual void put(const IccBuf& data);
This method is a synonym for send. See Polymorphic behavior for more information about polymorphism.
IccSession::receive
const IccBuf& receive();
This method returns a reference to an IccBuf object that contains the data that is received from the remote system.
Equivalent EXEC CICS call: RECEIVE CONVID
Conditions: INVREQ, LENGERR, NOTALLOC, SIGNAL, TERMERR
IccSession::send (1)
void send(const IccBuf& send,
SendOpt option=normal);
Equivalent EXEC CICS call: SEND CONVID
IccSession::send (2)
void send(sendOpt option=normal);
This method sends data to the remote partner.
Equivalent EXEC CICS call: SEND CONVID
Conditions: INVREQ, LENGERR, NOTALLOC, SIGNAL, TERMERR
IccSession::sendInvite (1)
void sendInvite(const IccBuf& send,
SendOpt option=normal);
Equivalent EXEC CICS call: SEND CONVID INVITE
IccSession::sendInvite (2)
void sendInvite(sendOpt option=normal);
This method sends data to the remote partner and indicates a change of direction; that is, the next method on this object will be receive.
Equivalent EXEC CICS call: SEND CONVID INVITE
Conditions: INVREQ, LENGERR, NOTALLOC, SIGNAL, TERMERR
IccSession::sendLast (1)
void sendLast(const IccBuf& send,
SendOpt option=normal);
Equivalent EXEC CICS call: SEND CONVID LAST
IccSession::sendLast (2)
void sendLast(sendOpt option=normal);
This method sends data to the remote partner and indicates that this is a final transaction. The free method must be invoked next, unless the sync level is 2, when you must commit resource updates before the free. See commitOUW in IccTask class for more information.
Equivalent EXEC CICS call: SEND CONVID LAST
Conditions: INVREQ, LENGERR, NOTALLOC, SIGNAL, TERMERR
IccSession::state
IccValue::CVDA state(StateOpt option=lastCommand);
Equivalent EXEC CICS call: EXTRACT ATTRIBUTES
Conditions: INVREQ, NOTALLOC
IccSession::stateText
const char* stateText(StateOpt option=lastCommand);
This method returns the symbolic name of the state that state method would return. For example, if state returns IccValue::ALLOCATED, stateText would return ALLOCATED.
IccSession::syncLevel
SyncLevel syncLevel() const;
This method returns an enumeration, which is defined in this class, that indicates the synchronization level that is being used in this session. A call to this method should be proceeded by a call to extractProcess on back end DTP processes.
IccSession::AllocateOpt
type enum {
queue,
noQueue,
} AllocateOpt;
This enumeration indicates whether queueing is required on an allocate method.
IccSession::SendOpt
type enum {
normal,
confirmation,
wait,
} SendOpt;
IccSession::StateOpt
type enum {
lastCommand,
extractState,
} StateOpt;
IccSession::SyncLevel
type enum {
level0,
level1,
} SyncLevel;
IccBase class
IccBuf class
IccConvId class
IccPartnerId class
IccResource class
IccSysId class
IccTask class
IccTPNameId class
IccTransId class
IccValue class