× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Larry,
From google search on "create collection".
"Authority" is mentioned in this message.

http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/db2/
rbafzmstcrtcoll.htm

A collection provides a logical grouping of SQL objects. A collection
consists of a library, a journal, a journal receiver, a catalog, and
optionally, a data dictionary. Tables, views, and system objects (such
as programs) can be created, moved, or restored into any AS/400 library.
All AS/400 files can be created or moved into an SQL collection if the
SQL collection does not contain a data dictionary. If the SQL collection
contains a data dictionary then:
* AS/400 source physical files or nonsource physical files with
one member can be created, moved, or restored into an SQL collection.
* AS/400 logical files cannot be placed in an SQL collection
because they cannot be described in the data dictionary.
You can create and own many collections.
Data Dictionary
A collection contains a data dictionary if it was created prior to
Version 3 Release 1 or if the WITH DATA DICTIONARY clause was specified
on the CREATE COLLECTION or the CREATE SCHEMA statements. A data
dictionary is a set of tables containing object definitions. If SQL
created the dictionary, then it is automatically maintained by the
system. You can work with data dictionaries by using the interactive
data definition utility (IDDU), which is part of the OS/400 program. For
more information on IDDU, see the IDDU Use book.
Journals and Journal Receivers
A journal and journal receiver are used to record changes to tables and
views in the database. The journal and journal receiver are then used in
processing SQL COMMIT and ROLLBACK statements. The journal and journal
receiver can also be used as an audit trail or for forward or backward
recovery. For more information on journaling, see the Backup and
Recovery book.
Catalogs
An SQL catalog consists of a set of tables and views which describe
tables, views, indexes, packages, procedures, files, and constraints.
This information is contained in a set of cross-reference tables in
libraries QSYS and QSYS2. Library QSYS2 also contains a set of catalog
views built over the QSYS catalog tables which describe information
about all the tables, views, indexes, packages, procedures, files, and
constraints on the system. In each SQL collection there is a set of
views built over the catalog tables which contains information about the
tables, views, indexes, packages, files, and constraints in the
collection.
A catalog is automatically created when you create a collection. You
cannot drop or explicitly change the catalog.
For more information about SQL catalogs, see the SQL Reference book.



http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/db2/
rbafzmstcrtcoll.htm

An interactive SQL facility is associated with every database manager.
Essentially, every interactive SQL facility is an SQL application
program that reads statements from a terminal, prepares and executes
them dynamically, and displays the results to the user. Such SQL
statements are said to be issued interactively. The interactive
facilities for DB2 UDB for AS/400 are invoked by the STRSQL command, the
STRQM command, or the SQL Script support of Operations Navigator. For
more information on the interactive facilities for SQL, see the Query
Manager Use and SQL Programming Concepts books.

http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/db2/
rbafzmstcrtcoll.htm
Queries, report forms, and database tables are organized into sets
called libraries. When you create one of these objects, it is assigned
to one library. A library groups related objects and allows you to find
the objects by name.
Collections are special types of libraries used to store database
tables. A collection consists of a library, journal, journal receiver,
data dictionary, and SQL catalog. Note that tables can be stored in
either libraries or collections.
You need to give different names to objects of the same type that are
stored in the same library or collection


http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/db2/
rbafzmstcrtcoll.htm

The CREATE COLLECTION statement creates a collection in which tables,
views, indexes, aliases, procedures, and packages can be created.
Invocation
This statement can be embedded in an application program or issued
interactively. It is an executable statement that can be dynamically
prepared.
Authorization
The privileges held by the authorization ID of the statement must
include at least one of the following:
* The *USE system authority to the following CL commands:
o Create Library (CRTLIB)
o If WITH DATA DICTIONARY is specified, Create Data Dictionary
(CRTDTADCT)
* Administrative authority

Authorization
The privileges held by the authorization ID of the statement must
include at least one of the following:
* The *USE system authority to the following CL commands:
o Create Library (CRTLIB)
o If WITH DATA DICTIONARY is specified, Create Data Dictionary
(CRTDTADCT)
* Administrative authority
Syntax
(1)
-CREATE COLLECTION-------collection-name---------------------->

-----+------------------+--+----------------------+-----------><
'-IN ASP--integer--' '-WITH DATA DICTIONARY-'

Notes:
1. The keyword DATABASE can be used as a synonym for COLLECTION.
Description
collection-name
Names the collection. The name must not be the name of an existing SQL
collection or a library at the current server. The owner of the
collection is the user profile or group user profile of the job
executing the statement.
If the owner of the collection is a member of a group profile (GRPPRF
keyword) and group authority is specified (GRPAUT keyword), that group
profile will also have authority to the collection.
IN ASP integer
Specifies the auxiliary storage pool (ASP) in which to create the
collection. The integer must be between 1 and 16. If 1 is specified, the
collection is created on the system ASP. If this clause is omitted, an
ASP of 1 is assumed.
WITH DATA DICTIONARY
If this clause is specified, an IDDU data dictionary is created in the
collection.
Notes
A collection is created as:
* A library: A library groups related objects, and allows you to
find objects by name.
* A catalog: A catalog contains descriptions of the tables, views,
indexes, and packages in the collection. A catalog consists of a set of
views and if WITH DATA DICTIONARY is specified, an IDDU data dictionary.
For more information, see the SQL Programming Concepts book.
* A journal and journal receiver: A journal QSQJRN and journal
receiver QSQJRN0001 is created in the collection, and is used to record
changes to all tables subsequently created in the collection. For more
information, see the book Backup and Recovery, SC41-5304-04.
If SQL names have been specified, the owner of the collection is the
authorization ID of the statement. If system names have been specified,
the owner of the collection is the user profile (or the group user
profile of the job) invoking the statement.
If SQL names were specified when the collection is created, the system
authority *EXCLUDE is initially given to *PUBLIC, and the library is
created with the create authority parameter CRTAUT(*EXCLUDE). The owner
is the only user having any authority to the collection. If other users
require authority to the collection, the owner can grant authority to
the objects created; using the CL command Grant Object Authority
(GRTOBJAUT).
If system names were specified when the collection is created, the
system authority given to *PUBLIC is determined by the system value
QCRTAUT, and the library is created with CRTAUT(*SYSVAL). For more
information on AS/400 system security, see the books Security -
Reference, SC41-5302-04, and the SQL Programming Concepts book.
http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/db2/
rbafzmstcrtcoll.htm


My developers are creating some collections and are not
happy with the default authority these collections are using. They are
different than when a 'library' is created via greenscreen.
Is there a way to control the default authority of a SQL created
collection?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.