FIRST-PROCEDURE attribute

For an application server, returns the first entry in the list of remote persistent, single-run, and singleton procedures that are active on the connected application server. For Web services, returns the first entry in the list of procedure objects associated with the Web service.

Data type: HANDLE

Access: Read-only

Applies to: Server object handle, SESSION system handle

If the current session has no active persistent procedures or the application server has no active remote persistent, single-run, or singleton procedures, FIRST-PROCEDURE returns the Unknown value (?). To find the next procedure given the first, use the NEXT-SIBLING attribute of the procedure handle.

Note: The PERSISTENT attribute of a remote persistent procedure returned by FIRST-PROCEDURE is TRUE only if the RUN statement that executes the procedure was invoked with the PERSISTENT option. The PERSISTENT attribute is FALSE if the persistent procedure was invoked with the SINGLE-RUN or SINGLETON option of the RUN statement.

For information on creating persistent, single-run, or singleton procedures, see the RUN statement reference entry. To check a handle for validity, use the VALID-HANDLE function.