File Management - IBM
File Management - IBM File Management - IBM
Add Add new records to the file. Update Open a database file for update. Delete Open a database file for delete. For files other than database and save files, the execute, the add, update, and delete authorities are ignored. Authorities required for file operations Table 4 lists the file object authority required for file functions. Table 5 on page 11 lists the data authority required for file functions. This is the same information that was presented in the previous two sections, but it is listed by function rather than by authority. Table 4. Object Authority Required for File Operations Function Object Operational Object Existence Object Management Object Reference Open, I/O, close X file 1 Compile a program using the file description X Display file description X Delete file X X Save/restore X Transfer ownership X X Grant/revoke authority X X Change file description X X Move file X X Rename file X X Replace file X X X Refer to another X X file 2 Add or remove file constraints 3 Add or remove triggers 4 Change attributes 5 : 1 2 3 4 5 Object Alter X X X X X X For device files that are not using spooling, you must also have object operational and all data authorities to the device. For database files only. For database files only. Parent files need object management or object reference authority. Dependent files need object management or object alter authority. For database files only. Files need object management or object alter authority. For database files and SQL packages only. Files need object management or object alter authority. 10 File Management V4R5
Table 5. Data Authority Required for File Operations Function Execute Read Add Update Delete Open, I/O, close file 1 X X 2 X 3 X 3 Compile a program using the file description X Run a program or locate an object in a library X Display file description X Replace file X Add or remove triggers 4 X X 5 X 6 X 7 : 1 2 3 4 5 6 7 For device files that are not using spooling, you must also have object operational and all data authorities to the device. Open for output for database and save files. Open for update or delete for database files. For database files only. Add authority required in addition to Read authority for inserting triggers. Update authority required in addition to Read authority for updating triggers. Delete authority required in addition to Read authority for deleting triggers. Limiting access to files and data when creating files Specifying authorities allows you to control access to a file. Specifying authorities when creating files: To specify public authority when you create a file, use the AUT parameter on the create command. What public authority is: Public authority is authority that is available to any user who does not have specific authority to the file or who is not a member of a group that has specific authority to the file. That is, if the user has specific authority to a file or the user is a member of a group with specific authority, then the public authority is not checked when a user performs an operation to the file. Public authority can be specified as: v *LIBCRTAUT. All users that do not have specific user or group authority to the file have authority determined by the library in which the file is being created. The library value is specified by the *CRTAUT command to establish a public authority for this library. v *CHANGE. All users that do not have specific user or group authority to the file have authority to use the file. The *CHANGE value is the default public authority. *CHANGE grants any user object operational and all data authorities. v *USE. All users that do not have specific user or group authority to the file have authority to use the file. *USE grants any user object operational, execute, and read data authority. v *EXCLUDE. Only the owner, security officer, users with specific authority, or users who are members of a group with specific authority can change or use the file. Chapter 2. File processing 11
- Page 1: AS/400e File Management Version 4
- Page 4 and 5: © Copyright International Business
- Page 6 and 7: | | | | | Special considerations fo
- Page 8 and 9: vi File Management V4R5
- Page 10 and 11: viii File Management V4R5
- Page 12 and 13: 2 File Management V4R5 v Distribute
- Page 14 and 15: Table 1. File Types and Their Main
- Page 16 and 17: Table 2. High-Level Languages and T
- Page 18 and 19: | | Table 3. High-Level Languages a
- Page 22 and 23: | Sharing files 12 File Management
- Page 24 and 25: 14 File Management V4R5 For example
- Page 26 and 27: 16 File Management V4R5 File resour
- Page 28 and 29: 18 File Management V4R5 v “Displa
- Page 30 and 31: Application 1 Application 2 Applica
- Page 32 and 33: 22 File Management V4R5 LVLCHK(*NO)
- Page 34 and 35: The open feedback area also contain
- Page 36 and 37: 26 File Management V4R5 Table 6. OS
- Page 38 and 39: 28 File Management V4R5 Table 7. Ma
- Page 40 and 41: 30 File Management V4R5 Depending o
- Page 42 and 43: 32 File Management V4R5
- Page 44 and 45: 34 File Management V4R5 Handling ov
- Page 46 and 47: 36 File Management V4R5 output queu
- Page 48 and 49: 38 File Management V4R5 The followi
- Page 50 and 51: 40 File Management V4R5 application
- Page 52 and 53: 42 File Management V4R5 activation
- Page 54 and 55: Program A (in user default activati
- Page 56 and 57: 46 File Management V4R5 Override 1
- Page 58 and 59: 48 File Management V4R5 same call l
- Page 60 and 61: 50 File Management V4R5 Program A .
- Page 62 and 63: 52 File Management V4R5 Applying OV
- Page 64 and 65: Deleting overrides 54 File Manageme
- Page 66 and 67: Program A (in user default activati
- Page 68 and 69: 58 File Management V4R5 Displaying
Table 5. Data Authority Required for <strong>File</strong> Operations<br />
Function Execute Read Add Update Delete<br />
Open, I/O, close file 1<br />
X X 2<br />
X 3<br />
X 3<br />
Compile a program<br />
using the file description<br />
X<br />
Run a program or locate<br />
an object in a library<br />
X<br />
Display file description X<br />
Replace file X<br />
Add or remove triggers 4<br />
X X 5<br />
X 6<br />
X 7<br />
:<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
For device files that are not using spooling, you must also have object operational and all data authorities to<br />
the device.<br />
Open for output for database and save files.<br />
Open for update or delete for database files.<br />
For database files only.<br />
Add authority required in addition to Read authority for inserting triggers.<br />
Update authority required in addition to Read authority for updating triggers.<br />
Delete authority required in addition to Read authority for deleting triggers.<br />
Limiting access to files and data when creating files<br />
Specifying authorities allows you to control access to a file.<br />
Specifying authorities when creating files:<br />
To specify public authority when you create a file, use the AUT parameter on the<br />
create command.<br />
What public authority is:<br />
Public authority is authority that is available to any user who does not have<br />
specific authority to the file or who is not a member of a group that has specific<br />
authority to the file. That is, if the user has specific authority to a file or the user is<br />
a member of a group with specific authority, then the public authority is not<br />
checked when a user performs an operation to the file. Public authority can be<br />
specified as:<br />
v *LIBCRTAUT. All users that do not have specific user or group authority to the<br />
file have authority determined by the library in which the file is being created.<br />
The library value is specified by the *CRTAUT command to establish a public<br />
authority for this library.<br />
v *CHANGE. All users that do not have specific user or group authority to the file<br />
have authority to use the file. The *CHANGE value is the default public<br />
authority. *CHANGE grants any user object operational and all data authorities.<br />
v *USE. All users that do not have specific user or group authority to the file have<br />
authority to use the file. *USE grants any user object operational, execute, and<br />
read data authority.<br />
v *EXCLUDE. Only the owner, security officer, users with specific authority, or<br />
users who are members of a group with specific authority can change or use the<br />
file.<br />
Chapter 2. <strong>File</strong> processing 11