Skip to main content

[archive] COBOL programs - Not Responding

  • April 10, 2008
  • 1 reply
  • 0 views

[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.

Thanks

Geoffrey

1 reply

[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.

Thanks

Geoffrey
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:


main-loop.
* 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
    end-read
    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
    end-if
    end-perform

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

    destroy screen2-handle.

* close files and so on...

    perform tidy-it-all-up.

    stop run.

check-for-cancel.

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

    display screen2 upon screen2-handle
    accept screen2.

    move "Y" to cancel-flag.