Previous Topic: Display structural messagesNext Topic: Correct structural errors


Display diagnostic messages

You display the ADSC Dialog Process Source screen to view a listing of the process module with diagnostic messages. You use this screen to find syntax errors in process module commands. Syntax errors (for example, mistyped commands and omitted periods) are the most frequent cause of compile-time errors.

Accessing the Dialog Process Source Screen

To access the Dialog Process Source screen,

When a message indicates that there are compile errors in your process code, use the Display messages option from the Compile activity on the action bar first to access the Compiled Process Modules screen.

    Add  Modify  Compile  Delete  Display  Switch  ._____________________________________________________________________________.               │                         │               │  2  1. Compile          │ log Compiler               │     2. Display messages │               │-------------------------│ nternational, Inc.               │ F3=Exit                 │               │_________________________│     Dialog name . . . . . . .   XXXDADD     Dialog version  . . . . .      1     Dictionary name . . . . .   DEMO     Dictionary node . . . . .   ________     Screen  . . . . . . . . .   1  1. General options                                    2. Assign maps                                    3. Assign database                                    4. Assign records and tables                                    5. Assign process modules  Select 2, then Enter to see compile errors.  Command ===>  Enter  F1=Help  F3=Exit  F10=Action

Compiled Process Modules Screen

                          Compiled Process Modules          Page    1 of    1                           Dialog XXXDADD   Ver    1   Name XXXDADD-PREMAP                                        1 Commands   Version 0001    Type 3                                     1 Errors   Key PF3         Value                                      2 1. Display                                                                2. Print   Name ________________________________                        Commands   Version ____    Type _                                       Errors   Key _____       Value                                      _ 1. Display                                                                2. Print   Name ________________________________                        Commands   Version ____    Type _                                       Errors   Key _____       Value                                      _ 1. Display                                                                2. Print   Name ________________________________                        Commands   Version ____    Type _                                       Errors   Key _____       Value                                      _ 1. Display                                                                2. Print  Type: 1=Declaration  2=Premap  3=Response  4=Default Response Select a process for Display or Print.  F1=Help  F3=Exit  F7=Bkwd  F8=Fwd  F11=Dialog-level messages

The Compiled Process Modules screen shows the total number of commands in the process module and the number of errors encountered. You have the option of displaying the process code with the errors noted or printing them.

To display the process code, select 2 next to the process module you want to see and press [Enter].

The Dialog Process Source screen is then displayed.

Dialog Process Source Screen

                             Dialog Process Source            Page    1 of     1  ._____________________________________________________________________________.  <PROCESS> XXXDADD-PREMAP                   0001      100   DSPLAY MSG TEXT              'ENTER DEPARTMENT INFORMATION, OR SELECT: MOD, BACK, OR EXIT'.            $    <E>   DC157001 INVALID INITIATING KEYWORD FOR COMMAND. STMT FLUSHED.  .____________________________________________________________________________.  F3=Exit  F5=IDD  F7=Bkwd  F8=Fwd  F11=Next.error

Some errors cause error messages to be displayed for subsequent correct commands. For example, if you forget to put a period after a command, the next command line is incorrectly treated as a continuation of the first command.

Determining the Causes for Compile-Time Errors

When you attempt to add this process module to a dialog, compile errors will occur. You use the Dialog Process Source screen to determine the causes for compile-time errors. To do this, you:

  1. View the Compiler Process Modules screen by selecting the Display messages option from the Display activity on the action bar of the Main Menu.
  2. View the Dialog Process Source screen by selecting the Display activity from the Compiled Process Modules screen.

    Messages are displayed on this screen after statements that ADSC cannot compile. For example, assume that you made the following mistakes when you defined process module XXXDADD-RESPONSE earlier in this chapter:

    READY USAGE MODE UPDATE.                 ◄-- There should be a dash (-)
    IF AGR-CURRENT-RESPONSE NE SPACES            between USAGE and MODE.
    AND FIELD DEPT-ID-0410 NOT CHANGED
    THEN
        EXECUTE NEXT FUNCTION.
    
    OBTAIN CALC DEPARTMENT                   ◄-- There should be a period at
    IF DB-REC-NOT-FOUND                          the end of this statement.
    THEN DO.
    
        STORE DEPARTMENT.
        DISPLAY MSG TEXT
            'DEPARTMENT ADDED'.
    END.
    
    DISPLAY MSG TEXT
        'TRY AGAIN, OR SELECT: MOD, BACK, OR EXIT'.
    

    In this example, the error in the USAGE-MODE keyword results in diagnostic messages for two correct commands that follow the OBTAIN command. You do not need to change these two correct commands.

  3. Page the screen back and forth if necessary:
  4. Note what requires correction in the process module source or in other dialog components.

    It is a good idea to write down the errors that you note.

When you have looked at your errors, press [PF5] to go directly to IDD. The process module is question will be displayed on the screen.