Tutorial Toolkit Function Descriptions > Model > General
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
General
The following routines return general information and allow manipulation of the model file.
 
db_get_db_version
(db_ver)
Description:
Retrieves the database version.
Input:
none
Output:
STRING
db_ver[]
Database version. Success or failure of routine.
INTEGER
<Return Value>
SQL error code.
Example:
Please see db_get_db_version (p. 29) in the MSC Acumen Toolkit - Code Examples.
  
db_get_general_field
( <field_id>, <term_id>,<field_data_length>,<term_field_id>, <term_function_type>, <field_data>)
Description:
This function returns term_field_id, term_function_types and field_data from the field form. The input to the function are the field_id, term_id and the length of the field data. It returns a positive integer indicating the status of the execution of the function.
Input:
INTEGER
field_id
The id of the field.
INTEGER
term_id
Term order of creation in the general field.
INTEGER
field_data_length
Length of the expression stored.
Output:
INTEGER
term_field_id
Field id of the term
INTEGER
term_function_type
Function type id
0 - Field expression.
1 - Utility functions.
2 - PCL Math Built-Ins.
3 - PCL String Built-Ins.
STRING
field_data[ ]
String containing the field expression.
INTEGER
<return value>
0 for success and 1 for failure
Error Conditions:
None.
Example:
Please see db_get_general_field (p. 29) in the MSC Acumen Toolkit - Code Examples.
 
db_get_general_field_length
( <field_id >, <count>,<term_id>,<field_data_length>)
 
Description:
This function returns the term_id and field_data_length of the field_id from which the length of field is required. It returns a positive integer indicating the status of the execution of the function, 0 for success.
Input:
INTEGER
field_id
The id of the field.
INTEGER
count
The count of term_ids in the field.
Output:
INTEGER ARRAY
term_id()
The term id's for the field.
INTEGER ARRAY
field_data_length()
Length of the strings of the field data.
INTEGER
<return value>
0 for success and 1 for failure.
Error Conditions:
None.
Example:
Please see db_get_general_field_length (p. 32) in the MSC Acumen Toolkit - Code Examples.
 
db_get_model_file_suffix
(name, suffix)
Description:
Retrieves the model file suffix associated with the named analysis code.
Input:
STRING
name[31]
Name of the analysis code for which the suffix is to be retrieved.
Output:
STRING
suffix[6]
Location into which the named suffix is to be retrieved.
INTEGER
<Return Value>
Success or failure of routine.
Error Conditions:
13000002
Unrecoverable database error.
13000007
An unspecified database error occurred.
Example:
Please see db_get_model_file_suffix (p. 35) in the MSC Acumen Toolkit - Code Examples.