PreviousGetting Started Data DefinitionNext

Chapter 3: Using Dialog System

This chapter describes:

3.1 Main Menu

The facilities described in the following sections are accessed from the Main menu (see the chapter Getting Started for the diagram of the menu tree).

3.1.1 Help (F1)

Pressing F1=help from the Main menu displays a help screen explaining the facilities available from the Main menu. To clear the help screen, press F1=help again or the Space bar.

3.1.2 Data Definition (F2)

Pressing F2=data-definition from the Main menu invokes the Data Definition menu, which you use to specify data fields (see the chapter Data Definition for further details).

3.1.3 Panels (F3)

Pressing F3=panels from the Main menu invokes the Panels menu, which you use to create and maintain panels (see the chapter Panels for further details).

3.1.4 Global Dialog (F4)

Pressing F4=global-dialog from the Main menu invokes the Dialog Definition menu, which you use to specify global dialog. Global dialog contains the procedures and functions that are active for the entire screenset (see the chapter Dialog for further details).

3.1.5 Generate (F5)

Pressing F5=generate from the Main menu invokes the Generate menu, which you use to generate the COBOL copyfile. The copyfile contains the Data Block, and field numbers of all the fields used in the Data Block, to be used by the calling program or a COBOL program. This copyfile, which is simply a file referenced in a COBOL COPY statement, enables the inclusion of COBOL source code from files other than the source code file currently being compiled (see the chapter Generating the Copyfile for further details).

3.1.6 Run (F6)

Pressing F6=run from the Main menu runs the current screenset (see the chapter Running the Screenset for further details).

3.1.7 Print (F7)

Pressing F7=print from the Main menu provides a list of options that you can use to print the current screenset to a text file (see the chapter Printing for further details).

3.1.8 Tutorial (F8)

Pressing F8=tutorial from the Main menu invokes an on-screen tutorial providing a brief overview of the features included in the Dialog System. You can exit from the tutorial at any time by pressing the Escape key.

This action results in the following prompt:

Exit from Tutorial. Are you Sure? Y/N

Press Y to exit from the tutorial and return to the Main menu or N to continue with the tutorial.

3.1.9 Alternate (Alt)

Pressing Alt from the Main menu invokes the Main Alt menu, the functions of which are described in the following section (see the chapter Getting Started for the diagram of this menu in the menu tree).

3.1.10 Escape (Esc)

Pressing Esc from the Main menu results in the following prompt:

Exit. Are you Sure? Y/N

Press Y to exit from the definition software to the operating system command line or N to continue your current session on Dialog System.

3.2 Main Alt Menu

Dialog System works on a single screenset at one time, so to save any data, panels, or dialog that you have defined, you must save them as a screenset. You can subsequently load that screenset to continue working with it. The facilities to do this, and the following other facilities, are accessed from the Main Alt menu:

3.2.1 Help (F1)

Pressing F1=help from the Main Alt menu provides a help screen explaining the facilities available from the Main Alt menu.

3.2.2 Initialize (F2)

Pressing F2=initialize from the Main Alt menu clears the current screenset, which contains definitions that you have created but no longer require. The system is then ready to start a new screenset.

When you press F2 from the current screenset, the following prompt appears:

Are you Sure? Y/N

Press Y to clear the screenset, or N to cancel the initialization procedure.

3.2.3 Load Screenset (F3)

Pressing F3=load-screenset from the Main Alt menu invokes the Load Screenset menu to load a screenset file that you have previously created and saved. If you have worked on a screenset but not saved it, the following prompt appears when you select this option:

Load without saving? Y/N

Press N to return to the Main menu without loading another screenset. Press Y to invoke the Load Screenset menu (see Figure 3-1).


Figure 3-1: Load Screenset Menu

At the prompt, type the name of the screenset to be loaded and press Enter. Alternatively, you can select the directory option, which enables you to select the screenset name from your current directory.

The F2=directory option displays the directory path, and extension of the listed files at the top of the screen. Directly beneath this line there is a list of existing screensets with file extension, date and time of creation, and size in bytes, together with the submenu shown in Figure 3-2.


Figure 3-2: Directory Menu

This Directory menu is available from several Dialog System menus.

If no drive or path is shown, the current default directory is listed. If no extension is specified, the directory lists only the files that can be used at the point from which you entered the directory. For example, if you were loading a source file into the editor, the directory lists source files only.

UNIX:
Figure 3-2 shows a Windows-format path on the status line. On UNIX, the drive designation, F:, does not appear and backslashes (\) are replaced by slashes (/).

3.2.3.1 Select File (Enter)

Pressing Enter from the Directory menu enables you to select a file from the directory listing for loading. Use the <up-arrow> and <down-arrow> keys to highlight the required file, then press Enter. The filename is displayed at the prompt on the Load Screenset menu. Press Enter again to load the screenset.

3.2.3.2 List Files/List Library Catalogue (F2)

Pressing F2=list-files from the Directory menu redisplays the directory, or, if the highlighted file is a library, it lists the files contained in the library with an .lbr extension.

3.2.3.3 List Directories (F3)

Pressing F3=list-dirs from the Directory menu lists the subdirectories in the current directory.

3.2.3.4 Delete File (F4)

Pressing F4=delete-file from the Directory menu displays the following prompt:

Delete filename? Y/N/Esc

where:

filename is the name of the selected file.

Press Y to delete the file, and N or Escape to cancel the delete operation.

3.2.3.5 Sort Name (F5)

Pressing F5=sort-name from the Directory menu sorts the filenames of the files in the directory list into alphabetical order.

3.2.3.6 Sort Time (F6)

Pressing F6=sort-time from the Directory menu sorts the files in the directory list into chronological order.

3.2.3.7 Unsort (F7)

Pressing F7=unsort from the Directory menu shows the files in the directory list in the order in which they were created.

3.2.3.8 List Ascending/Descending (F8)

Pressing F8=list-asc/desc from the Directory menu shows the files in the directory in ascending or descending order, according to the sorting option chosen.

3.2.3.9 Drive (F9)

Pressing F9=drive from the Directory menu invokes a prompt for a drive letter, then lists files for the current directory in the drive you specify. Ensure that there is a disk or tape in the drive you specify before you use this option, otherwise there is a flashing error message. If you get this error message, insert a disk or tape and select the retry option to continue.

3.2.3.10 Control Menu (Ctrl)

Pressing Ctrl from the Directory menu invokes the Directory Control menu as shown in Figure 3-3. This menu offers the sorting options and browse-file facility explained as follows:


Figure 3-3: Directory Control Menu

3.2.3.10.1 Sort Size (F5)

Pressing F5=sort-size from the Directory Control menu sorts the files in the directory in size order.

3.2.3.10.2 Sort Extension (F6)

Pressing F6=sort-ext from the Directory Control menu sorts the files in the directory in alphabetic order of their file extension. Files with the same extension are further sorted in order of filename.

3.2.3.10.3 Browse File (F8)

Pressing F8=browse-file from the Directory Control menu displays the contents of the highlighted file (the system assumes that the highlighted files are in displayable text format).

3.2.3.11 Escape (Esc)

Pressing Esc from the Directory menu exits back to the file prompt on the Load Screenset menu.

3.2.4 Save Screenset (F4)

Pressing F4=save-screenset from the Main Alt menu invokes the Save screenset menu (see Figure 3-4) to save a screenset file that you create. This menu contains the standard help option and also the Directory menu described earlier in the section Load Screenset (F3).


Figure 3-4: Save Screenset Menu

You can use this menu to copy a screenset. Load the screenset and save it with a different name. This does not affect your original screenset.

3.2.5 Screenset Switches (F5)

Pressing F5=screenset-switches from the Main Alt menu enables you to alter the current screenset settings, such as the priority of global or local dialog. The submenu shown in Figure 3-5 is displayed when you select this option.


Figure 3-5: Screenset Switches Menu

3.2.5.1 Normal / Micro Focus Panels (F2)

Pressing F2=normal-MF-panels from the Screenset Switches menu determines whether Dialog System uses its own internal coding (normal) or Micro Focus Panels to manipulate the panels in a screenset at run time. This is an attribute of the screenset and is saved when the screenset is saved. You can change this option at any time during the definition process.

Whether or not you use a Panels screenset depends on your application. The advantage of using a Panels screenset is that these panels can be moved at run time using dialog (using the MOVEPNL function described in the chapter Dialog). The disadvantages are that these panels occupy more memory at run time than normal panels, and that you are limited to 50 panels per screenset compared with the 500 allowed for normal panels screensets. The size of the screenset itself is not affected.

3.2.5.1.1 Default:

Normal panels.

3.2.5.2 Global / Local Dialog First (F3)

Pressing F3=global/local-dialog-1st from the Screenset Switches menu determines the default order in which the dialog for the screenset is obeyed at run time. If the order is set to local first, the dialog for a panel is processed at run time by searching the local dialog first, obeying any keystrokes or procedures defined there and ignoring any definition of those keystrokes or procedures in the global dialog. If a keystroke or procedure is not defined in the local dialog, its definition in the global dialog is obeyed. If the order is set to global first, the reverse is true. See the chapters Panels and Dialog for details of the local and global dialog facilities.

3.2.5.2.1 Default:

Local dialog first.

3.2.5.3 Key Translation Off / On (F4)

Pressing F4=key-translation-off/on from the Screenset Switches menu specifies whether Dialog System's run-time component looks for a module that performs key translation (Dsusrtrn) when this screenset is run (see the section User Control of Every Keystroke in the chapter Programming for more details on this module).

3.2.6 Normal / Top / Bottom Coordinates (F6)

Pressing F6=normal/top/bottom coords from the Main Alt menu determines the type of coordinates that are displayed on the status line. Pressing F6 toggles between the following settings:

Normal When you are in a panel, the displayed coordinates have as their origin the top left-hand corner of the panel. When you are not in a panel, the displayed coordinates have as their origin the top left-hand corner of the screen.
Top The displayed coordinates always have as their origin the top left-hand corner of the screen.
Bottom The displayed coordinates always have as their origin the bottom left-hand corner of the screen.

3.2.6..1 Default:

Normal.

3.2.7 Set Details (F7)

Pressing F7=set-dets from the Main Alt menu displays a panel, similar to that shown in Figure 3-6, which contains the current screenset's details. This is a display feature only.


Figure 3-6: Set Details Screen

3.2.8 Colorize (F8)

Pressing F8=colorize from the Main Alt menu invokes the Colorize menu (see Figure 3-7), where you can specify details of panel colors.


Figure 3-7: Colorize Menu

You can use this feature to create applications whose screens' colors are independent of the hardware on which they are run.

This menu enables you to map attributes used in the screenset onto the COBOL system's attributes. The COBOL system has 16 system attributes available to map onto the attributes used in the screenset. If colorization is on, Dialog System's run-time component uses the system attributes in place of the screenset attributes. The system attributes for your application can, if required, be explicitly specified in a side file named application-name.cfg .

The Colorize menu is also used for setting the default panel palette (see the chapter Panel Painting for details). When a new panel is defined, SYS-2 through SYS-6 form the attribute roll list, and SYS-16 is the panel's default attribute.

The default colorize palette can be specified in the configuration file dsdef.cfg (see the chapter Setting Up the Configuration File for more details).

3.2.8.1 Off / On (F2)

Pressing the F2=on/off toggle from the Colorize menu specifies whether or not Dialog System's run-time component colorizes the screenset.

3.2.8.2 Map Screenset Colors Map to COBOL System (F3-F9)

Pressing one of the keys F3 to F9 from the Colorize menu maps the screenset colors to the COBOL system colors SYS-1 to SYS-7. Colorization is only active if the F2 toggle is set to on.

UNIX:
On UNIX, to assign an attribute from the palette of 255 attributes to one of these function keys, use the <right-arrow> and <left-arrow> keys to move the "X" located on the palette to the desired attribute and press the required function key.

As you scroll the "X" through the palette, the two numbers in parentheses above the palette line change. The first number is the attribute's palette number (1-255) and the second number is its hexadecimal value. When the "X" reaches the far right of the screen, the palette wraps, replacing the current row of attributes with the next selection.

3.2.8.3 More (F10)

Pressing F10=more from the Colorize menu invokes the second colorize menu (see Figure 3-8), which you can use to map the system colors SYS-8 to SYS-16.


Figure 3-8: Second Colorize Menu

3.2.9 Import (F9)

Pressing F9=import from the Main Alt menu invokes the Import Files menu, shown in Figure 3-9 , which enables you to import screenset text files.


Figure 3-9: Import Files Menu

Dialog System can transfer the components of a screenset, for example the Data Block, panel text and panel attributes, between two different screensets using the import and export utilities. The definition of the screenset components is held in a text file. The import utility extracts the information from such a text file to insert new components into a screenset (see the chapter Syntax of Import/Export Files for details on the structure of the text file). It is possible to create your screens in this format (using a method other than export, for example where you are converting from some other application to Dialog System) and then import them into your screenset.

At the prompt, type the name of the screenset to be imported and press Enter. You can alternatively use the Directory menu described earlier in this chapter.

After you select a file, the import of the file begins. The import process consists of two stages, described in the following sections:

  1. syntax checking

  2. semantic checking

3.2.9.1 Syntax Checking

The import file is checked for valid syntax (see the chapter Syntax of Import/Export Files for further details). If any invalid syntax is found, the process is aborted with an error message similar to the following:

FATAL ERROR:LINE 0085 After Token: END Esc: To ABORT.

The error message gives the line number and the last token of syntax that was successfully parsed in the import file. To end the import process when invalid syntax has been found, press the Escape key.

3.2.9.2 Semantic Checking

After syntax checking, the imported details are inserted into the current screenset and the imported information is checked for conditions such as conflicts with existing components in the screenset, or reaching screenset limits. If any errors are found, either recoverable or fatal error messages, as appropriate, are displayed.

Recoverable error messages provide the option to continue with the process. For example, if a field length is too large, the following recoverable error message appears:

ERROR Maximum field-length is 9999 Continue Y/N?

If you select Y to continue, corrective action is automatically taken. In this example, a field length of 9999 would be used.

For a list of recoverable and fatal error messages that could occur when you import an external file, see the chapter Error Messages.

3.2.10 Export (F10)

Pressing F10=export from the Main Alt menu invokes the Export Files menu, shown in Figure 3-10, which enables you to export screenset text files.


Figure 3-10: Export Files Menu

Dialog System can transfer the components of a screenset, for example the Data Block, panel text, and panel attributes, between two different screensets using the import and export utilities. The export utility creates a text file containing the definition of these screenset components (see the chapter Syntax of Import/Export Files for details on the structure of the text file). It is possible to create your screens in this format.

At the prompt, type the name of the screenset to be exported and press Enter. You can use the Directory menu described previously in this chapter. If you do not specify a name, the name work.txt is used. After you select a filename, a popup component list and the Export Component Selection menu appear (see Figure 3-11).


Figure 3-11: Export Component Selection Menu

The popup list contains the following components:

Screenset Details Screenset switches and colorize palette
Data Block Data Block master fields & groups
Error Messages Error messages and error message filename
Validations Validations per master field
Global Dialog Dialog
Panels Text, attributes, fields, groups, dialog

Use the functions in the Export Component Selection menu to select which components you want to export then create the export file or invoke the Export Panel Selection menu.

3.2.10.1 Panel Components (F2)

Pressing F2=panel-components displays the panels component list. This function is available only when the selection bar is positioned on the Panels component and the Panels component is selected. Select the panels components you want to export in the same way as the main components.

The panels component list contains the following components:

Text and Attributes
Fields and Groups
Dialog

3.2.10.2 Select All Entries (F4)

Pressing F4=select-all-entries from the Export Component Selection menu selects every component in the component list for output to the export file. All selected components are marked with the greater-than (>) and less-than (<) symbols.

3.2.10.3 Unselect All Entries (F5)

Pressing F5=unselect-all-entries from the Export Component Selection menu deselects all the components in the component list.

3.2.10.4 Select / Unselect Entry (Space Bar)

Pressing Space=(un)select-entry from the Export Component Selection menu enables you to select the components that you wish to export by selecting or deselecting individual components. Use the <up-arrow> and <down-arrow> keys to move up and down the list to the desired component name, and the Space bar to toggle the component between selected and deselected. Selected components are marked with the > and < symbols.

3.2.10.5 Panel List (Enter)

Pressing Enter from the Export Component Selection menu either creates the export file, or displays a further menu. Use this function after you have selected all the components you want to export. If you have not selected the Panels component, the export file is created. If have selected the Panels component, the popup panel list and the Export Panel Selection menu, shown in Figure 3-12, appear.

You use the Export Panel Selection menu to select the panels that you want to export and create the export file.


Figure 3-12: Export Panel Selection Menu

3.2.10.6 Select All Panels (F4)

Pressing F4=select-all-panels from the Export Panel Selection menu selects every panel in the panel list for output to the export file. All selected panels are marked with the > and < symbols.

3.2.10.7 Unselect All Panels (F5)

Pressing F5=unselect-all-panels from the Export Panel Selection menu deselects all the panels in the panel list. This is useful if you want to export only the Data Block.

3.2.10.8 Select / Unselect Panel (Space Bar)

Pressing Space=(un)select-panel from the Export Panel Selection menu enables you to restrict what is exported by selecting or deselecting panels. Use the <up-arrow> and <down-arrow> keys to move up and down the list to the desired panel name, and the Space bar to toggle the panel between selected and deselected. Selected panels are marked with the > and less-than < symbols.

3.2.10.9 Export Details (Enter)

Pressing Enter from the Export Panel Selection menu creates the export file. Use this function after you have selected all the panels you want to export.

3.2.10.10 Import Limitations

Import is not an effective way to update a screenset, because if you import components into a screenset that already contains identically named components, those components are not updated. For example, you cannot change values such as the length, usage, or properties of a master field by importing an identically named field with new values. The best way to update a screenset is to use the following steps:

  1. Load the screenset.

  2. Export all components of the screenset to an export file.

  3. Edit the file to make required changes.

  4. Import the file into an empty screenset to obtain an updated version of the screenset.

  5. Save the screenset.

The following table lists the limitations in this version of Dialog System:

Component/ sub-component
Insert
Update
Comments
Screenset Details
  First Panel n/a Yes (exist by default
  Screenset Type n/a Yes (and thus can only
  Key Translation Flag n/a Yes (be updated
  Colorization Palette n/a Yes
Data Block
  Master Field Yes No
  Master Group Yes No
Error Messages Yes Yes
Validations
  Null Yes Yes
  Range-Table Yes Yes
  Check Digit Yes Yes
  Date Yes Yes
Global Dialog
  Key Entry Yes Yes see note below
  (i.e. Key+Ftns+Params)
Panel
  Attribute Palette n/a Yes inserted with the panel
  Border n/a Yes inserted with the panel
  Text/Attributes Yes Yes
  Field Yes No no insert to existing group
  Group Yes No
  Select Bar n/a No bar is inserted with Group
Dialog
  Key Entry Yes Yes


Note: The following keys cause problems with the import parser, and cannot currently be imported:

[ (left square bracket)
] (right square bracket)
" (double quote)
^ (caret)

Although you cannot import these keys, you can use them in a dialog. You must remove these keys from a dialog before you export it, and add them manually to the dialog after you have imported it.


Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousGetting Started Data DefinitionNext