Procedure Properties--Process

Top  Previous  Next

The Process procedure template sequentially processes a data file. You can specify a filter or range of on which records to perform the operation.. A predefined window contains a progress indicator to show the end user what percentage of the operation is complete.

Procedure Name

The Procedure Name is displayed here. Press the ellipsis button to change the name if desired. You will be prompted for a New Procedure Name, and the ability to Accept or Discard your changes.

Template

The base template type used by this procedure is displayed here. You can change the template type by pressing the ellipsis button to the right. The Select Procedure Type dialog is displayed for a new selection if needed.

Description

A short text description for the procedure, which appears next to the procedure name in the Application Tree dialog.

Press the ellipsis ( ... ) button to edit a longer (up to 1000 characters) description.

Category

A category is used to help you group procedures together when the Category Tree Mode is active.

Module Name

The source code file to hold the code for the procedure. Select from the dropdown list. By default, the Application Generator names modules by taking the first five characters of the .APP file name, then adding a three digit number for each module.

Prototype

Allows you to optionally type a custom procedure prototype which the Application Generator places in the MAP section.

Parameters

Allows you to optionally enter any parameter names (a list of variables separated by a comma)

Declare Globally

Check this box to generate the procedure's prototype into the PROGRAM's MAP, rather than the MODULE's MAP. This makes the procedure callable from any other procedure, but it also forces a recompile of all program modules whenever you change the prototype.

Export Procedure

Declares the procedure in the export file, enabling it to be called by another application. Note: This checkbox is only available when the target file specified in Application Properties is a Dynamic Link Library (.DLL).

Actions

If any control templates were pre-defined in the current procedure template, or were in a window or report by you, this button accesses the Actions dialog for the control templates.

Control templates provide "off the rack" controls, such as list boxes, and the code to maintain them. This allows you to start with a "bare" procedure template, such as the generic window, and add controls to create your own browse or form windows.

Window

Calls the Window Designer, to visually design the window. Press the ellipsis button to access the Window Editor.

Report

Calls the Report Designer, to visually design the window. Press the ellipsis button to access the Report Editor.

 

In the Actions dialog:

Parameters

Lets you specify parameter names (an optional list of variables separated by commas, with the entire list surrounded by parentheses) for your procedure, which you can pass to it from a calling procedure. You must specify the functionality for the parameters in embedded source code. See Also: PROCEDURE Calls .

Return Value

For functions, lets you specify the variable receiving the return value.

Process Behavior

Press this button to control the behavior of the Window. See Window Behavior

ListBox Styles

Press this button to maintain any List Box Styles used by this procedure. See List Box Styles.

BIND Fields and Procedures

Press this button to maintain all BINDed variables and procedures used in this procedure. See BIND Fields and Procedures.

Process Properties Button

Press this button to define the process properties set up by the templates See below.

 

Process Properties

General

Window Message

The message displayed in the Progress Window dialog located just above the progress control, by default.

Action for Process

The action to perform for each record processed.

 

No record action specifies no action to be performed by the process template. Use embedded source to handle the action.

 

PUT record specifies that a record will be added.

 

DELETE record specifies that each record processed will be deleted.

Use RI constraints on action

Check this box to enforce the RI constraints defined in your data dictionary. Clear this box to generate a simple PUT or DELETE depending on the Action for Process chosen.

Use Process Action to set Window Text

Check this box to place the Action for Process selection text in the Progress Window’s title bar at runtime. If unchecked, the title text used in the Window Formatter will be the default.

Query Each Deletion

Check this box to specify that the user is prompted to confirm each record deletion.

MDI Progress Window

Check this box to specify that the Progress Window generated for this process will be MDI. This option is necessary if you plan to allow multiple processes to run on different threads at the same time. The disadvantage to this could be a slight reduction in process generation performance. DO NOT check this box if your process procedure is not threaded.

Progress Interval Timer

Enter a value in hundredths of a second that specifies the timer interval for this process. The lower the number, the progress update will show a smoother display during process generation. The larger the interval, the less frequent the progress window will be refreshed. Use this setting when you plan to run multiple processes at the same time, and need to fine tune the intervals between process procedures.

Quick-Scan Records

Specifies buffered access behavior for ODBC, ASCII, DOS, or BASIC files. These file drivers read a buffer at a time (not a record), allowing for fast access. In a multi-user environment these buffers are not 100% trustworthy for subsequent access, because another user may change the file between accesses. As a safeguard, the driver rereads the buffers before each record access. To disable the reread, enable QUICKSCAN.

Record Filter

Type an expression to limit the contents of the process to only those records which match the filter expression. This filters all displayable records. When a Record filter is used in conjunction with a Range Limit, only those records within the specified range are filtered. See Also: Using Range Limits and Filters

 

You must BIND columns used in a filter expression. See Hot Fields below.

 

Additional Sort Fields

Type a comma delimited list of fields on which to sort. These sort fields are in addition to the key for the report set in the Data / Tables Pad dialog. If no key is specified, this is the sort order used allowing you to sort records without a key.

Record Count Override

When processing in record order (no key), this number is used to calculate what percentage of the operation is complete to provide feedback to the end user. If you don't specify a number, the process "counts" the records before processing begins. This can be relatively fast or slow depending on the file system and the file size. You must supply an appropriate record count when you use a Record Filter (or a Range Limit that results in a filter).

Set progress bar limits manually

Clear this box to make your procedure read the result set and set the progress bar limits automatically. Setting limits automatically may produce poor performance for some SQL data sets, or erratic or inaccurate progress indicator for unevenly distributed result sets. Check this box to manually provide progress bar limits for the procedure. Setting manual limits can provide faster performance for SQL drivers and more accurate progress indicators for unevenly distributed result sets. This setting is only effective if you specify a Key for the File in the Data / Tables Pad dialog.

Low Progress Bar Limit

Supply the lowest "free" key element value for the result set. You may type the value or the label of a variable containing the value. Enclose literal string values in single quotes ('value').

High Progress Bar Limit

Supply the highest "free" key element value for the result set. You may type the value or the label of a variable containing the value. Enclose literal string values in single quotes ('value').

 

 

 

Range Limits

Range Limit Field

Type in the field name or press the ellipsis (...) button to select the field from the Component list. The Range Limit Field must be a component of the Access Key specified in the Data / Tables Pad. The range limit is key-dependent; the generated source code uses the SET statement to find the first valid record.

Range Limit Type

When a field is selected for Range Limit Field, this specifies the method of determining the records for inclusion in the list box.

 

Current Value -- Signifies the value contained in the key field at the beginning of the ACCEPT loop. This is the value used for the range for the duration of the procedure.

 

Single Value -- Specifies a variable containing the limiting value. Only records matching the variable are included. Enter a variable in the Range Limit Value box which appears, or press the ellipses (...) button to select the variable from the Select Column dialog.

 

Range of Values -- Lets you specify upper and lower limits. Enter a variable in the Low Limit and High Limit Value boxes which appears, or press the ellipses (...) button to select the variables from the Select Column dialog.

 

File Relationship -- Lets you choose a range limiting file from a 1:MANY relationship. The Range Limiting field must be the "One" side of a One-to-Many Relationship with the Primary File used in the Process. The relation's linking key must be the same as the Access Key for the procedure. Enter a file in the Related File box, or press the ellipses (...) button to select it from the Select Column dialog.

 

Hot Fields

You must BIND any variables or EQUATEs used in a filter expression. Press Insert to add the variable to the Hot Fields list, and check the Bind Field box.

Classes

Use the Classes tab to override the global settings for the Class. See Classes Tab.

 

Procedure Properties--Tabs