Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another CL programming question :) 1

Status
Not open for further replies.

cwolgamott

Programmer
May 29, 2002
69
0
0
US
Hello. :) I was wondering if there is a way to signoff the active users on an AS/400 using CL? If so, I would greatly appreciate some suggestions or help. :) Thank you. :)
 
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
 
There are system values that can disconnect jobs if they're "inactive".

QINACTITV: Inactive job timeout. Set it to the number of minutes a job is inactive before action is taken.

QINACTMSGQ: Determines what to do when QINACTITV is met. Either *ENDJOB to end the job or *DSCJOB to disconnect it.

QDSCJOBITV: Disconnected job time interval. Set this to the number of minutes to wait before a disconnected job is ended with *ENDJOB.

When a job is ended this way, it is ended abnormally. IF users leave important screens up and the job is ended, they could lose data. Also, it generates a job log.

Tom.
 
If you need to remove active users from a subsystem for backup purposes, terminate the qinter subsystem from a cl running in qbatch or transfer your job into qctl then terminate the subsystem. the terminate subsystem "ENDSBS" allows for the suppression of job logs. Restart the subsystem at the end of the process.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top