OnDemand Users Group

Support Forums => CMOD for z/OS Server => Topic started by: jfunk on September 28, 2016, 12:17:16 PM

Title: Consolidated Folder SQL question
Post by: jfunk on September 28, 2016, 12:17:16 PM
Good day,

The organization has many applications with similar and disparate columns.  As a result we are utilizing a Folder in order to tie the application groups, and thus DB2 tables, together.  My question is this, will OnDemand spawn one SQL with one to many UNION clauses joining these queries together?  Or, will it spawn one to many separate SQL statements?  And if the latter, do they execute concurrently or consecutively?  Please advise.  Thank you.

Jeff
Title: Re: Consolidated Folder SQL question
Post by: Justin Derrick on September 28, 2016, 07:23:35 PM
CMOD will run multiple, concurrent queries for each folder request, when there are multiple Application Groups defined per folder.

If the query covers a large time period (or you load a large number of documents per day/week/month) then CMOD will perform UNION operations across multiple tables inside a single Application Group.

For proof, enable query logging for the Application Groups, and watch the System Log as the queries come in.  :)

There needs to be a balance maintained between how many documents you load into an Application Group, and how many AGs you bind together into a folder.  Too many AGs in one folder, plus a period of high activity equals poor performance.

Hope this helps!

-JD.
Title: Re: Consolidated Folder SQL question
Post by: jfunk on September 29, 2016, 02:32:01 PM
Good day,

Thank you.  One last question, if I may.  Is it possible to have an application (thus table) assigned to multiple application groups.  If so, is that accomplished via the application id of the field identification?  And, if so can this be accomplished such that this application group is read only?  Please advise.  Thank you.
Title: Re: Consolidated Folder SQL question
Post by: Alessandro Perucchi on September 30, 2016, 04:18:12 AM
Quote from: Jeff Funk on September 29, 2016, 02:32:01 PM
Good day,
Thank you.  One last question, if I may.

Of course you may!! :-D Even more than one!!!

Quote from: Jeff Funk on September 29, 2016, 02:32:01 PM
Is it possible to have an application (thus table) assigned to multiple application groups.

Well, I must say Yes, and No at the same time at this question.

Yes, because you can assign several Application to one Application Group.
But No, because that's the role of the Application Group to have the tables. You must imagine that the Application is an interface with basically 2 roles.
1) For everything that goes inside CMOD (you define, the indexer, compression, large objects, indexes default values, etc...)
2) For everything that goes outside from CMOD (file format, rotation, logical views, ...)

The proof? You can delete an application, all the information are still in tables in your database and your storage manager contains all your archived documents. And if you recreate an application with the exact same link with the application group, then you can access your documents again.
If you delete an application group, first CMOD will ask you many many times if you are sure that you want to delete it! And if you still do it, then all the tables and content of the storage manager will be deleted and lost forever. Except if you have a backup (you should), and then you can restore the tables and the content of the storage...

Quote from: Jeff Funk on September 29, 2016, 02:32:01 PM
If so, is that accomplished via the application id of the field identification?

Exactly.

Quote from: Jeff Funk on September 29, 2016, 02:32:01 PM
  And, if so can this be accomplished such that this application group is read only?  Please advise.  Thank you.

Nope... all the permissions are in the application group.
The application does not have any permissions, even if you have 100000000 applications on your application group.

If you want to have put your application group as read only, then you need to remove the "Updateable" option for each application group fields. Then even if your users have the right to update a field, CMOD will not allow this action.
But that's a general setting for the application group.
If you want to give to some people the right to modify and to some other not, then you need to keep the updateable field activated, but then you give or not the "Update" right in the permission tab for the user/group.
But in no way, you can define that permission from an application perspective.

If you want to do something special with documents, and that means you wanted to create an "special" application on your application group, then maybe in your case, it would be a better choice to create a new application group with your application, and set this set of documents as 100% read only by removing everything that can update / delete the content of this application group.



Does that answer your last question (that was in fact 3 questions :-D)
Title: Re: Consolidated Folder SQL question
Post by: jfunk on October 06, 2016, 11:50:51 AM
Good day,

Thank you.  It does.

Jeff