Premap Processes
You add a premap process to a dialog so the dialog can perform processing or access database information before the dialog's map is displayed. If a dialog has a premap process, that process is executed as soon as the dialog begins.
You add a premap process to a dialog by using the ADSC Process Modules screen.
Response Processes
A response process enables a dialog to perform processing after the user inputs data on the map.
You can add any number of response processes to a dialog, enabling a dialog to perform many different processing operations. At runtime, the response process executed for the dialog is determined by actions taken by the user during dialog execution, as described later in this step.
You add a response process to a dialog by using the ADSC Process Modules screen.
Accessing the Process Modules Screen
You access the Process Modules screen by entering 5 at the Screen prompt on the Main Menu and pressing [Enter].
Sample Process Modules Screen
The Process Modules screen is displayed.
Process Modules Page 1 of 1 Dialog XXXDADD 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 Enter F1=Help F3=Exit F4=Prev F5=Next F7=Bkwd F8=Fwd
Screen Prompts
You specify information about the process modules after prompts on the Process Modules screen:
>> For information on declaration modules, see CA IDMS SQL Programming Guide.
At runtime, the dialog's default response process (if any) is executed when the user inputs information on the dialog's map without specifying any response process to be executed.
You will define a premap process and a response process for dialog XXXDADD. You will not define a default response process.
At runtime, the response process is executed for the dialog if the user presses the associated control key while viewing the dialog's map.
You will associate [Enter] with response process XXXDADD-RESPONSE.
At runtime, the response process is executed when the dialog's user enters the response field value in the screen's $RESPONSE field.
For example, assume that you defined response process XXXDADD-MOD to be executed when the user requests transfer to function MODDEP. In this case, you would give response process XXXDADD-MOD a response field value of MOD. This way, MOD first executes XXXDADD-MOD, which then transfers control to function MODDEP.
You will not add a response field value to response process XXXDADD-RESPONSE.
Using ENTER as a Key
When you add response process XXXDADD-RESPONSE to dialog XXXDADD, you will associate the process with [Enter]. ENTER is a good key for this response process because users are accustomed to pressing [Enter] to input information, and are more likely to press [Enter] than a PF key when unfamiliar with the application.
At runtime, whenever the user presses [Enter] to input data for dialog XXXDADD, response process XXXDADD-RESPONSE is executed.
ENTER is often associated with the response process that performs the dialog's major processing. To make it easier for users to input information, the runtime system automatically executes a dialog's ENTER response process when the user inputs information without otherwise specifying a response process to execute.
In the sample application, when using dialog XXXDADD, response process XXXDADD-RESPONSE is executed if the user:
Immediately Executable Function
As an application developer, you can inhibit execution of XXXDADD-RESPONSE when the user requests transfer to MODDEP. To do this, you make function MODDEP an immediately executable function.
At runtime, when the user requests transfer to an immediately executable function, control transfers immediately to that function. No response process is executed before transfer occurs.
For more information on immediately executable functions, see the CA ADS Reference Guide.
The EXECUTE NEXT FUNCTION Command
In this chapter, you will not make function MODDEP an immediately executable function. Instead, you will enable response process XXXDADD-RESPONSE to transfer control. To do this, you include an EXECUTE NEXT FUNCTION command in the process module. When executed, this command transfers control to the function specified by the user.
For example, when you defined XXXDADD-RESPONSE by using IDD earlier in this chapter, you included the EXECUTE NEXT FUNCTION command in the following conditional structure:
IF AGR-CURRENT-RESPONSE NE SPACES
AND DEPT-ID-0415 NOT CHANGED
THEN
EXECUTE NEXT FUNCTION. ◄-- Control transfers to the next
function only when the
above two conditions are met.
AGR-CURRENT-RESPONSE is an element in the system-supplied ADSO-APPLICATION-GLOBAL-RECORD that the runtime system uses for flow-of-control processing.
This conditional structure causes the following different events to occur at runtime:
Adding Process Modules to the Dialog
You use the Process Modules screen to add two processes to the dialog:
|
Process module name |
Type |
Comments |
|---|---|---|
|
XXXDADD-PREMAP |
Premap |
|
|
XXXDADD-RESPONSE |
Response |
Key: [Enter] |
Process Modules Page 1 of 1 Dialog XXXDADD Version 1 Name xxxdadd-premap__________________ 2 Type Version ____ _ Execute on errors Key _____ Value ________________________________ _ Drop Name xxxdadd-response________________ 3 Type Version ____ _ Execute on errors Key enter 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 Enter F1=Help F3=Exit F4=Prev F5=Next F7=Bkwd F8=Fwd
ADSC displays a message confirming that the named process module was found in the dictionary. After the processes have been identified, you can recompile the dialog.
|
Copyright © 2013 CA.
All rights reserved.
|
|