Problem:
How to trap COBOL errors using CBL_ERR0R_PROC
Resolution:
============
INTRODUCTION
==========
This project shows how to trap COBOL error messages using CBL_ERROR_PROC.
SOURCE FILES:
=========
Program Files Description
---------------- -----------------------------------------------------------
CblTrap.APP NetExpress project file
Main1.CBL COBOL source code
Errorprc.CBL COBOL source code
Help Files:
---------------- -----------------------------------------------------------
Readme.TXT This file
OPERATION:
=======
Here are few additional details about this project:
o The module (errorprc) that traps the Cobol error messages:
- must be called or pre-loaded (using INITCALL)
- must be in DLL (using shared rts) or in GNT
o There is a known problem if INITCALL is used:
- Main1 cannot be linked under Net Express v2.0.17 with INITCALL
- this problem is fixed since Net Express v3.0
o The module "SUB1" has been intentionally left out as this causes the error - RTS 173 - and the name of the program module is included in the error message window.
o This project cannot be run within the IDE since Net Express will trap the error before the provided module (errorprc).
Consider the following steps:
(1) Load CblTrap.APP into Net Express
(2) Click on Project > Update All Dependencies
(3) Click on Project > Rebuild All
(4) Open a regular DOS command prompt
(5) CD to the project's RELEASE subdirectory
(6) MAIN1<ENTER>
==========================================================
Keywords: demonstration, sample, example, demo, cbltrap.zip
demo.ex
demo.ne