Enhanced ACCEPT/DISPLAY SyntaxNext

Chapter 1: Introduction

MERANT provides many methods for creating user interfaces in both character and graphical environments. Your Net Express Help contains details on creating graphical user interfaces.

This on-line book introduces you to the tools that are available within Net Express for creating character user interfaces. These include:

These specialized features make it easy for you to create sophisticated and user-friendly character user interfaces for your applications. They are provided for backwards compatibility only, so we recommend that you do not use them when creating new applications.

1.1 Using Enhanced ACCEPT/DISPLAY (Adis) for Character Interfaces

The enhanced ACCEPT/DISPLAY syntax enables screen position and screen attributes to be specified. You can do either single-field or multiple-field ACCEPT operations. For multiple field ACCEPT operations, FILLER describes the number of character positions to skip over to the next field. In a DISPLAY operation, FILLER defines the number of spaces between literals. All areas defined as FILLER are unaffected by the ACCEPT or DISPLAY operation.

The enhanced ACCEPT/DISPLAY and Screen Section ACCEPT/ DISPLAY operations use a run-time support module called Adis, or enhanced ACCEPT/DISPLAY syntax. Adis can be configured to an application's requirements using the configuration utility Adiscf. Calls can also be made from the COBOL application to Adis to configure it at run time; for example, to enable function keys.

Advantages
Disadvantages

1.2 Using ANSI ACCEPT/DISPLAY for Character Interfaces

The ANSI ACCEPT syntax enables you to input a data item or accept the day, date or time into a data item. The ANSI DISPLAY syntax enables you to output literals and the contents of data items.

Advantages
Disadvantages
Comment

Only for elementary screen output and keyboard input.

1.3 Using Panels for Character Interfaces

Panels provides comprehensive text windowing support using a call interface. Any number of windows can be created and manipulated from a COBOL program, with up to 255 visible at a time. The visible part of a panel occupies a rectangular area of the screen which can be as large as the physical size of the screen. Each panel can contain up to 65,536 characters. A comprehensive range of functions for manipulating a panel is provided; for example, scrolling, block updates of characters and attributes, moving the panel, and changing the size of the visible area. Output from the Adis module (supporting enhanced ACCEPT and DISPLAY syntax) can be directed to a panel by using the call interface.

Advantages
Disadvantages

1.4 Using the Screen Section for Character Interfaces

The Screen Section is a section in the Data Division containing one or more screen definitions. A screen definition can contain fields, groups, text and attributes. Fields can have edited picture-strings and can also have such features as NO-ECHO, JUSTIFIED RIGHT and BLANK WHEN ZERO. The screen definitions are accepted and displayed in the Procedure Division.

Advantages
Disadvantages
Comment

Useful if you want to have your screen definitions in a single place in the Data Division and want your applications to be X/Open compliant.

1.5 Using COBOL System Library Routines for Character Interfaces

The low-level interface is supplied by the COBOL system library routines. These routines enable you to access low level functionality from a COBOL program. The example below shows only one method of putting text and attributes on the screen. Many other calls exist to access screen and keyboard functionality.

Advantages
Disadvantages
Comment

Useful if you specifically want to exploit the features of your machine and operating system, or if you require minimal memory overheads for your screen handling. Note that complicated screens might require many calls to these routines.

1.6 Using Windowing Syntax for Character Interfaces

Your COBOL system supports syntax for drawing lines and boxes on the terminal screen, and for creating virtual terminal windows on a physical terminal. All ACCEPT and DISPLAY statements then act within the current window (except for ACCEPT format 1, 2, or 3 statements, DISPLAY format 1 statements, and DISPLAY WINDOW/LINE/BOX statements). The syntax also enables underlying displays to be kept and restored.

Advantages
Disadvantages
Comment

Useful if you want a simple way of adding text windowing to a COBOL application.


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

Enhanced ACCEPT/DISPLAY SyntaxNext