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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COBOL AS/400 FUNCTION 1

Status
Not open for further replies.

Uvaiz

MIS
Jun 13, 2003
38
CA
Hello,

Is it possible to add a control inside a COBOL program when the USER calling the job has no authority to any file accessed in the program to cause the JOB to stop and instead display a warning message - NO AUTHORITY to files.

Is there a COBOL function for checking object authority.

Thank you for any assistance.

Tony
 
No. There is no COBOL function, but you can call a CL program to check for the authorities using the standard command, or you can call a API directly from COBOL.


BUT if the user does not have access to the files used by the program then he should not have access to the program at all, or if it is a standard program then he should not have access to the library.

Are you using adopted authorities, and authorization lists?

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Hello Frederico,

Your reply was indeed very helpful.

I do have a CL to perform this verification but queried just in case if any function did indeed exist within COBOL.

Thank you and your assistance is very much appreciated.

Tony

 
Well you might be able to just look up some kind of information from the system that will tell you if the user has rights to a file using the AS400 CL system statements if it is in their profile. For instance you could have a group for the users and if they are not in that group they can not run the program.

I have not messed with an AS400 for a few years and that was only in school but I know you can have groups. On the mainframe we use CICS and somehow we look at where people sign onto the system from. Based on their network address we decide if they have view or update authority.

You could put the jobs that run the programs in different Libraries and put all the restricted jobs in a special Library based on if it is an Accounting Job, or HR, or some other category. Then require a password for each library or something like that.

We are working on a new Database System where the files are split up into Directories and the application does not allow access between HR, Student, Accounting. However, all areas have access to Core and maybe the Toolkit for development. With security you have to have workarounds because some people may not work in another area but some programs like Payroll may need to see HR data or something like that.

If you do not like my post feel free to point out your opinion or my errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top