Skip to main content

Hi, 

We are new to multi thread environment, hope that can get some advise from all expert here.

Currently we are plan to develop a multi thread environment as below. 

1) Menu program(which is the main program) call thread for program A. 

2) Then minimize Program A and open back the Menu Program. 

3) from Menu Program call thread for Program B. 

4) then minimize Program B and open back Program A and run data input. 

May i know how can we close the thread only when the Program A window is close.

If the window is not close yet, any time we can open the Program A and do data input.

at the same time, when we minimize Program A, we can called Program B and do data input as well. 

Thank You. 

Hi, 

We are new to multi thread environment, hope that can get some advise from all expert here.

Currently we are plan to develop a multi thread environment as below. 

1) Menu program(which is the main program) call thread for program A. 

2) Then minimize Program A and open back the Menu Program. 

3) from Menu Program call thread for Program B. 

4) then minimize Program B and open back Program A and run data input. 

May i know how can we close the thread only when the Program A window is close.

If the window is not close yet, any time we can open the Program A and do data input.

at the same time, when we minimize Program A, we can called Program B and do data input as well. 

Thank You. 

This post is almost exactly like the previous post. Did you download Threadds.zip from https://supportline.microfocus.com/examplesandutilities/extend/SamplePrograms/GUIsampleprograms.aspx

Consider the 2 push-buttons on the screen as menu choices. Instead of displaying other windows, you could change it to call other programs that display windows.

May i know how can we close the thread only when the Program A window is close. - Use ...Stop thread - the Threadds.zip provides this as an example. 

it may be helpful to contact Micro Focus for Professional Services. Professional Services could help provide a template or initial program that you could copy and use to implement in your application.


This post is almost exactly like the previous post. Did you download Threadds.zip from https://supportline.microfocus.com/examplesandutilities/extend/SamplePrograms/GUIsampleprograms.aspx

Consider the 2 push-buttons on the screen as menu choices. Instead of displaying other windows, you could change it to call other programs that display windows.

May i know how can we close the thread only when the Program A window is close. - Use ...Stop thread - the Threadds.zip provides this as an example. 

it may be helpful to contact Micro Focus for Professional Services. Professional Services could help provide a template or initial program that you could copy and use to implement in your application.

Hi 

Thanks for your information. 

May i know that isn't we need to have acubench only can have the situation that we wish to do?

Because from the sample above, we saw it is acubench sample. 

We would like to know that if we are using tree-view is the same method allow?

Thank You. 


Hi 

Thanks for your information. 

May i know that isn't we need to have acubench only can have the situation that we wish to do?

Because from the sample above, we saw it is acubench sample. 

We would like to know that if we are using tree-view is the same method allow?

Thank You. 

You do not need AcuBench. The person that created the example used AcuBench, which can be used to generate a COBOL program. Yes, you can use the tree-view to act as a way to call sub-programs. However, you should get your main-menu program and sub-programs working with threads correctly first. Using the tree-view will not help make calling programs in threads easier. Here's what I've done with the tree-view and calling sub-programs - similar to a menu, consider each subprogram to be identified by some unique number (1001, 1002). In each tree-view item there is a hidden-data-variable and hidden-data. Using events, when someone selects the tree-view you inquire on the hidden-data-variable (whatever you named it), get the value, and then proceed to your COBOL paragraph that does when item1 = 1001 call "prog1"


You do not need AcuBench. The person that created the example used AcuBench, which can be used to generate a COBOL program. Yes, you can use the tree-view to act as a way to call sub-programs. However, you should get your main-menu program and sub-programs working with threads correctly first. Using the tree-view will not help make calling programs in threads easier. Here's what I've done with the tree-view and calling sub-programs - similar to a menu, consider each subprogram to be identified by some unique number (1001, 1002). In each tree-view item there is a hidden-data-variable and hidden-data. Using events, when someone selects the tree-view you inquire on the hidden-data-variable (whatever you named it), get the value, and then proceed to your COBOL paragraph that does when item1 = 1001 call "prog1"

If having the threadd.cbl as a single file would be easier, versus an AcuBench project then you can download it from here: amerftp.microfocus.com/.../Threadds.cbl


Hi, 

We are new to multi thread environment, hope that can get some advise from all expert here.

Currently we are plan to develop a multi thread environment as below. 

1) Menu program(which is the main program) call thread for program A. 

2) Then minimize Program A and open back the Menu Program. 

3) from Menu Program call thread for Program B. 

4) then minimize Program B and open back Program A and run data input. 

May i know how can we close the thread only when the Program A window is close.

If the window is not close yet, any time we can open the Program A and do data input.

at the same time, when we minimize Program A, we can called Program B and do data input as well. 

Thank You. 

Please take a look at this forum discussion: https://community.rocketsoftware.com/discussion/thread#bm93ef989e-8d68-4ce1-98bb-3406942fc358