Previous Topic: Step 1:  Retrieve the Process Module DefinitionNext Topic: Updating Modified Process Modules In Dialogs Using ADSC


Step 2: Modify Source Statements

You defined process module XXXDADD-RESPONSE in num=12.Adding Process Logic to a Dialog. In this step, you will modify source commands in the process module so that the dialog's screen is initialized for redisplay after the user inputs a new department record.

To modify source commands for a process module, you use the Process Source screen. You can display the Process Source screen for process module XXXDADD-RESPONSE as shown.

Displaying the Process Source Screen

Type the screen identifier (SRCE) in the command area.

-> srce
                                                                [Enter]

The Process Source screen is displayed.

      IDD REL 15.0           *** PROCESS SOURCE ***                        SRCE  ->                                             PAGE 1 LINE 1             1/17                   PROCESS 'XXXDADD-RESPONSE' VERSION 1  ---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---- 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.     DISPLAY MSG TEXT         'DEPARTMENT ADDED'. END. DISPLAY MSG TEXT     'TRY AGAIN, OR SELECT: MOD, BACK, OR EXIT'.

Modifying the Process Module

To modify process module XXXDADD-RESPONSE, you need to insert an INITIALIZE RECORDS command in the source commands for the process module:

  1. Place the cursor on the line after which new statements are to be added.
  2. Press the control key that inserts new lines on IDD screens (a different control key may be defined at your site).

      IDD REL 15.0           *** PROCESS SOURCE ***                        SRCE  ->                                             PAGE 1 LINE 1             1/17                   PROCESS 'XXXDADD-RESPONSE' VERSION 1  ---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---- 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.     DISPLAY MSG TEXT         'DEPARTMENT ADDED'. END. DISPLAY MSG TEXT     'TRY AGAIN, OR SELECT: MOD, BACK, OR EXIT'.

Add the INITIALIZE statement and press the control key that applies changed or inserted lines to IDD screens (a different key may be defined at your site).

      IDD REL 15.0           *** PROCESS SOURCE ***                        SRCE  ->                                             INSERTING NEW DATA LINES                   PROCESS 'XXXDADD-RESPONSE' VERSION 1  ---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----     STORE DEPARTMENT.     initialize (department).

The updated process statements are displayed.

Press [Enter] to store the updated process module in the data dictionary:

      IDD REL 15.0           *** PROCESS SOURCE ***                        SRCE  ->                                             PAGE 1 LINE 1             1/18                   PROCESS 'XXXDADD-RESPONSE' VERSION 1  ---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---- 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).     DISPLAY MSG TEXT         'DEPARTMENT ADDED'. END. DISPLAY MSG TEXT     'TRY AGAIN, OR SELECT: MOD, BACK, OR EXIT'.

When you press [Enter], IDD updates the process module in the data dictionary. Then, the Process Source screen displays a message like:

PROCESS 'XXXDADD-RESPONSE' VERSION 1 MODIFIED

>> For more information on inserting lines in a process module, see CA IDMS Common Facilities Guide.

Exit from IDD

After you successfully modify process module XXXDADD-RESPONSE, you can exit from IDD. In this sample session, you will transfer directly from IDD to ADSC to update dialog XXXDADD. To do this, use the SWITCH command, followed by the task code for ADSC.

You enter the SWITCH command in the command area of any IDD menu facility screen:

-> switch adsct
                                                                [Enter]

After you exit from IDD, you can use ADSC to update the modified process module in any dialog that uses it.