It would be helpful if you provided some details, e.g. a directory listing of your backup file location, the command lines you are typing and the DLC version you are using to do so, the resulting messages/errors, etc.
This means that some process is currently connected to the database. It could be a single-user client session or a utility, for example the compiler session you mentioned.
This command line assumes the database is open in multi-user mode, i.e. that a broker has been started for the database...
To programmatically create the table and then load data into it, you could use the prodict/load_df.p and prodict/load_d.p routines from the Data Dictionary code. More info:
Progress KB - How to programmatically dump and load database definitions (.df's) and data (.d's) files using Data...
A DBI file is created by a SQL server to store query results during a query. I don't know if you can prevent it but you can change its location by specifying the -T <directory> (temp directory) parameter on your SQL broker, so at least these files won't fill up your database partition.
You could count them yourself:
define variable i as integer no-undo.
for each table where condition:
i = i + 1.
For a scrolling query (subject to documented conditions), there is a num-results function. A dynamic query handle has a num-results attribute.
Date data type range: 1/1/32768 B.C. to 12/31/32767 A.D.
The century chosen for date values with a two-digit year format is governed by the -yy startup parameter...
for each dictdb._file no-lock where _file._tbl-type = 't' by _file-name:
find dictdb._storageobject no-lock where _storageobject._db-recid = _file._db-recid
and _storageobject._object-number = _file._file-number...
When you say "location", do you mean where a table is located within the database (i.e. its storage area) or the physical location(s) on disk?
Also, I don't know what you mean by "custom" in this context.
A simple way to find table locations is to run a dbanalys or tabanalys report:
It shows interactions with the OS, i.e. invocations of API functions, across a variety of classes: process and thread events, network events, registry events, and file system events. There's a bit of a learning curve but it's quite a powerful tool and there's a fair bit of information online...