The *PERSIST option can be used inside OPTIONS property of a WEB_MAP. WAMs are designed to execute in a server-side Web-based environment. In order to achieve maximum scalability and minimize resource utilization, a WAM Component is stateless. Any WAM memory state is maintained only while a WEBROUTINE is being executed. At the completion of WEBROUTINE execution, any memory state (such as field and list values) are destroyed. (For more information, refer to 4.3 WAM Session Management.
It is possible to declare fields and lists to retain or persist data that is to be available across WEBROUTINE executions for the duration of a Web session. Persistence is achieved by declaring an OPTIONS(*PERSIST) on a WEB_MAP for fields or lists. In addition to declaring an OPTIONS(*PERSIST) the WEBROUTINE needs to have an initial SessionStatus set to Active. This is done by, either setting it for the WAM or by setting OnEntry(*SessionStatus_Active) keyword for individual WEBROUTINE. By setting SessionStatus to Active, in this way, ensures that the WEBROUTINE will load the session state before it starts execution.
You can use the following syntax to declare session data, which is not mapped in or out of WEBROUTINEs:
WEB_MAP FOR(*NONE) FIELDS field and/or list names with a # prefix OPTIONS(*PERSIST)
When a FOR(*NONE) declaration is used, the declared fields and lists will not be mapped in or out of WEBROUTINEs, but their values will be available in WEBROUTINE RDMLX across WEBROUTINE executions. If the above WEB_MAP is declared at WAM level, (i.e. after BEGIN_COM but outside of any WEBROUTINE block), then every WEBROUTINE, that requires a session (i.e. its initial SessionStatus is not None), will have access to these fields and lists as they form session state.