Hi Gibellino,
Usually, when I use pam for provisioning vms and complex stuff I have an aux db created for things like that.
It's really useful. When a dataset because to big to be useful, I would either break the data on multiple datasets or just save the info to the aux_db and query just like you want it.
Yes, dataset is saved on pam_lib db, but It's not a good idea to access this data directly, as it can be changed by the development team without notice.
My two cents.