System Maintenance Tools

Application Parameter Configuration

The NOMADS Application Parameter Configuration utility is used by developers to define custom parameters specific to their applications and set their values. Parameters can consist of string, numeric and Boolean variables, as well as System Parameters. The descriptions and defined values are stored in the parameter file, providex.prm, which must be accessible. Values may also be accessed through a series of CALLs that allow you to retrieve, edit and save the values as a string composed of assignment pairs that can be executed to load the values.

This utility is accessed from the NOMADS Session Manager by selecting Utilities > Application Parameter Configuration from the menu bar. You will be prompted to open the appropriate providex.prm file. If the system detects that the providex.prm file does not exist in the location specified, you will be asked if you want to create it. Responding Yes creates the file automatically and displays the Application Parameter Configuration window below.

This window consists of the following:

Application

Name used to identify the application.

Prompt

Description of the parameter. If Variable is left blank, then this description will be used as the caption for the dialogue box in the Edit_SettingsCALLed routine.

Variable

Name of the variable to be used as a parameter or the system parameter to set.

Type

Data type of the parameter. Available selections are String, Numeric or Boolean.

Min
Max

For Strings, this sets the minimum and maximum lengths.

For Numerics, this sets the minimum and maximum values.

For Boolean values, these are set to 0 and 1.

Value

Sets the current value of the parameter.

Default

Default parameter settings.

*PARAM – Accessing Parameter Values

Four entry points into the *PARAM program are provided to allow access to the parameter values: Get_Settings, Get_Defaults, Edit_Settings and Save_Settings. All of them have the same relative syntax:

CALL "*param;entry_point", appname$, parameterstring$, param_file$

Where:

 

entry_point

See Entry Points below.

 

appname$

Name used to identify the application.

 

parameterstring$

Return string consisting of assignment pairs and SET_PARAM directives.

 

param_file$

Path to the providex.prm file. (Optional)

Entry Points

These four entry points are explained below.

Get_Settings

Used to return the current settings for the parameters.

The Get_Settings entry point requires that you pass the application name as the first argument. The second argument will then be loaded with a string consisting of a series of assignment pairs and/or system parameter settings, as in the following example (using the values in the screen shot above):

Example:

   gimme$="Everything",gotcha$="Nothing",amount=0;SET_PARAM 'xi'=1

This string can then be executed to load the currently set values into the variables or to set the system parameters.

Get_Defaults

Used to return the default settings for the parameters.

The Get_Defaults entry point requires that you pass the application name as the first argument. The second argument will then be loaded with a string consisting of a series of assignment pairs and/or system parameter settings, as in the following example (using the values in the screen shot above):

Example:

   gimme$="Lotsa money",gotcha$="Lotsagrief",amount=99;SET_PARAM 'xi'=1

This string can then be executed to load the default values into the variables or set the default system parameters.

Edit_Settings

Used to edit the current settings.

The Edit_Settings entry point requires that you pass the application name as the first argument. The second argument can be used to pass a parameter string whose values will be parsed for editing or null (" ") to edit the current settings. An interactive dialog box is presented based on the parameter configuration information:

  

The settings may be updated or the default values restored. When the OK button is selected, a parameter string containing the new assignment pairs and system parameter settings is returned in the second argument. The new settings are not written to the providex.prm file. To do that, you must use the Save_Settings CALL (below).

Save_Settings 

Used to write parameter values to the providex.prm file.

The Save_Settings entry point requires that you pass the application name as the first argument. The second argument must be a parameter string containing the assignment pairs for the updated settings.

 

Note:
The FN%PARAM_UPDATE$(parameterstring$) function will merge the current values into a parameter string.