Hi,
I had this problem a few years ago. We neded to get everybody off the system when the overnight backup ran.
I set up a little program to record the details of each session every time somebody signed on via the first menu all our users get when they sign in ( using the RTVJOBA JOB(&JOB) USER(&USER) NBR(&NBR) command to get the job, user and job number). Every time they sign out, their entry is removed from the file.
I then wrote a CL procedure that when run will read through the file and end the job of any of the sessions recorded in it using the ENDJOB JOB(&NBR/&CUSER/&JOB) OPTION(*IMMED)command.
The procedure is run just before the backup and issues appropriate warningg messages with time delays before ending jobs in the file. We also set a flag on and off attached to our top level menu to prevent users signing in while the backup is taking place.
Regards
Roy