# PROCESS EVENTS Generate internal event

> Source: https://manual.pvxplus.com/directives/processevents

## Format

|  |  |
| --- | --- |
| *Generate Internal Event:* | **PROCESS EVENT** *eventname$* **\[**,*arglist,...***\]** **\[**,**ERR**=*stmtref* **\]** |

***Where***:

|  |  |
| --- | --- |
| *eventname$* | Name of the event being generated. |
| *arglist* | Optional parameters to be passed to the event handler. |
| *stmtref* | Program line number or statement label to which to transfer control. |

## Description

This directive will cause the system to execute the actions assigned to the event named in *eventname$*. It will also pass any parameters (values, variables or expressions) supplied in the *arglist* to the action processing logic.

An optional **ERR=** branch may be supplied to trap any errors which may occur or be returned by the event actions.

*(The PROCESS EVENT directive was added in PxPlus v11.00.)*

## System Defined Events

The following table lists the PROCESS EVENTS currently implemented within the PxPlus environment (as of PxPlus 2014):

| **Event Name** | **Arguments Passed** | **Description** |
| --- | --- | --- |
| **FileOpen** | Path$, Channel | Generated when a data file is opened |
| **FileClose** | Path$, Channel | Generated when a data file is closed |
| **FileErase** | Path$ | Generated when a file is erased |
| **FilePurge** | Path$ | Generated when a file is cleared as a result of a **[REFILE](https://manual.pvxplus.com/directives/refile)** or **[PURGE](https://manual.pvxplus.com/directives/purge)** directive |
| **FileRename** | OldName$, NewName$ | Generated when a file is renamed |
| **SentEMail** | To$, Subject$ | Generated when an email is sent by **[\*WEB/MAIL](https://manual.pvxplus.com/web-server-reference/setting-up-pxplus-web-server/pxplus-web-server-utilities/send-mail-to-a-local-smtp-server)** or **[\*WEB/EMAIL](https://manual.pvxplus.com/web-utilities/email-utility/overview)** |
| **UserLogon** | Userid$ | User logon completed |
| **UserLogoff** | Userid$ | User has logged off |
| **NomadsQuery** | Query_info$, ControlName$, Ctlid, Tag$ | Generated when NOMADS is about to run a query |
| **NomadsPreLoad** | Screen$, Library$ | Before load of panel (Handler can change values) |
| **NomadsPostLoad** | Screen$, Library$ | After load of panel |
| **NomadsEndPanel** | Screen$, Library$ | End of panel |
| **NomadsPanelReplace** | Screen$, Library$, NewScreen$, NewLib$ | Replacement panel requested (Handler can change values) |

## See Also

[Event Handling](https://manual.pvxplus.com/pxplus-user-guide/event-handling)  
**[ON PROCESS EVENT Define Internal Event Logic](https://manual.pvxplus.com/directives/onprocessevent)**
