Microsoft KB Archive/46845

From BetaArchive Wiki

Changing ADISCF and Troubleshooting ADISCF Problems

PSS ID Number: Q46845 Article last modified on 07-20-1989

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

Summary: Microsoft COBOL Version 3.00 comes with a program, ADISCF.EXE, that allows you to customize the way that ACCEPTS and DISPLAYS are handled. This article discusses the steps for making changes in ADISCF. It also offers tips for troubleshooting when the changes you make in ADISCF do not take effect. This information applies to Microsoft COBOL Versions 3.00 and 3.00a.

More Information: Note: When you make changes in the ADISCF.EXE program, you do not have to recompile your program for the changes to take effect. ADISCF alters a file called ADISCTRL. Your program reads this file and recognizes the changes made without having to be recompiled.

Making Changes in ADISCF

There are three steps for making changes in ADISCF: 1. From the main ADISCF menu, choose: F2 = Alter. Make the changes to the ADIS feature you want to change. 2. Once the changes have been completed, press the ESC key until you return to the main ADISCF menu. In this menu, choose F4 = Save. The Save menu has two options: a. F2 = New Configuration The ADISCTRL file can contain many different keyboard and screen configurations. Each of these has a name. If you choose F2 = New Configuration, you will be prompted for the name of the new configuration. All of the new settings just made will be stored in this new configuration. However, your new configuration is still stored in the ADISCTRL file together with the other configurations that previously existed. In this way, you can have unique ADIS configurations for each of your programs, each with distinct names, but keep them all grouped together in the ADISCTRL file. This is how each program can have a completely different way of handling SCREEN and keyboard input and output, and ADIS will remember each configuration by name. Only one of these configurations is active at any one time. The Choose function allows you to select the active configuration. Please note: When saving a configuration under a new name, you must choose that configuration. Please see Step 3 below. b. F3 = Overwrite Existing Configuration You can overwrite a configuration that you made previously. This allows you to change one of your previous configurations without having to start over. This also allows you to test each change that is made without making the changes permanent. 3. Once the configuration has been saved, press ESC until you are back to the main ADISCF menu. Now, you must select F6 = Choose to choose the configuration. When the Choose menu appears, highlight the name of the configuration that you just made or changed and press ENTER. The process is complete. To exit ADISCF, press ESC until you are back to the system prompt. The changes have now been made, saved, and chosen.

Tips for Troubleshooting

  1. Whenever you make a change inside of the ADISCF program, you must press ENTER for it to take effect. For example, if you are at a menu and are prompted to make a choice, and you enter Choice 1, you must then press ENTER. If you press ESC to return to the previous menu, you lose your changes. For example, when in one of the ADISCF menus, the following occurs: Adiscf-Choice [1_] <— Press ENTER after you give the choice number and the change takes effect. Adiscf-Choice [1_] <— Press ESC and the change is lost.
  2. It is a common mistake to forget to choose the configuration that you have created. See Step 3 above for instructions on how to do this.
  3. The changes made in the ADISCF program are stored in a file called ADISCTRL. When your .EXE program loads, it looks for this file in the current directory. If it does not find it, your program looks for the ADISCTRL file in the directory given in the COBDIR environment variable. If ADISCTRL is not in either of these directories, then the default settings are used for ACCEPTS and DISPLAYS. Therefore, if ADISCTRL is in any other directory but one of these two, then the changes you make in ADISCF have no effect. For example, if your program is in c:.exe and COBDIR=c:, then ADISCTRL should be in either c:or c:. Note: If you delete ADISCTRL, then all of your changes and settings are lost.

Copyright Microsoft Corporation 1989.