Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming the Progress Application Server for OpenEdge : ABL for programming PAS for OpenEdge procedures
 

ABL for programming PAS for OpenEdge procedures

The following table lists the ABL elements that either are valid only in a PAS for OpenEdge session or have special application in PAS for OpenEdge programming. The remaining sections in this chapter explain how to use these elements.
Table 12. ABL for programming PAS for OpenEdge procedures
ABL element
Description
CLIENT-TYPE
A CHARACTER attribute on the SESSION system handle that returns the value, MULTI-SESSION-AGENT in a PAS for OpenEdge session. Valid only if the REMOTE attribute is TRUE.
CURRENT-RESPONSE-INFO
An object reference attribute on the SESSION system handle that references a Progress.Lang.OERequestInfo object, which describes the response to the client request being executed.
DEFAULT-COMMIT
A LOGICAL attribute on a transaction object handle that specifies how the transaction object is to complete the transaction if an automatic transaction terminates with no prior SET-COMMIT( ) or SET-ROLLBACK( ) being invoked.
DELETE OBJECT handle
A statement that you can use to delete certain session objects, including local and remote persistent procedures.
DELETE PROCEDURE procedure-handle
A statement that you can use to delete both local and remote procedure objects (persistent procedures).
EXPORT ( [list] )
A method on the SESSION system handle that creates and modifies the list of remote procedures provided by the PAS or OE instance.
FUNCTION ... IN SUPER
A statement that specifies the prototype definition for a user-defined function defined within a super procedure.
IS-OPEN
A LOGICAL attribute on a transaction object handle that returns TRUE if a database transaction is active. This is identical to the ABL TRANSACTION function.
LOCAL-VERSION-INFO
An object reference attribute on the SESSION system handle that references a Progress.Lang.OEVersionInfo object, which identifies the current instance of the OpenEdge server AVM, including its OpenEdge version.
OEClientType
A CHARACTER property on the Progress.Lang.OEVersionInfo class that returns the value, MULTI-SESSION-AGENT, when the reference to the OEVersionInfo object is returned as the value of the LOCAL-VERSION-INFO attribute on the SESSION system handle in a PAS for OpenEdge session, or as the value of the VersionInfo property on an OERequestInfo object returned by the appropriate attributes on a server object handle for a PAS for OpenEdge instance or on the SESSION handle in a PAS for OpenEdge session.
Parameters for procedures and user-defined functions
Procedure and user-defined function parameters can be defined as any ABL parameter data type, including class-based object types. (For more information see Passing class-based objects as parameters between a server and ABL client.) However, note that for any procedure or user-defined function that you include in an OpenEdge SOAP Web service, you cannot pass a static or dynamic ProDataSet parameter that includes parent-id data-relations (for example, data-relations as defined using the PARENT-ID-RELATION option of the DEFINE DATASET statement). Otherwise, ProxyGen fails to generate any proxies for the specified service definition.
PERSISTENT
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running persistently as a procedure object.
PROCEDURE ... IN SUPER
A statement that begins the prototype definition for an internal procedure defined within a super procedure.
PROCEDURE ... THREAD-SAFE
A statement that begins the prototype definition for a routine in a Windows DLL or UNIX shared library, where the THREAD-SAFE option declares that it as thread safe. You must know that the routine is, in fact, thread safe in order to specify this option, which simply informs OpenEdge that this is the case. ABL sessions of a PAS for OpenEdge instance can execute a given DLL or shared library routine only if it is thread safe.
Progress.Lang.OERequestInfo
A built-in ABL class that is passed as an object between a client and any ABL session that executes a client request on a PAS for OpenEdge instance, and contains information about the request, including identification, security, and context information. When the reference to an OERequestInfo object is returned by the CURRENT-REQUEST-INFO or CURRENT-RESPONSE-INFO attributes on the SESSION handle in a PAS for OpenEdge session, the AgentId, SessionId, and ThreadId properties return integer values that identify the multi-session agent, ABL session, and thread, respectively, that are executing the current client request.
QUIT
A statement that when executed as the last statement in the Disconnect event procedure of a bound session of a session-managed connection, cleans up the context of the session as the client disconnects, similar to a session-managed client disconnecting from an OpenEdge PAS for OpenEdge instance running in the session-managed application model.
REMOTE
A LOGICAL attribute on the SESSION system handle that is TRUE if the current session is running in the context of an PAS for OpenEdge instance.
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running at the top level in the context of PAS for OpenEdge session (as the result of a remote procedure call by a client application). Always FALSE if PROXY is TRUE.
SERVER-CONNECTION-BOUND
A LOGICAL attribute on the SESSION system handle that is TRUE if the PAS for OpenEdge session is bound to a particular client session in the session-free or an unbound session-managed model by client invocation of a remote persistent procedure or Open Client/Web service ProcObject. By default, it is FALSE. Valid only if the REMOTE attribute is TRUE.
SERVER-CONNECTION-BOUND-REQUEST
A LOGICAL attribute on the SESSION system handle that, when set to TRUE, requests that the PAS for OE session be bound to the current client connection identified by the SERVER-CONNECTION-ID attribute. When set to FALSE, requests that the PAS for OpenEdge session be unbound from the currently bound client connection pending deletion of all remote persistent procedures running in the session. In session-free, this attribute always has the Unknown value (?). Valid only if the REMOTE attribute is TRUE and the application model is session-managed. Any attempt to set this attribute in the session-free model raises a WARNING condition in the PAS for OpenEdge session, which writes a message to the PAS for OpenEdge log file, and the value remains unchanged. You can handle the WARNING condition by including the NO-ERROR option in the statement that attempts to set the value, and checking ERROR-STATUS:NUM-MESSAGES for a value greater than zero.
SERVER-CONNECTION-CONTEXT
A CHARACTER attribute on the SESSION system handle that contains an application-determined value that you can set. OpenEdge passes this value to each server session that executes a request on behalf of the client connection identified by the SERVER-CONNECTION-ID attribute. Valid only if the REMOTE attribute is TRUE and the application model is session-managed.
SERVER-CONNECTION-ID
A CHARACTER attribute on the SESSION system handle that returns the run-time connection ID of the current client connection assigned to this Server session. Valid only if the REMOTE attribute is TRUE and the application model is session-managed.
In the session-free model, this attribute has no meaning.
SERVER-OPERATING-MODE
A CHARACTER attribute on the SESSION system handle that returns the application model of the client request that the current PAS for OpenEdge session is running: "session-managed" or "session-free". Valid only if the REMOTE attribute is TRUE.
SET-COMMIT( )
A method on a transaction object handle that tells the transaction object to commit any automatic transaction when the current request completes and returns execution to the client.
SET-ROLLBACK( )
A method on a transaction object handle that tells the transaction object to roll back any automatic transaction when the current request completes and returns execution to the client.
SINGLE-RUN
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running as a single-run object.
SINGLETON
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running as a singleton object.
THREAD-SAFE
A LOGICAL attribute on a call object handle that represents a Windows DLL or UNIX shared library routine that is TRUE if the PROCEDURE statement that declares the routine prototype is specified with the THREAD-SAFE option.
TRANSACTION
A HANDLE attribute on procedure handles and the THIS-PROCEDURE system handle that provides a handle to the current transaction object.
TRANS-INIT-PROCEDURE
A HANDLE attribute on a transaction object handle that, if an automatic transaction is active, returns the procedure handle to the transaction initiating procedure that started the transaction.