Previous Topic: Records and Tables ScreenNext Topic: CA ADS Runtime System


Process Modules Screen

The Process Modules screen is used to associate a declaration, premap, response process, or default response process with a dialog.

Premap Process

The Process Modules screen is used to associate or dissociate a premap process with a dialog. A premap process must exist in the data dictionary as a process module before it can be associated with a dialog.

Response Process

A response process must exist in the data dictionary as a process module before it can be associated with a dialog. For a response process, the screen prompts the application developer for a control key and/or a response field value used to initiate the response process when the dialog executes at runtime.

If a batch dialog response field for an input record is the concatenation of several fields, the response field value specified on this screen must include any embedded blanks that occur in a concatenation.

The Process Modules screen allows the application developer to specify whether the response process is to be executed even if the map contains input errors. If map input errors are allowed, automatic editing is performed as usual for the dialog's map. The user is not required to correct errors before the response process begins execution. The response process is executed, but the erroneous data is not mapped in. The response process can test for map fields in error with an IF statement.

Note: For more information on automatic editing, see the CA IDMS Mapping Facility Guide.

More than one control key or response field value can be associated with a response process. The application developer defines the response process repeatedly as a new response, each time specifying a different control key and/or response field value until all control keys and response field values to be associated with the response process have been specified. Note that the response process is compiled and stored in the dialog load module only once.

Declaration Module

A declaration module is used under the SQL Option to declare cursors and to issue global WHENEVER statements. The statements in a declaration module are not executed. They are compiler directives used by the CA ADS dialog compiler at dialog compilation.

Declaration modules allow you to store declarations you have specified as global to your application.

Unlike the premap and response process modules, the declaration module cannot contain executable CA ADS commands. This module can contain only DECLARE CURSOR statements and WHENEVER directives.

A WHENEVER directive or DECLARE CURSOR statement is also valid in a premap or response process, but the scope of such a statement is not global.

Note: For more information about the usage for WHENEVER and DECLARE CURSOR, see the CA IDMS SQL Programming Guide. For more information on the declaration module, see the CA IDMS SQL Programming Guide.

Default Response

Specifies that the named process module is the optional default response process of the dialog. At runtime, after a mapin operation, the runtime system executes the default response process if no response process can be selected based on control event or response field value.

Dissociating a Process

The Process Modules screen is also used to dissociate a response process from a dialog. The developer places a nonblank character next to Drop opposite the process to be deleted.

Multiple Processes

Up to 4 processes can be specified on one page of the Process Modules screen. Using [PF8], you can display additional pages.

Compiling the Process

When the application developer chooses Compile from the action bar in the activity selection area of the Main Menu screen, the dialog compiler compiles all processes associated with the dialog. ADSC returns the following message after a successful compile:

DC498140 Dialog TESTDIAL version    1 has been successfully compiled.

If a process does not compile successfully, the application compiler indicates the number of errors encountered.

The application developer can view the source code and error messages for the process by selecting item 2, Display messages, from the Compile window on the action bar in the activity selection area of the Main Menu screen.

Sample Screen

Process Modules Page 1 of 1 Dialog NAME1 Version 1 Name ________________________________ _ Type Version ____ _ Execute on errors Key _____ Value ________________________________ _ Drop Name ________________________________ _ Type Version ____ _ Execute on errors Key _____ Value ________________________________ _ Drop Name ________________________________ _ Type Version ____ _ Execute on errors Key _____ Value ________________________________ _ Drop Name ________________________________ _ Type Version ____ _ Execute on errors Key _____ Value ________________________________ _ Drop * Type : 1=Declaration 2=Premap 3=Response 4=Default Response DC498166 Neither a map nor premap are defined Enter F1=Help F3=Exit F4=Prev F5=Next F7=Bkwd F8=Fwd

Field Descriptions

Name

Specifies the 1- to 32-character name of the module associated with the current dialog as a premap process, a response process, or a declaration module. The specified source module must exist in the data dictionary.

Version

Specifies the version number in the range 1 through 9999, of the named process source module. The default version number is the system version default version number, as specified at system generation. If no system number is specified at system generation, the default version number is 1.

Key

Specifies the online control key or batch control event that initiates the runtime response process. Valid control key specifications are:

Considerations

Valid batch control events are as follows:

Value

Specifies a 1- to 32-character response name that can be entered in a $RESPONSE map field to initiate the response process at runtime. The response field value can contain embedded blanks.

If the current dialog is associated with an application function, the application developer can associate a response process in the dialog with an application response. This is done by entering in the Value field the specification entered in the Response Name field of the Response Definition screen during application definition. Additionally, the same control key must be specified in the Key field on both the dialog compiler Process Modules screen and the application compiler Response/Function List screen.

By associating a dialog's response process with an application response, the application developer can place security restrictions on the response process. Additionally, the response process can be displayed as a valid response on runtime menus.

Type

Specifies the type of module.

Execute on Errors

Specifies that the response process executes even if the map contains input errors. Map fields in error are not mapped in. The map field status condition test can be used to test for fields in error.

When this option is not selected, the user must correct all map fields in error before processing continues.

Drop

Specifies that an existing process module is being dropped from the dialog definition.

If Drop is specified. the dialog compiler dissociates the process module from the dialog but does not delete the source from the data dictionary.

More information:

CA ADS Screens

Introduction to CA ADS

CA ADS Runtime System

Suspending a Session

Conditional Expressions

Conditional Commands