PreviousOverview Using Dialog SystemNext"

Chapter 2: Getting Started

This chapter describes:

2.1 Invoking Dialog System

DOS:
If you are running under DOS, you invoke the Dialog System Definition software from the command line by typing:

xm dsch

and pressing Enter.

OS/2:
If you are running under OS/2, enter:

dsch

UNIX:
If you are running under UNIX, enter:

ds

If you are running Dialog System on an operating system other than DOS, OS/2 or UNIX, see your Release Notes for details of the command to invoke the software on your particular operating system.

When you invoke Dialog System, an identification screen containing copyright notices, the software version number and your User Reference Number appears briefly and is then replaced by a screen containing a status line and the Main menu at the bottom.

The Main menu looks similar to Figure 2-1. Depending on the type of terminal you are using, you might see either a single or double line on the status line.



Figure 2-1: Main Menu

2.1.1 Status Line

The status line, located just above each menu, gives the current status of the active panel. As you work with the Dialog System, the status line is updated with the following information:

Name This is the name of the current menu or selected screenset. If you are working on a new screenset, "New set" is displayed.
Function name This is the name of the function currently in use in a submenu (if applicable).
Attribute This reflects the character attribute selected (if applicable).
Row This shows the number of the row in which the cursor is positioned. This row number might be relative to the current panel or to the top or bottom of the screen.
Col This shows the number of the column in which the cursor is positioned. This column number might be relative to the current panel or to the left-hand side or right-hand side of the screen.
Ins, Caps, Scroll These indicators show the status of the Insert, Capitals, and Scroll toggles.
Alt, Ctrl These indicate that an Alternate menu or Control menu available with the current facility is active; they are in bold when the keys are pressed. There is a limitation, described in the next section, on the use of these keys in UNIX environments.

2.1.2 Menu System

Dialog System operates under a hierarchy of menus, with one menu leading into another. The current menu is always displayed at the bottom of the screen. However, it is possible to remove the menu from the screen, if desired (see the chapter Panel Painting for details).

From the Main menu, you can access the submenus, which provide main definition functions, testing functions, and utilities, by pressing the appropriate function key. You can also access the Main Alternate (Alt) menu by holding down the Alt key from the Main menu (see Figure 2-2). This menu enables you to access the screenset functions, access some additional utilities, and set some defaults.



Figure 2-2: Main Alt Menu

DOS:
To select a facility from the Main Alt menu on DOS, press the appropriate key while you hold down the Alt key. To return to the Main menu from the Main Alt menu, release the Alt key.

UNIX:
To select a facility from the Main Alt menu on UNIX, toggle the Alt key on (so that Alt appears on the status line) and then press the appropriate function key. To return from the Main menu, toggle the Alt key off.

Many menus in the system contain Alternate or Control Menus, which are accessed in the same way as the Main Alt menu. The mnemonics "Alt" or "Ctrl" appear on the lower right side of the menu if these facilities are available.

UNIX:
In UNIX environments, if you press the Alt or Ctrl keys when the Alternate or Control menus are not available, the current menu remains on the screen, but the system beeps when you press a function key. To return to the current menu so that you can select the desired facility, toggle the Alt or Ctrl key off (so the mnemonic disappears from the status line).

Figure 2-3 shows a simplified menu tree for Dialog System. There are detailed descriptions of all the menus throughout this manual.



Figure 2-3: Menu Tree for Dialog System

To return from a selected submenu to the previous menu without executing any of the available facilities, you simply press the Escape key. So, if you enter a submenu and subsequently decide that you do not wish to use any of the available options, you can exit it without affecting any of the work you have done on your screenset.

2.1.3 Help Screens

All menus in the Dialog System contain a help facility, which is accessed by pressing the F1=help key. This provides a help screen associated with the function or menu you last selected. For example, requesting help from the Main menu results in a help screen explaining the seven other facilities available from the Main menu. Requesting help from the Data Definition menu results in help screens explaining the two facilities available for data definition. The menu from which you requested help remains visible at the bottom of the screen. You can clear the help screen by pressing F1 again or the Space bar. All Dialog System help screens behave in the same way, so they are not described with the other menu facilities detailed throughout this manual.

2.1.4 UNIX Keyboard Mapping

UNIX:
Some UNIX terminals might not provide all the control keys referred to earlier in this chapter. If your terminal does not, you can use the following key sequences to achieve the same effect:

Control Key
Equivalent
Alt /a or /A
Ctrl /c or /C
/ //
Escape /@
F1 to F9 /1 to /9
F10 /0
Help /H
Maphelp /m
Insert /i
Delete /d
Backspace /b
Home /h
End /e
Tab /t
Backtab /T
Caps Lock /l or /L
Scroll /S
PageUp /p
PageDown /n
Clear-to-End-of-Screen /E

Remember that UNIX is case sensitive, so you must ensure that any of these key sequences, particularly those for Tab and Backtab, are entered in the appropriate case.

2.2 Key Usage in Dialog System

As well as the options available on each menu, there are some keys that have particular functions in Dialog System when you lay out the details of a panel or when you use lists. The following two sections show the available functions, the key used to invoke the function, and a description of the resulting action. If your keyboard does not have the control keys shown below, please consult your Release Notes to see which keys on the standard keyboard for your system provide the equivalent functions.

2.2.1 Painting Panels

Function
Documented Key
Description
Cursor left <left-arrow> Moves the cursor left one character position within the limits of the panel.
Cursor right <right-arrow> Moves the cursor right one character position within the limits of the panel.
Cursor up    <up-arrow> Moves the cursor up one line within the limits of the panel.
Cursor down <down-arrow> Moves the cursor down one line within the limits of the panel.
Enter Enter Moves the cursor to the first character position on the next line.
Tab <right-arrow>| Moves the cursor four positions to the right within the limits of the current panel.
Backtab |<left-arrow> Moves the cursor four positions to the left within the limits of the current panel.
Left of Panel Home Moves the cursor to the left- hand side of the current panel.
Right of Panel End Moves the cursor to the right- hand side of the current panel.

2.3 Using Dialog System from the Command Line

You can use Dialog System from the command line in batch mode.

DOS:
If you are running under DOS, use a command in the format:

xm dsch input-option output-option [update-option]

16-bit OS/2:
If you are running under 16-bit OS/2, use a command in the format:

dsch input-option output-option [update-option]

32-bit OS/2:
If you are running under 32-bit OS/2, use a command in the format:

dsch32 input-option output-option [update-option]

UNIX:
If you are running under UNIX, use a command in the format:

ds input-option output-option [update-option]

The parameters are:

input-option Mandatory. Must be one of the following batch mode options:

*is screenset-name Load a screenset from a screenset file.
*ie export-file Load a screenset from an export file.
output-option Mandatory. Must be one of the following batch mode options:
*os screenset-name Save result to screenset file.
*oe export-file Save result to export file.
*op print-file Save result to print file.
*oc copyfile Create a copyfile.
*ob copyfile Create a copyfile in which no screenset name is prefixed to data-names.
*oy logfile Create an amended export file that identifies/fixes potential Year 2000 problems, and a logfile DS.LOG. See the section Year 2000 Support below for details.
*om logfile Create an amended export file that identifies/fixes potential Year 2000 problems, and a logfile DS.LOG. See the section Year 2000 Support below for details.
*od logfile Create an amended export file that identifies/fixes potential Year 2000 problems, and a logfile DS.LOG. See the section Year 2000 Support below for details.
update-option Optional. Can be the following batch mode options:
*ue export-file Apply amendments from export file.

where:

* should be replaced by the slash character (/) for non-UNIX applications, and by the exclamation mark (!) for UNIX applications.

The options are not case sensitive, and you can specify them in any order. You can specify the filename for an option immediately adjacent to the option, or separated from it by spaces.

For example, in OS/2, to open a screenset oldsset.s, apply the amendments in the export file modfile.txt and save the resulting file as the screenset newsset.s, use the following command:

dsch /is oldsset.s /ue modfile.txt /os newsset.s

When running in batch mode, the command line is displayed on the screen. After run completion you receive either the message 'Completed OK' or an error message.

A log file (ds.log) is either created in the current directory, or, if it already exists, is appended with the information that is displayed on the screen. Every log file entry contains a date and time stamp.

This file is in text format, and can be listed or edited. You can delete the file, in which case a new log file will be created in the current directory during the next batch run.

2.4 Year 2000 Support

You can use the batch mode of Character Dialog System to identify potential Year 2000 problems.

Year 2000 problems can occur where dates in programs are specified as two-character years; dates in this format cannot cater correctly for the century change. The solution is to change such dates to a four-character year format.

The Year 2000 support in Dialog System produces a report in the log file ds.log and displays the screenset to screen, highlighting areas where dates are being used without four-character year fields. An export file is also produced that contains a screenset that has been automatically corrected by Dialog System. The export file contains comments against all changes made.

To identify potential Year 2000 problems, three new output options are provided to the command line interface: oy, om, and od. For information on the command line, see the section Using Dialog System from the Command Line, above. Each option represents one of the four-character year date formats that Dialog System supports; use:

oy To check for dates in YYMMDD format, and to replace with YYYYMMDD
om To check for dates in MMDDYY format, and to replace with MMDDYYYY
od To check for dates in DDMMYY format, and to replace with DDMMYYYY

For example, the command line:

dsch !is example1 !oy yearfile

loads the screenset example1.S, and creates the export file yearfile.Y20. The export file will contain a screenset that has been automatically corrected by Dialog System; non-conformant dates are replaced with date entries in the format YYYYMMDD.

The default output extension to the export file is .Y20.

After Dialog System has automatically made corrections to the screenset, you might need to amend the screen layout, as the date changes made will produce larger fields. On the screen this can lead to two fields overlapping. In this case, at run-time Dialog System ignores the second field. The export file contains comments to draw your attention to each field where this has occurred.

Since the data block will have changed (with a comment against each changed entry in the export file), you need to regenerate the screenset copybook, and recompile your application. You should check what effects the change in date format has on the logic of your program, and edit the program if necessary before compiling.

You should regard the export file as an aid to dealing with the Year 2000 problem, but you should decide on a case-by-case basis whether to accept any changes made, or to revert to the previous version. To do this you will also need a copy of a normal export file from the screenset, which you can create using the *oe output option .


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousOverview Using Dialog SystemNext"