OnDemand Users Group

Support Forums => CMOD for Multiplatforms => Topic started by: Valentin Schmid on March 27, 2017, 02:58:21 PM

Title: How many Documents are stored in CMOD Application Group grouped by Application
Post by: Valentin Schmid on March 27, 2017, 02:58:21 PM
Hello all,

With this SQL query it is possible to receive the number of documents per Application Group:
db2 "select arsag.name,sum(arsseg.ins_rows-arsseg.del_rows) as Total_Rows from arsag,arsseg where arsag.agid=arsseg.agid group by arsag.name"

Is there a way to receive the number of documents per Application?
(e.g. how many PDFs and how many AFPs are stored in given Application Group)

If yes, is there also a possibility to receive the required space (storage object size) per Application?

Thanks for your replies.
Title: Re: How many Documents are stored in CMOD Application Group grouped by Application
Post by: Justin Derrick on March 29, 2017, 03:43:07 PM
This is difficult because the Application ID field is assigned by the CMOD Admin, and probably isn't consistent across Application Groups.

You'll likely need a custom tool to do this work for you that is much more complex than your standard SQL query.

-JD.
Title: Re: How many Documents are stored in CMOD Application Group grouped by Application
Post by: Alessandro Perucchi on April 22, 2017, 01:55:18 PM
Hello Valentin,

if you look at this post, part of question is answered:

http://ODUG.net/index.php?topic=2166.0 (http://odug.net/index.php?topic=2166.0)

Concerning the number per Application, you need to look at the segment directly, and know which field name is the "application ID" field (maybe agid / appid) and do like a SELECT appid, count(*) from SEGMENT_TABLE group by appid

I hope that helps.