Previous Topic: SummaryNext Topic: Modifying Process Modules Using IDD


Modifying Process Logic in a Dialog

In the previous chapter, you defined a premap and a response process for dialog XXXDADD. You then executed the Department application to see how these processes affect dialog XXXDADD at runtime.

Based on runtime tests, it may be necessary to modify a dialog's premap or response process. This chapter provides instructions for modifying process module XXXDADD-RESPONSE, which you defined in the previous chapter. This chapter includes:

You can modify a dialog's premap or response process at any time in an application's life cycle. For example, assume that users who test out dialog XXXDADD ask you to change processing so that successfully added department data is not redisplayed to the user. To accomplish this change, you need to modify process module XXXDADD-RESPONSE, which evaluates, stores, and redisplays department data input by users.

Initializing the Map

To initialize map XXXMAP after new department data is added to the database, you will add an INITIALIZE command to process XXXDADD-RESPONSE. The modified process module is shown below.

READY USAGE-MODE UPDATE.
IF AGR-CURRENT-RESPONSE NE SPACES
AND FIELD DEPT-ID-0410 NOT CHANGED
THEN
    EXECUTE NEXT FUNCTION.

OBTAIN CALC DEPARTMENT.
IF DB-REC-NOT-FOUND
THEN DO.

    STORE DEPARTMENT.
    INITIALIZE (DEPARTMENT).  ◄--- This command initializes the
    DISPLAY MSG TEXT               DEPARTMENT record buffer after the values
        'DEPARTMENT ADDED'.        in the buffer are stored in the database.
END.

DISPLAY MSG TEXT
    'TRY AGAIN, OR SELECT: MOD, BACK, OR EXIT'.

When you modify process module XXXDADD-RESPONSE in this chapter, you will:

  1. Modify source commands for the process module by using the IDD menu facility. You used the IDD menu facility in "Adding Process Logic to a Dialog", to define process module XXXDADD-RESPONSE.
  2. Update the modified process module in dialogs that use the process by using the CA ADS catalog compiler (ADSC). In this chapter, you will use ADSC to update modified process module XXXDADD-RESPONSE in dialog XXXDADD.

Steps for modifying a process module and updating the modified process module in a dialog are presented below.

This section contains the following topics:

Modifying Process Modules Using IDD

Updating Modified Process Modules In Dialogs Using ADSC

Summary