Review of ActiveX
Aebacus Popup Controls http://www.aebacus.demon.co.uk/
CommandBox, Clock, Calendar,
controls provide enhanced masked edit, date
pickers, spinbox, combobox, and more.
UnZip, Round Buttons, Hyperlinks, MP3 player, CD
Writer, an Outlook-style 'toolbar'
Visual Basic and the C-runtime DLL (MFC DLL - v
very useful. Others untested.
|dbi technologies inc. www.dbi-tech.com
of 52 controls.
of some of the controls are available on their
to use" "work great with
are a compilation of your comments regarding actual use
Using CBL Routines
PowerCOBOL 4.x ships with a library of very useful
routines that augment standard COBOL features. These CBL_
routines as they are called are lumped into the "f3bicblr.lib"
library file which defaults to the
"c:\fsc\cobol97\" directory when PowerCOBOL is
installed. The Fujitsu documentation can be downloaded
from this site by clicking on the link below. This
documentation should be current as of version 4.2, but
should be valid for all previous versions. CBLDOCS.ZIP (39K)
Routines Arranged by Catagory:
|Byte-Stream File routines:
Memory Allocation Routines:
Virtual Heap Routines:
Operating System Information Routines:
Logic Operator Routines:
CBL_AND, CBL_EQ, CBL_IMP, CBL_NOT,
For these routines to work
within PowerCOBOL, the f3bicblr library must be linked
with the project. Do do this, I right-click on the
project's module and select "Insert File...",
select "f3bicblr.lib" from (my)
"c:\fsc\cobol97\" directory. See the note below
if this doesn't work for you.
|NOTE: You must link the
correct version of f3bicblr.lib. for your
version of PowerCOBOL. If you do not find
the routines on your system, check the
"PATCH" directory on the
distribution CD. Following is a note from
a Fujitsu support person:
needs CBL_Routines for their 4.1
version, they can download it
from the website.
CBL_Routines work ONLY for the
version it was intended to work
with. If using 4.0, use 4.0
CBL_Routines, if using 4.1, use
4.1 CBL_Routines and so
forth. Anyone receiving the
4.2 version automatically
received the latest 4.2
CBL_Routines. They can not be
mixed with other versions. I'm
saying this because of your
comment about downloading from www.adtools.com. The
CBL_Routines are normally
included on the CD's under the
PATCH folder. They can be
copied over if they were not
especially for 4.0 and possibly
4.1 users. I believe the 4.2
install automatically includes
the CBL_Routines to be installed
and they are found under the
Fujistsu has created an
extensive set of sample programs and documentation.
The sample programs are
installed by default at
"C:\FSC\COBOL97\samples\CBL_Routines". If these
samples are not on your PC then you can access several of
them at the Fujitsu COBOL web site.
The Fujitsu documentation
can be downloaded from this site by clicking on the link
below. This documentation should be current as of version
4.2, but should be valid for all previous versions. CBLDOCS.ZIP (39K)
Allowing the User
to Cancel a Resource Intensive Task
some general notes regarding cancelling or otherwise
interrupting a busy program in Windows:
- PowerCOBOL does not
support multi-threading (no big deal really)
- For all
single-threaded Windows programs, a
"tight" process (i.e. file i/o,
counting, etc) will tie up a single thread so
that, until the process finishes, no outside
control can influence that process. This explains
why "Cancel" buttons don't work if the
program is busy.
- All Windows programs
(whether multi-thread or not) must be designed so
as to minimize the amount of time the program
spends in a "tight" process. This is
just part of being a good Windows programmer.
- To accomplish a
resource intensive task, but still allow the user
the ability to cancel, one must "break"
out of the task and allow the program to check
for any waiting events or value changes that may
There are two ways of
accomplishing this last item. One can use the Timer
control to execute a task, or one can use a little known,
undocumented PowerCOBOL event called THRUEVENT.
Using the Timer
First design the task
(procedure) in such a way so that the task must be called
multiple times until the job is completed. Then call the
task using the Timer event, with the timer set to an
amount of time less than the expected processing
delay caused by the task (this is to prevent slowing
execution down considerably). Here is an example in
Get filename to process.
Process next 100 records
If Status = Done
Here is an example.
undocumented THRUEVENT Method:
This method causes program
control to temporarily swing back to the form, so that
any new values or events can be processed. There is an
important word of caution though...if while program
control is released using this method and the form is
"deactivated," part of your app will be left
running invisibly in Windows, causing all sorts of
trouble. So the programmer MUST NOT let the form close
until the process is either finished or an "EXIT
PROGRAM" or such has been called in the called
sub-program. In other words, just because THRUEVENT lets
events execute during a process you still can't just
ignore the fact that the process it still running and you
must quit out of it as you would normally do in a cancel
Here is an example.
from a PowerCOBOL Application
example program was created with PowerCOBOL version 4.2
but should work with 4.0 as well. I tried to document the
code, and currently that is all the documentation
included. If anybody has problems getting this example
working I can compile documentation as difficulties
documentation: Fujitsu COBOL User's Guide for Windows
4.0, chapter 10.
several other COBOL compilers, Fujitsu's software seems
to by default initialize variables to null instead of
Making ENTER work
cases it is useful to allow the user to move through a
from by pressing the ENTER key instead of the Window's
standard TAB key. This is quite simple to accomplish.
Create a "Return" event for each field in the
form, and in that event code:
Here is an example.
Detecting a Right
It is quite
easy to detect a right mouse click. Simply create either
a MouseUp or a MouseDown event for the desired control
and insert the following code:
IF POW-BUTTON = POW-KEY-RBUTTON THEN
*> Do something....
The author of this page appreciates the low-cost (free)
hosting service offered by Tripod.com, but does not
necessarily endorse the products advertised while this
site is viewed. Thank you.