Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thread Programming in AcuCobol

Status
Not open for further replies.

cobas

Programmer
Feb 4, 2002
21
GB
Does anyone have any tips / advice / examples on multi-thread programming with AcuCobol ??

TIA
Colin Bannister
 
Hi

Tip #1 - don't use them. ACU threads aren't real threading. Don't expect control to be shifted from one thread to another all the time. The shifting isn't even controlled by the CPU. ACU shifts from one thread to another as soon as it hits certain verbs (if I'm not mistaken DISPLAY, ACCEPT, FILE IO verbs, etc).

This can produce very bizzare results if you really intend on running things in separate threads.

It is good, however, if you only want to refresh a screen while some intensive file io work is happenning in the background.

If you're comfortable with C/C++, I'd advise running the threads within a a DLL.

Tip #2 - Pay serious attention to the warning above :)

Tip #3 - I'm serious about tip #2.
 
To DavidK13

Thanks for the info. I eventually worked out how to multi thread with limited success. The main problem with this was using a VB ocx. If you've ever worked VB using ocx, you're in for a difficult time trying tio make it work in ACU. You need to code for ALL the events in the ocx even if you have no intention of using them.

Colin
 
Hi Colin -

I've recently begun experimenting heavily with OCX controls, and am actually quite satisfied with the results. For example, I implemented the control for a Web Browser (so that I can dynamically create an HTML report and show it), and did not find that I had to intercept and handle all the events generated by this control. What exactly are you referring to when you say you have to handle all events? Which control are you working with?

BTW - AcuGT 5.2 has an improved support for OCX's. The AXDEFGEN utility supports Library controls as well as references, whereas previous versions did not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top