Progress
Version 9
Product Update Bulletin


4GL Elements Related To Dynamic Invoke

The 4GL elements related to dynamic invoke consist of a statement, a handle, attributes, and methods.

NOTE: For more information on these 4GL elements, see the Progress Language Reference .

The CREATE CALL Object statement creates a CALL object, then stores a handle to it in the handle variable specified.

The CALL Object handle lets you do the following dynamically:

Table J–1 lists the attributes of the CALL Object handle.

Table J–1: Attributes Of the CALL Object Handle
Attribute
Type
Description
ASYNCHRONOUS Attribute
LOGICAL
(Applies only when the logic to be dynamically invoked resides on a Progress AppServer.)
Indicates whether you want the logic to run asynchronously.
ASYNC-REQUEST-HANDLE Attribute
HANDLE
(Applies only when ASYNCHRONOUS is TRUE.)
A handle to an asynchronous-request object containing detailed information on your asynchronous request.
Set by INVOKE() when ASYNCHRONOUS is TRUE.
CALL-NAME Attribute
CHARACTER
The name of one of the following:
  • A procedure or user-defined function you want to invoke dynamically
  • An attribute or you want to get or set dynamically
  • A method you want to invoke dynamically
CALL-TYPE Attribute
INTEGER
Whether you are dynamically:
  • Invoking a procedure
  • Invoking a user-defined function
  • Getting an attribute or invoking a method
  • Setting an attribute
EVENT-PROCEDURE Attribute
CHARACTER
(Applies only when ASYNCHRONOUS is TRUE.)
The name of an internal procedure you want executed when a dynamic, asynchronous invoke completes.

NOTE: You must set EVENT-
PROCEDURE before you run INVOKE().

EVENT-PROCEDURE-CONTEXT Attribute
HANDLE
(Applies only when ASYNCHRONOUS is TRUE.)
A handle to a running persistent procedure containing an internal procedure you want executed when a dynamic, asynchronous invoke completes.
IN-HANDLE Attribute
HANDLE
Contains one of the following:
  • A handle to a persistent procedure you just invoked dynamically
  • A handle to an already-running persistent procedure containing logic you want to invoke dynamically
  • A handle to an object whose attributes or methods you want to invoke dynamically
IS-PARAMETER-SET Attribute
LOGICAL
Whether you have already set a particular parameter.
NUM-PARAMETERS Attribute
INTEGER
The number of parameters you are passing.
PERSISTENT Attribute
LOGICAL
Whether you want an external procedure you plan to invoke dynamically to run persistently.
RETURN-VALUE Attribute
RETURN-
VALUE-
DATA-TYPE
(Applies only to user-defined functions, attributes, and methods)
One of the following:
  • The value returned by a user-defined function
  • The value of an attribute
  • The value returned by a method
RETURN-VALUE-DATA-TYPE Attribute
CHARACTER
(Applies only to user-defined functions, attributes, and methods)
The data type of the return value.
If you set this before you execute INVOKE(), the return value is converted to this data type.
If you do not set this before you execute INVOKE(), it indicates the return value’s data type.
SERVER Attribute
HANDLE
A handle to an AppServer containing logic you want to invoke dynamically.

Table J–2 lists the methods of the CALL Object handle.

Table J–2: Methods Of the CALL Object Handle
Method
Return Type
Description
CLEAR() Method
LOGICAL
Resets each attribute of the CALL object to its default value.

NOTE: To reset just the parameters, set the NUM-PARAMETERS attribute to zero.

INVOKE() Method
None
(similar to the RUN statement)
Lets you dynamically do the following:
  • Invoke an external procedure, internal procedure, or user-defined function
  • Get or set an attribute
  • Invoke a method

NOTE: INVOKE() cannot occur within an expression.

SET-PARAMETER() Method
LOGICAL
Lets you set parameters of one of the following:
  • A procedure or user-defined function you want to invoke dynamically
  • An attribute you want to get or set dynamically
  • A method you want to invoke dynamically


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095