PreviousAdis Configuration Utility (Adiscf) Keyboard Configuration Utility (Keybcf)Next"

Chapter 6: Using Adiscf

The COBOL ACCEPT and DISPLAY (Adis) facility enables your program to handle extended (that is, non-ANSI) ACCEPT and DISPLAY processing. Various facilities of Adis can be configured using the Adis Configuration Utility (Adiscf). This chapter shows you how to use Adiscf. Refer to the chapter Adis Configuration Utility for full information about Adiscf.

6.1 Overview

adisctrl is the configuration file for Adis, and stores machine-independent information such as:

The Adis Configuration Utility (Adiscf) provided with your system enables you to customize your ACCEPT and DISPLAY environment.

This tutorial shows you how to modify adisctrl when you want to change your ACCEPT and DISPLAY defaults.

DOS, Windows and OS/2:
On DOS, Windows and OS/2, this tutorial uses the smplaccp program to illustrate the changes as an example. Set your default directory to the one containing the Micro Focus sample programs before beginning the tutorial.


Note: The tutorials use sample programs and files that are copied to your system during installation. If you did not request these programs and files when you installed the product, please run Setup again now and specify that the sample programs be loaded onto your system.


To follow this tutorial:

  1. Compile and Run the smplaccp program (using the default video attributes)

  2. Change the video attributes in the Adis configuration file (adisctrl) using the Adiscf utility

  3. Run the smplaccp program again to see the changed video attributes

  4. Change the file adisctrl to another COBOL Dialect

6.2 Compiling and Running the Program

To compile the program so it can be executed by the Run-Time System, enter one of the following commands:

DOS:
On DOS enter:

xm cobol smplaccp anim;

Windows:
On Windows enter:

cobolw smplaccp anim;

OS/2:
On OS/2 enter:

cobol smplaccp anim;

Next, to run the program, enter one of the following commands:

DOS:
On DOS enter:

run smplaccp

Windows:
On Windows enter:

runw smplaccp

OS/2:
On OS/2 enter:

run smplaccp

The program asks you to enter a password. It is for demonstration purposes only and does not control any security function. You can enter whatever you like (up to eight characters).

Press Enter after you have typed in a password.

You are prompted to enter some data. Again, type in anything you want, up to ten characters.

Press Enter when you have finished entering your data.

The program displays the data you input.

6.3 Altering the Default Configuration

The tutorial takes you through the steps to change the video attributes of the "Please enter your password" prompt.

These steps change your adisctrl file. You might want to back up adisctrl before you work through this tutorial. Afterward, you can restore the backup.

To invoke the Adis Configuration Facility, from the Professional COBOL environment press Ctrl+F8=config then F2=ADISCF. Alternatively enter one of the following commands:

DOS:
On DOS enter:

xm adiscf

Windows:
On Windows enter:

adiscfw

OS/2:
On OS/2 enter:

adiscf

UNIX:
On UNIX enter:

adiscf

The menu shown in Figure 6-1 appears.



Figure 6-1: Adiscf Main Menu

From here, press F2=Alter to alter the default Configuration. The menu in Figure 6-2 appears:



Figure 6-2: Adiscf Alter Configuration Menu

Press F2=Crt-Under Highlighting and the menu shown in Figure 6-3 appears.



Figure 6-3: Adiscf Crt Under Highlighting

Here, you see the word "UNDERSCORE" on the information line indicating that UNDERSCORE is the current (and default) value for Crt-Under.

To change the value of Crt-Under to Reverse Video, press F4=Reverse Video, as shown in Figure 6-4.



Figure 6-4: Adiscf Reverse Video

Now, press Escape to exit from the "Alter Crt-Under Highlighting" menu and return to the Alter Configuration menu, as shown in Figure 6-2 .

The Crt-Under Highlighting was all that you wanted to change this time, so press Escape from here to take you back to the Adiscf main menu, shown in Figure 6 -1.

At this point you have changed the attributes for CRT-Under Highlighting in memory only.

Now you need to save the changes to the adisctrl database. To do this, press F4=Save from the main menu. This displays the menu shown in Figure 6-5.



Figure 6-5: Adiscf Save Menu

An option you have at this point is to create a new configuration in the adisctrl database. The advantage of doing this is that you can test your new configuration (the one with reverse video for Crt-Under) without overwriting your default configuration.

To create a new configuration, press F2=New Configuration. This invokes the menu shown in Figure 6-6.



Figure 6-6: Adiscf New Configuration

Now, you want to name the new configuration. To do this, type "Test configuration" between the braces and press Enter. The menu is modified as shown in Figure 6-7 to display: "Test configuration" on the information line indicating that the currently loaded configuration is the one you have just created.



Figure 6-7: Adiscf Test Configuration

Now that you have created a new configuration, you need to tell Micro Focus COBOL which configuration to use when you execute your program.

To do this, press F6=Choose. This displays the screen shown in Figure 6-8.



Figure 6-8: Adiscf Choose Configuration

You can select the configuration in one of two ways. Either type 6 between the braces or move the cursor to line 6, "Test configuration", and press Enter.

Now you are back at the main Adiscf menu.

Note that the configuration being used at run time is now "Test configuration".

Press Escape, and you are returned to the command line.

6.4 Running the Program with Changed Attributes

Now run the smplaccp program again. The "Please enter your password" prompt is now displayed in reverse video, as long as the adisctrl file that has been modified is in either the current directory or the COBOL system directory.


Note: If you need to change one of the predefined configurations you must use the F3=Load option to load the required configuration into memory. You can then use the F2=Alter option to make any changes.


6.5 Changing Adisctrl to Another COBOL Dialect

Let's say your users are familiar with the way RM COBOL does screen handling, and you wish to emulate this as closely as possible. One way to do this is to change your default dialect in adisctrl to the RM Compatibility configuration.

This type of change is a simple matter of "Choosing" the RM Compatibility configuration.

Invoke the Adis Configuration Facility again. The Adiscf main menu shown in Figure 6 -1 appears.

Press F6=Choose to select the configuration (in this case the dialect) you wish to use. The screen shown in Figure 6-9 appears.



Figure 6-9: Adiscf Predefined Configurations

Here you see the list of predefined configurations available to you.

You want to select the RM Compatibility option. You can select the configuration in one of two ways.

Either type 3 between the braces or move the cursor to line 3, "RM Compatibility", and press Enter. You are returned to the Adiscf main menu, shown in Figure 6-1.

Press Escape to return to the command line. Remember that you need to have the adiscrtl file available to Adis at run time.

6.6 Summary

You have seen the basic process involved in changing the default values in your adisctrl file. The Adiscf utility changes adisctrl.

Typical reasons for changing adisctrl include modifying highlighting options, changing the way an ACCEPT is terminated, or emulating a completely different COBOL dialect.

Whenever adisctrl is modified, you must ensure that the modified copy is available to your users.

This concludes the Adis configuration tutorial.


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

PreviousAdis Configuration Utility (Adiscf) Keyboard Configuration Utility (Keybcf)Next"