Highlighted
Absent Member.
Absent Member.
304 views

[archive] Run Text Base Program

[Migrated content. Thread originally posted on 07 August 2006]

Need help running an old text base program from our new GUI system.

We are currently in the process of converting our old ACUCobol text base system into ACUCobol GUI system and have run into a situation where we need to deploy what we have converted in GUI along with what is not been converted and is text base.

Does anyone have sugestion on the best way to call in a text base program from a GUI menu driven program. We would like to just compile the old program with the latest runtime and call the program and run it without having to make any changes.

Thanks
Milton
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Run Text Base Program

Hello Milton

When I want to call an old program from a gui program, I first

displays floating window, size 80, lines 25, handle is win-handle
call "abc"
cancel "abc"
destroy win-handle

This works for me.

Regards
Kim
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Run Text Base Program

Thanks for the help. Screen comes up and program runs, only problem is I can tab to every field in the text program but as soon as I hit enter my control returns to my main menu program that called in the text program.

Is there a way to keep the enter key from going to next field for one program then turn it back on when that program exits or is there a different way to handle this?

Thanks
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Run Text Base Program

It sounds like the text program needs different key mappings.

Before calling the text program, you can call C$KEYMAP with a paramter of 1 to "push" the current keystroke mappings onto a stack, then use SET ENVIRONMENT "KEYSTROKE ..." to change the necessary keys, then call the program, then call C$KEYMAP with a parameter of 0 to restore the graphical keystroke mappings from the stack.

For example:

88 SAVE-KEYMAP VALUE 1.
88 RESTORE-KEYMAP VALUE 0.
...
DISPLAY WINDOW ....
CALL "C$KEYMAP" USING SAVE-KEYMAP.
SET ENVIRONMENT "KEYSTROKE" TO "Edit=Next Terminate=13".
CALL "text program".
CANCEL "text program".
CALL "C$KEYMAP" USING RESTORE-KEYMAP.
CLOSE WINDOW ....

(Note: I'm not sure if that SET ENVIRONMENT statement is what you need, it's just an example.)
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Run Text Base Program

Thanks that fixed it.
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.