Absent Member.
Absent Member.
1131 views

Execute remote cobol project with ViewNow X (like Development Hub does when debugging..)

Jump to solution

[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
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert
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.

View solution in original post

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert
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.

View solution in original post

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.