View Full Version : DLCOBJ a File vs Ending User Jobs
Guest.Visitor
01-01-1995, 02:00 AM
<font size=-1>On Tuesday, November 17, 1998, 06:51 PM, Gary J. Mach wrote: I am trying to write a CL program to drop ALL users that are logged into the AS/400 at 2:00 am. The time is no problem, but how to terminate user logins is. I do not want to end subsystem Qinter. Any ideas? or Utilities available? </font><hr> Gary, I did something like that a few years ago, what I did was a WRKACTJOB SBS(QINTER) to print, converted that to a Database file, then read the records one by one from the file and selected the jobs I wanted to end using and ENDJOB command. After the endjob I then varied off the device to prevent the user from getting back on. Now of course we are all on TCP so that wouldn't work. But the endjob command still will. Hope that helps. Just trying to keep up....
Guest.Visitor
11-18-1998, 05:47 AM
On Tuesday, November 17, 1998, 06:51 PM, Gary J. Mach wrote: I am trying to write a CL program to drop ALL users that are logged into the AS/400 at 2:00 am. The time is no problem, but how to terminate user logins is. I do not want to end subsystem Qinter. I have tried to use the cl command DLCOBJ to deallocate a sysctl file, in which is allocated for everyuser logging in. The command does not seam to do anything. I try DSPPFM COMAST, then in another session, DLCOBJ OBJ(COMAST) *FILE , nothing happens. I have looked at the API- QWCLOBJL, but this will only list the users allocated to the sysctl file. Any ideas? or Utilities available? Gary May i inquire why you do not want to end qinter? that's the way we do it at our sites (to make sure the nigntly backup does not hang)
Guest.Visitor
11-18-1998, 06:49 AM
On Wednesday, November 18, 1998, 06:47 AM, Denis Robitaille wrote: May i inquire why you do not want to end qinter? that's the way we do it at our sites (to make sure the nigntly backup does not hang) <hr>I can't speak for everyone, but the reason I needed it was we had multiple applications running from seperate LIBS and there was no justification for taking everyone off to back up one app. So the backup was split, it ran continuously but brought down the Apps one by one and backed them up. Just trying to keep up....
Guest.Visitor
11-18-1998, 11:49 AM
DLCOBJ can effect dropping locks only w/in your own routing step <per help text; type DLCOBJ at command line and press F1=Help> which effectively means your own job, so you can not release locks to an object held by another job -- unless you ask the job to release its own lock. The API you note does return job name and number for the format OBJL0100, so if your desire is to end only those jobs with a lock, then you should be in the right place <doc, that is>. Or if you only want that the holding job release its lock, then in the app which locks <per locked at signon> then have the job also allocate a message queue with a BRKPGM specified; a break handling program that when invoked will DLCOBJ the noted control file <note that the original lock > must have been per ALCOBJ, not an OPEN>. You must note that new users signing on between asking every job to release the lock and when that request processing completes, new users may come in with new locks <maybe at 02.0>. Regards, Chuck Comments provided "as is" with no warranties of any kind whatsoever.</note>
vrozen1
11-19-1998, 12:15 PM
On Tuesday, November 17, 1998, 06:51 PM, Gary J. Mach wrote: I am trying to write a CL program to drop ALL users that are logged into the AS/400 at 2:00 am. The time is no problem, but how to terminate user logins is. I do not want to end subsystem Qinter... Hi Gary, If you want to receive a list of active job on your system, you may use QUSLJOB API which supplies you with a list of job in user space. This API may give you only Interactive jobs (depend on calling parmaeters). Then retreive job name, number and user from user space and kill job with endjob command. Vadim
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.