Absent Member.
Absent Member.

[archive] COBOL programs - Not Responding

[Migrated content. Thread originally posted on 10 April 2008]

I have a problem for which I amy trying to find a solution relating to programs freezing during execution.

Perhaps this version is a bit old - we are currently using Verion 5.2.1 of AcuCobol to run our programs.

All the programs have been compiled using the same compiler options.

Currently, the PCs in question run Windows XP Professional.

Every month we have to produce statements for our customers. Prior to doing a Production run, we do a dummy run using a copy of the files backed up the previous night following the close of business.

When I run the programs on my PC, the jobs complete with no problems. Admittedly, on my system, I tend to run a single AcuCobol program as opposed to running a multiple number of programs as the users.

When run on the user PC, the mere act of swapping from one task to another causes the program to freeze.

Looking at the shortcut set up to execute the program, the program is set up to run using the "-s" switch (run in safe mode).

As far as I can tell from the program source code any locking of records is done using a manual lock and to reducing contention all reading of indexed files is done using "ALLOWING UPDATERS".

Would anyone have come across this problem before and how did you reslove the situation.


1 Reply
Absent Member.
Absent Member.

RE: [archive] COBOL programs - Not Responding

when i understand your problem, then you have the problem that more than one programm run and when you switch during runtime from one task to another the screen freeze (no updates are displayed).

We use a thread to display a second window during the "batch-run".

The Problem was described in AcuCorp News July 2002 with the thread-solution.

Here is the Sample-Snippet from Acu:

* start a thread to display a screen with a 'cancel'
* push-button

    perform thread check-for-cancel.

* now read the file and process the records

    perform until EOF
    read wrk-record
       at end continue
    perform process-record

* check the cancel-flag to see if the user has
* pressed the "Cancel Job" button.

    if cancel-flag = "Y"
       display message box
                 "Job Canceled!"
        exit perform

* now destroy the (no longer needed) 'Cancel' window

    destroy screen2-handle.

* close files and so on...

    perform tidy-it-all-up.

    stop run.


    display floating window
        bind to thread
    title "Processing",
    handle is screen2-handle

    display screen2 upon screen2-handle
    accept screen2.

    move "Y" to cancel-flag.
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.