Rocket U2 | UniVerse & UniData

 View Only

 Unidata Limits

Kevin King's profile image
Kevin King posted 12-19-2024 12:52

Is there a document somewhere that lists Unidata limitations?  i.e. longest TCL command line, maximum number of indexes, maximum memory per process, that sort of thing?

John Jenkins's profile image
John Jenkins

Kevin,

A large number fo the limitations are available from the LIMIT command - noting that exact values may vary between platform and version:

:LIMIT
U_MAXFNAME: Unix file name limit = 118.
U_NAMESZ: Record id(key) size = 126.
U_SELEMAX: Number of select list = 10.
U_MAXDATA: Number of DATA statement = 500.
U_HEADSZ: HEADER/FOOTER length = 2120.
U_MAXHASHTYPES: Number of hash functions = 4.
U_MAXSORT: Number of sort fields(BY...) in LIST = 20.
U_MAXWITH: WITH stack size = 512.
U_MAXWHEN: WHEN stack size = 60.
U_MAXCAL: Number of SUM+AVG+PCT+CAL in LIST = 54.
U_MAXBREAK: Number of BREAK.ON+BREAK.SUP in LIST = 15.
U_MAXLIST: Number of attribute names in LIST = 999.
U_LISTATTR: Number of attribute symbols in LIST = 250.
U_LINESZ: Page width in printing = 272.
U_PARASIZE: Paragraph name and its parameter size = 256.
U_LPCMD: System spooler name = lp -c.
U_MAXPROMPT: Number of prompts allowed in paragraph =60.
U_FSIZE: Dictionary field name size = 31.
U_MAXVALUE: Number of values WHEN can handle = 10240.
U_SENTLEN: Maximum sentence length = 9247.
U_PROCBUFSZ: Proc buffer size = 8191.
U_NIDES: Maximum number of virtual fields in query= 256.
:

 

As far as memory usage as a whole, 32-bit UniData (now EOL) had a 2Gb limit per process, whereas 64-bit UniData (all current versions) has a limit that for all practical purposes can be treated as infinite - 9,223,372,036,854,775,808. Noting that Operating System limitations rule, so if on UNIX and ulimit is lower, then that is the imposed limit.

The 'udtconfig' file is also worth checking for internal configurables and dependencies.

Regards

JJ

Kevin King's profile image
Kevin King

Thanks John. Specifically looking for the max length of a TCL command.  Is that in here?  U_SENTLEN perhaps?

Kevin King's profile image
Kevin King

John, a little context.  I'm working on a program that is looking to purge records from a file that has ... 60-80 million records.  Those records have a product number in the key (but not the whole key) and that field is indexed.  So if I have 1000 products to remove, I'd like to build up a TCL command that selects the file with PROD.NUM = "value1""value2""value3"... to leverage the index.  But ... how big is TOO big before Unidata says "yeah, no, we're not gonna do that"?

Thomas Ludwig's profile image
Thomas Ludwig

Hi Kevin,

Although this doesn't directly answer your actual question, it might still be a viable approach:

If the maximum possible length of the TCL command is what concerns you in the overall process, then it might be a good idea to start the SELECT with SAMPLE 1000 or less and repeat it until no more records come back. In other words, a sort of paging...

As long as you're deleting, this should work without any issues.

Best regards,

Thomas

Kevin King's profile image
Kevin King

Thank you Thomas.  That's exactly what I'm doing.  Just wasn't sure where I should make the break.

Joseph von Arx's profile image
Joseph von Arx

I'm a Universe guy so Unidata is not my area, but I wonder what is the benefit of doing this as a TCL command?  If you are writing a program, I would use one of two approaches.

Loop through your list of products to remove and use selectindex basic command, then do one of two things.

  1. Rather than build a TCL statement, simply execute a delete.
  2. Use FORMLIST basic command to save the list of IDs to a saved list.  Move on to next product to remove, call FORMLIST for second list, and execute a LIST.UNION on the two lists for combined list.  Once all product IDs are processed into one giant list of records to delete, do a get.list and execute a delete.

Personally, I would go with option 1.  Again, I am not familiar enough with Unidata to know if they have the same commands as Universe, but both options above avoid the TCL sentence limit.

Kevin King's profile image
Kevin King

I didn't think about that SELECTINDEX option.  That's a winner right there.  Thank you for the tip!