Previous Topic: Using ADSANext Topic: Using MAPC


Using ADSC

ADSC is the application development tool used to define dialogs. Dialogs are associated with dialog functions in applications. At runtime, a dialog interacts with the user by means of a map (screen). A dialog also performs processing, such as updating the database.

The first screen in an ADSC session is the Main Menu screen. A sample Main Menu screen is shown below:

┌─ │     Add  Modify  Compile  Delete  Display  Switch └─ .____________________________________________________________________.                                CA ADS Online Dialog Compiler                            CA, Inc. ┌─ │  Type and select. Then Enter or select an action. │ │     Dialog name . . . . . . .   ________ │     Dialog version  . . . . .   ____ │     Dictionary name . . . . .   ________ │     Dictionary node . . . . .   ________ └─ ┌─    Screen  . . . . . . . . .   1  1. General options │                                    2. Assign maps │                                    3. Assign database │                                    4. Assign records and tables │                                    5. Assign process modules └─             Copyright (C) 2003 CA, Inc.  Command ===>  Enter  F1=Help  F3=Exit  F10=Action

Enter information about the dialog after prompts in the Specification area.

Select the next ADSC activity or screen from Screen prompt.

To get from one ADSC screen to another, you can either enter the number associated with the screen on the Main Menu (and press [Enter]) or press [PF5] to move through the sequence of screens.

Select an action by tabbing to the action bar or selecting with the command line.

What You Can Do

You can use ADSC to perform the following procedures:

The following table describes how to use ADSC to perform the procedures listed above. Instructions in the table assume that you have already invoked ADSC, as discussed in Invoking Development Tools earlier in this appendix.

For more information on these and other ADSC procedures, refer to CA ADS Reference Guide.

Operation

Procedure

Adding a dialog

Procedure to define a skeleton dialog (for a prototype application) or a fully functional dialog.

Enter basic information about the dialog on the dialog Main Menu screen:

  • The dialog name
  • A dictionary name/node (when applicable)

Associate a map with the dialog on the Map Specifications screen.

Associate a subschema or access module with the dialog on the Database Specifications screen.1

If you are creating a skeleton dialog, you can now proceed immediately to Step 5 to compile the dialog.

Optionally make additional specifications on appropriate ADSC screens:

  • Specify additional dialog options (for example, symbol and diagnostic tables to simplify the application development process) by using the Options and Directives screen.

For more information on the Options and Directives screen, see "Step 2: Specify dialog options" in Chapter 12.

  • Associate one or more work records or SQL-defined tables with the dialog by using the Records and Tables screen, as described in "Adding a work record to a dialog" later in this table.
  • Associate a declaration module, premap process, and one or more response processes with the dialog by using the Process Modules screen, as described in "Adding processes to a dialog" later in this table.

Create a dialog load module by selecting the Compile activity from the action bar on the Main Menu.

For an example of using ADSC to add dialogs, see Chapter 10, "Defining Dialogs Using ADSC".

Modifying a dialog

Procedure to modify a dialog definition. This procedure cannot be used to modify a dialog name2.

Display the dialog definition (if not already displayed)by entering the following on the Main Menu screen:

  • The dialog name
  • The dictionary name/node (when applicable)

Modify dialog specifications on appropriate ADSC screens:

  • Optionally add or modify dialog options by using the Options and Directives screen. For more information on the Options and Directives screen, see "Step 2: Specify dialog options" in Chapter 12.
  • Optionally add or modify map information on the Map Specifications screen. For more information on the Map Specifications screen, see "Step 3: Name the associated map" in Chapter 9.
  • Optionally add or modify subschema or access module information on the Database Specifications screen. For more information on the Database Specifications screen, see "Step 3: Add a subschema" in Chapter 12.
  • Optionally add, modify, or delete work record specifications or tables on the Records and Tables screen, as described later in this table.
  • Optionally add, modify, or delete the process module specifications on the Process Modules screen, as described later in this table.

Recompile the dialog load module by selecting the Compile activity on the Main Menu.

For examples of modifying dialogs, see "Updating modified maps in dialogs using ADSC" in Chapter 11 and "Updating modified process modules in dialogs using ADSC" in Chapter 13.

Deleting a dialog

Procedure to delete a dialog from the data dictionary.

Enter the following information on a blank Main Menu screen:

  • The dialog name
  • the dictionary name/node (when applicable)

Choose the Delete activity from the action bar.

Confirm or rescind the deletion.

For an example of using ADSC, see Chapter 10, "Defining Dialogs Using ADSC".

Adding a work record to a dialog

Procedure to make an existing work record or table available to a dialog and its processes3.

To add a work record to the data dictionary, see "Using IDD" later in this appendix.

Display the Records and Tables screen by selecting4 from the Main Menu screen.

Enter the name of the work record or table to be associated with the dialog under the Record name prompt.

If this is a work record, enter a nonblank character under the prompt Work.

For an example of adding a work record to a dialog, see "Step 3: Add a work record" in Chapter 15.

Deleting a work record from a dialog

Procedure to delete a work record or table from a dialog.

This procedure does not delete a work record from the data dictionary4.

Display the Records and Tables screen by selecting4 from the Main Menu screen.

Enter a nonblank character in the Drop column opposite the work record or table to be deleted.

For an example of how to use the Records and Tables screen, see "Step 3: Add a work record" in Chapter 15.

Adding process modules to a dialog

Procedure to associate existing process modules with a dialog.

To define a process module in the data dictionary, see "Using IDD" later in this appendix.

Display the Process Modules screen by selecting5 from the Main Menu.

Enter the name of the process module to be associated with the dialog after the Name prompt.

Specify the type of process module it is: declaration, premap, response, default response.

If this is a response process, enter the following information:

  • A control key (optional) specified after the Key prompt.
  • A response field value (optional) specified after the Value prompt

Note: Each response process must have a key and/or a response field value, or be the default response.

  • Execution status on input errors (optional) enabled by entering a nonblank character before the Execute on edit errors prompt; in this case, the response process is executed at runtime even when input errors are entered.

For information on automatic editing, refer to CA IDMS Mapping Facility Guide.

Press [Enter] to add the process module to the dialog definition.

For an example of using ADSC to associate a process module with a dialog, see "Adding process modules to dialogs using ADSC" in Chapter 12.

For more information on the Process Module screen, refer to CA ADS Reference Guide.

Modifying a process module

Procedure to associate a modified process module with a dialog or to replace the current process module.

This procedure does not modify source statements for the process module in the data dictionary5.

Display the Process Modules screen.

Optionally change the process module name by typing over the displayed name. The new name must identify an existing process module in the data dictionary.

Optionally modify specifications:

  • Key
  • Value
  • Execute on errors
  • Type (1=Declaration, 2=Premap, 3=Response, 4=Default response)

Press [Enter] to input modified Process Modules screen specifications.

For an example of modifying a process module specification, see "Updating modified process modules in dialogs using ADSC" in Chapter 13.

Deleting a process module from a dialog

Procedure to delete a process module from a dialog.

This procedure does not delete the process module from the data dictionary.6

Display the Process Modules screen (if it not already displayed) by selecting 5 from the Main Menu.

Enter a nonblank character next to the Drop prompt.

For an example of using the Process Modules screen, see "Adding process modules to dialogs using ADSC" in Chapter 12.

Compiling the dialog

Procedure to compile process code and create the dialog load module.

Create a load module for the application by selecting the Compile activity from the action bar on the Main Menu.

ADSC will attempt to compile all process modules associated with the dialog and, if successful, create a load module.10

Note: If ADSC finds errors during the compile, the process module is not added to the dialog. ADSC displays an error message.

In this case, you must view and correct process module errors and then recompile the process module. For more information, see "Viewing process module errors" later in this table.

Viewing process module errors

Procedure to view compile-time errors and error messages found by ADSC in a process module.

To correct errors in process modules, see "Correcting syntax errors" and "Correct discrepancies between dialog components" later in this table.

Display a listing of the module and its errors:

  • Choose the View messages option from the Compile activity on the action bar on the Main Menu.

Correcting syntax errors

Procedure to correct syntax errors (such as omitted periods or misspelled words) in a process module.

To view error messages for a process module, see "Viewing process module errors" earlier in this table.

Choosing the View messages option from the Compile activity on the action bar of the Main Menu will bring you to the Compiled Process Modules screen.

On the Compiled Process Modules screen, choose Display to go to the Dialog Process Source screen. The Dialog Process Source screen will show you the process source and errors encountered by the compiler.

Press [PF5] to move to IDD to correct errors.11

For an example of using IDD and ADSC to correct syntax errors, see "Correct syntax errors" in Chapter 12.

Correcting discrepancies between dialog components

Procedure to correct discrepancies between a process module and another dialog component (for example, a map, record, record element, or subschema).

To view error messages for a process module, see "Viewing process module errors" earlier in this table.

Choosing the View messages option from the Compile activity on the action bar of the Main Menu will bring you to the Structural Error Display screen.

Correct the errors by using the appropriate development tool:

  • For errors made on ADSC screens (such as an incorrect subschema name), proceed to the appropriate screen and change the specification.
  • For errors made in a different development tool (such as a record definition made by using the IDD menu facility):
  • Transfer to the development tool by selecting the Switch activity from the action bar on the Main Menu (if you are operating under TCF) and specify the task code for the development tool.

For more information on transferring to other development tools, see "Invoking development tools" earlier in this appendix.

  • Correct and recompile the definition:

To modify maps, see "Using MAPC" later in this appendix.

To modify work records, elements, and process modules, see "Using IDD" later in this appendix.

  • Transfer back to ADSC (if necessary) by using the Switch activity.

Recompile the dialog.

For a discussion of correcting discrepancies between dialog components, see "Correct discrepancies" in Chapter 12.

Notes:

1 You do not have to name the subschema and schema in the following situations:

An access module needs to be named only if the dialog is accessing a database using SQL statements and an existing access module is going to be used.

2 To modify a dialog name, copy the dialog definition to a new dialog name using the Copy option of the Add activity on the action bar on the Main Menu. Delete the old dialog.

3 Work records associated with the dialog's map are automatically available to the dialog and do not need to be added to the dialog separately.

4 To delete a work record from the data dictionary, see "Using IDD" later in this appendix.

5 To modify process module source statements in the data dictionary, see "Using IDD" later in this appendix.

6 To delete a process module from the data dictionary, see "Using IDD" later in this appendix.

7 To define a process module in the data dictionary, see "Using IDD" later in this appendix.

8 You can associate a response process with several control keys and/or response field values. To do this, add the response process to the dialog several times, each time specifying a different control key and/or response field value for the response process. Only one copy of the compiled response is included in the dialog load module.

9 To modify process module source statements, see "Using IDD" later in this appendix.

10 Whenever you select the Compile activity, ADSC compiles all process modules before creating a load module for the dialog.

11 When you switch to IDD from ADSC after encountering compile errors, you are in full-screen mode in IDD.

For more information on IDD full-screen mode, refer to CA IDMS Common Facilities Guide.