PDA

View Full Version : Locking user out Query File Create



Guest.Visitor
01-01-1995, 02:00 AM
I am looking for a way to restrict a user from running a query that builds a file. Our concern is the user will name the query something that already exits on our system and over write it. I cant give then read access to the files because they also have to run production programs that update these same file. Any help would be greatly appreciated. bryanm@maximumcomputer.com Bryan Mangan www.maximumcomputer.com 631-738-0500 Ext. 101

Guest.Visitor
11-13-2000, 01:19 PM
Bryan, Letting users into query is a royal pain in the UKW!!! Not only is there a security risk but they always have strange questions and expect you to be the query wizard. Okay, let me get to the point. To directly answer your question, give the users *USE to the libraries in question. This will prevent them from adding new objects to the library (i.e. a new query outfile). If you can, restrict the users to *CHANGE for production files. This will prevent them from updating with query. WATCH OUT for files that users must perform a clear on. Any files that need to be programmatically cleared by users must be left to *ALL authority. Be sure to test this out and make sure it will work for you. I would hate to steer you wrong. Forgot to mention -- DO NOT TOUCH the IBM libraries "Q" or you will probably have problems. Query shmeary. It can be very powerful and useful, but then again it can be a thorn in the ole side. HTH Scott

Guest.Visitor
11-13-2000, 04:31 PM
Bryan, If your users are restricted to menus, a simple method is to create a menu entry as follows: <pre> ? RUNQRY ?-QRY(*NONE) ?-OUTTYPE(*display) </pre> Putting the "?-" in front of the parameters prevents the users from making/changing the parameter entries. So in this sample, they cannot create queries, nor can they create files. Unfortunately, they can only display files. You can create another menu option where *DISPLAY is replace with *PRINTER. With some additional programming, you can further expand the example to a sub-application wherein the users are given a choice of library/files, queries, and output options.