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 : Using PAS for OpenEdge event procedures : Startup and Shutdown procedures : Session Startup procedure
 
Session Startup procedure
A Session Startup procedure executes as an server session starts up. You can specify the name of an PAS for OpenEdge Session Startup procedure using the OpenEdge Explorer or OpenEdge Management or by setting the sessionStartupProc property in the PAS for OpenEdge properties file (openedge.properties).
This Startup procedure takes a character string as an input parameter. For example:
DEFINE INPUT PARAMETER startup-data AS CHARACTER NO-UNDO.
You can set the value for this parameter in the properties file using the sessionStartupProcParam property, and you can set it to any arbitrary value. If you do not specify a value for this property, the parameter is set to the Unknown value (?) when the PAS for OpenEdge session executes the Startup procedure.
The Session Startup procedure is automatically executed as a persistent procedure within each server session when the PAS for OpenEdge session first starts. The persistent procedure is automatically deleted just before the session terminates. If you do not need the context established by the Startup procedure, you can delete the persistent procedure within a server session context by executing the DELETE PROCEDURE (or DELETE OBJECT) statement using the appropriate procedure handle.
If the Session Startup procedure completes with no error, the PAS for OpenEdge starts up successfully. If the Startup procedure completes with an error return value (RETURN ERROR statement), PAS for OpenEdge instance startup fails and the PAS for OpenEdge session is terminated.