How can different users access different data libraries in Web applications?
All command handlers and filters have an initialisation call:
Include Process(*DIRECT) Function(VFSTART) [at the start of the function]
together with a close logic, inititiated by a call to VFEND:
Include Process(*DIRECT) Function(VFEND) [at the end of the function]
Similarly we recommend you that you implement your own initialise and close calls. For example:
Include Process(*DIRECT) Function(MY_START) [at the start of the function]
Include Process(*DIRECT) Function(MYEND) [at the end of the function]
Ideally MY_START would be placed after VFSTART and MYEND would be placed before VFEND.
Inside your MY_START function, you can retrieve the value of the current logged on user by using the VF_GET feature with the loggedonuser keyword:
Use Builtin(VF_GET) With_Args('loggedonuser') To_Get(#STD_USER)
Then you need to call another piece of logic (for example a CL program) to set the library list for the user logged on.