mikmng

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-15
13:02
1137 views
[Migrated content. Thread originally posted on 15 November 2011]
Hello,I've created a remote Cobol project with Visual Cobol Eclipse; this project only have one Cobol program that display "HELLO WORLD!!". I can debug this program successfully, because I have installed "Develpment Hub" in the remote system and "ViewNow X" in my local system.
Now, I want to have an executable of this program that display its output in my local system...
I think that to do this, I have to follow this steps...
-I guess I should create an "X Client" in "X Control Panel" of my local system, to execute the remote program by passing the parameter "Display" (it will be the Identifier for the X server that will display the program output)
-So I will need to modify the program to accept and process the parameter "Display".
To do this I supose that I will need to add a X11 protocol library...
Are these the correct steps to follow?
What changes should be made in the program? Which X11 protocol library should I use?
Cobol Program:
program-id. Program8 as "Program8".
environment division.
configuration section.
data division.
working-storage section.
01 TECLA PIC X(10).
procedure division.
DISPLAY "HELLO WORLD!!!!".
display "DISPLAY" upon environment-name.
accept VAL from environment-value.
display "DISPLAY: ", VAL.
ACCEPT TECLA.
goback.
end program Program8.
Thank you
1 Solution
Accepted Solutions
Michael_Wojcik

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-15
13:12
Writing an X client is not trivial, and doing it at the X11 protocol level (or the Xlib level) is not a good idea unless you have very unusual requirements and are very familiar with the inner workings of X11. Even the simpler toolkits, such as Xtk, are not particularly easy to work with.
It'd be far easier to simply execute your program in an xterm (or another X terminal window client). On the remote system, you'd execute something like "xterm -display localsystem:0 -e /path/to/Program8".
Note that the xterm window will close when your program exits, so have your program wait for user confirmation before exiting.
This is basic X Window use - you might want to look for an online tutorial on using X to get more ideas.
It'd be far easier to simply execute your program in an xterm (or another X terminal window client). On the remote system, you'd execute something like "xterm -display localsystem:0 -e /path/to/Program8".
Note that the xterm window will close when your program exits, so have your program wait for user confirmation before exiting.
This is basic X Window use - you might want to look for an online tutorial on using X to get more ideas.
1 Reply
Michael_Wojcik

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-15
13:12
Writing an X client is not trivial, and doing it at the X11 protocol level (or the Xlib level) is not a good idea unless you have very unusual requirements and are very familiar with the inner workings of X11. Even the simpler toolkits, such as Xtk, are not particularly easy to work with.
It'd be far easier to simply execute your program in an xterm (or another X terminal window client). On the remote system, you'd execute something like "xterm -display localsystem:0 -e /path/to/Program8".
Note that the xterm window will close when your program exits, so have your program wait for user confirmation before exiting.
This is basic X Window use - you might want to look for an online tutorial on using X to get more ideas.
It'd be far easier to simply execute your program in an xterm (or another X terminal window client). On the remote system, you'd execute something like "xterm -display localsystem:0 -e /path/to/Program8".
Note that the xterm window will close when your program exits, so have your program wait for user confirmation before exiting.
This is basic X Window use - you might want to look for an online tutorial on using X to get more ideas.