Database Utilities
The database of user's jobs is stored in the array called 'database' and this saved to a file project_directory/CCP4_DATABASE/database.def in a standard def format file. It is strongly discouraged to access the database array directly from any procedure outside of this file. An empty database is defined in the file $CCP4I_TOP/etc/database.def. Each job in a project is given a job id which is an integer which is incremented, from 1, for every new job. The currently supported database parameters are NJOBS (the number of the highest job id in the database) and then parameters *,$n where n is the job id and the required values of * are given below. These parameters are written to the project database file, there are additional parameters may be saved in the database array but not be saved to file.
TASKNAME The name of the type of task
DATE The date that the job started (if still running) or finished saved as the machine time.
STATUS A one-word job status
LOGFILE The file name of the log file (NOT the full path name)
TITLE A text string of the job title provided by the user
INPUT_FILES A list of the input file names (not paths UNLESS the user has specified Full path rather than used a directory alias)
INPUT_FILES_DIR A list of the project/directory aliases for the input files
INPUT_FILES_STATUS Currently unused
OUTPUT_FILES A list of the output file names (not paths UNLESS the user has specified Full path rather than used a directory alias)
INPUT_FILES_DIR A list of the project/directory aliases for the output files
OUTPUT_FILES_STATUS Currently unused
Each project that the user creates will have it's own database.def file and the appropriate file is loaded whenever the user changes between projects. The database.def file is updated from memory after every significant change. The time taken to read a database.def file is significant for projects with many jobs - it may be worth considering an alternative format for database.def in future.
APIs to Access the Database