# Synopsis

PDX_MSGT mda_GetModelDefaults(long option, MDA_MODEL_INFO *model_info)

# Purpose

Obtain model defaults.

# Description

The default model information is returned. The application then passes this structure to mda_AllocateModel. The only field which must be set before the mda_AllocateModel call is ddf. The other fields documented below may also be changed to control certain characteristics of the model. .RS 3 .TP 17 DDF *ddf Address of the DDF entry (from the _ddf.h file)

.TP char modelnam[MDA_MAXLEN] Name to be associated with the model.

.TP char backptrs Flag indicating if back pointers are to be stored. If set to a non-zero value, the parents of an entity may be obtained by calling the function mda_GetParents. If not set then backpointer information will not be available. See the mda_intro man page for restrictions on backpointers

.TP char keep_stats Flag indicating if profiling statistics should be kept for the model. If set to a non-zero value, various statistics about the swap file associated with the model will be displayed when the model is freed. These statistics can be used to determine the optimal settings for the buf_count and buf_size fields.

.TP int buf_count Number of in-memory buffers to associate with the model. The default number is 16 for all systems except MVS which defaults to 64. Increasing this value results in additional memory being allocated for the model. See the buf_size field for additional information.

.TP long buf_size Size of each in-memory buffer for the model. The default size is 4096 bytes for all systems except MVS which defaults to 16384. Parts of the disk based entity swap file are stored in these buffers to increase performance. The buf_count field determines the number of buffers while the buf_size field defines the size of each buffer. A total of buf_count*buf_size bytes will be dynamically allocated to the model when mda_AllocateModel is called. The optimal values for these parameters is best determined through performance profiling and using the keep_stats flag. As a general rule, models with large numbers of entities benefit from additional buffers while models with very large entities benefit from increasing the buffer size. Note that there is additional overhead required to maintain each buffer so increasing the buffer count past a certain threshold may reduce performance.

.TP MDA_PARSER (*parser) () The function to be invoked when mda_ParseFile is called. .TP MDA_FORMATTER (*formatter) () The function to be invoked when mda_FormatFile is called.

.TP MDA_VALIDATE (*validate) () The function to be invoked when mda_ValidateModel is called.

.TP MDA_MDL_FUNC (*allocate) () The function to be invoked when mda_AllocateModel is called.

.TP MDA_MDL_FUNC (*Free) () The function to be invoked when mda_FreeModel is called.

.TP MDA_MDL_FUNC (*setcur) () The function to be invoked when mda_SetCurModel is called.

.TP MDA_MDL_FUNC (*pre_restore) () The function to be invoked by mda_RestoreModel to perform any cleanup before the saved model file is restored. The model must not contain any entities when this function returns.

.TP MDA_MDL_FUNC (*post_restore) () The function to be invoked by mda_RestoreModel after a saved model file has been restored.

.TP void *udata A pointer to application data to be associated with the model. The mda subsystem simply stores a pointer to the data which the application is responsible for maintaining. The pointer may be retrieved with the function mda_GetModelUdata. .LP .RE

# Input

## option

Options (not used)

# Output

## model_info

The default model information structure

# Return

MDA error code