AnsweredAssumed Answered

generating system ID (5,000,000 numbers) but CMN_SEQ tables are missing in

Question asked by beekerc2 on Dec 10, 2009
Latest reply on Dec 17, 2009 by Paul_Maxwell
 If you want to create an object instance via SQL (yes i know the dangers and implications, however, subject to CA review, the practice is not uncommon), one thing you need to do is generate/obtain an ID or PRID number (commonly referred to as the "5-million number") that is unique and maintained by Clarity.   In previous versions, there were a set of tables beginning with CMN_SEQ_ that contained a single column in a single row that was an incremental counter.   In v12.0 those tables are missing, howeve there is a PRCOUNTER table that thas the fields (columns) PRNAME and PRLASTID, which looks like a collection of sequence numbers.   However, it does not look like a complete list of objects or tables as I cannot find reference to any of the custom sub-objects (or their corresponding tables) within PRCOUNTER.   So, my questions are -    1) is this indeed the ID counter repository for Clarity?2) Where do I find the ID counters for any of my custom sub-objects?3) How does   one go about obtaining an ID and making sure the counter is incremented?   I would assume a stored procedure, but which one?  the background is that I am needing to create several sub-object instances on a regular or on-demand basis, based on certain criteria in the Project (parent) object and my choices are XOG through GEL, but this would still require a lot of SQL to return parameters and guidelines.   or all SQL, where the criteria is evaluated, then as needed, sub-object instances are created via SQL.   I've analyzed, through SQLTrace, what happens when a sub-object instance is created and the important pieces seem to be making sure a unique system ID (the 5-million) number is assigned, the created date/by and last updated date/by are entered, the partition is recorded and the parent's ID is also captured, but the only thing that's known in advance is the system ID value.   so that's what I'm trying to determine how to properly retrieve.  Thanks in advance,BeekerC

Outcomes