Highlighted
Respected Contributor.
Respected Contributor.
714 views

KEYSTROKE HAS NO MEANING HERE

I HAVE A LEGACY SYSTEM THAT I AM CONVERTING TO VISUAL STUDIO. HOW DO I GET THE PROGRAMS TO RECOGNISE FUNCTION KEYS ?

0 Likes
6 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: KEYSTROKE HAS NO MEANING HERE

In which product is your legacy system written, Workbench, Net Express, other?
If you are using ACCEPT/DISPLAY statements in your program you can configure the behavior such as the function keys either by setting options in the ADISCTRL file using the utility adiscf.exe which is found in the Visual COBOL bin folder, or by making calls to the library routine X"AF" using function 1.

If you have a previous ADISCTRL file from your legacy system then you should bring this over to your Visual COBOL project and make sure that it ends up in the executable folder along with your compiled program.

There is a default ADISCTRL file under C:\Program Files (x86)\Micro Focus\Visual COBOL\etc. If you copy this to your executable folder and then open up a Visual COBOL command prompt and change directories to the executable folder and type adiscf it will allow you to modify the settings. You can turn on the function keys using this method.

There is also an example program called ADISDemo available in the Samples Browser that shows how to turn on the function keys using the X:AF" call instead.
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: KEYSTROKE HAS NO MEANING HERE

Thanks Chris. I'll try these suggestions. The system was written in Micro Focus Cobol. I found a ADISCTRL in the old folder which I have copied to the new executable folder. I no longer get the message 'Keystroke has no meaning here' but it is still not recognizing it. I'll try the other options. Many thanks Shirley
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: KEYSTROKE HAS NO MEANING HERE

Hi Chris
The function keys now work. Thanks so much.
However the programs also have PGDN and PGUP which toggles between the various onscreen displays. How do I get the system to recognize these? Previously the value for PGUP was 53 and PGDN was 54.
Regards
Shirley
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: KEYSTROKE HAS NO MEANING HERE

I get the 53 and 54 returned by default after turning on option 1 to enable all function keys in ADISCF. The other option that needs to be on in order for this to work is the option number 22, Selection of the function key list to use should be set to the standard Micro Focus user function key list.

When these two are turned on I get the correct values returned.
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: KEYSTROKE HAS NO MEANING HERE

Thanks so much Chris. I think I have it working now.
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: KEYSTROKE HAS NO MEANING HERE

Thanks so much Chris. I think I have it working now.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.