[Migrated content. Thread originally posted on 03 November 2011]
Hi Guys
We are converting the assembler program to COBOL. So we are looking for equivalent service callable by COBOL program.
We want to imitate the functionality of ESTAE in Microfocus environment using COBOL, Our requirement is to trap the abend and bypass it if required at run time based on the rules.
Can you point us to any lbr or API which is available in microfocus libraries which can be called from COBOL program.
On further researching we found that CBL_ERROR_PROC can be used to imitate the functionality in Microfocus environment.
We are calling CBL_ERROR_PROC prior to running the application program to trap the abend.
The program just stops at the time of abend even when CBL_ERROR_PROC is active.
The control is not passed back to the application program after the abend.
Could you please provide details on using CBL_ERROR_PROC to run RTS abends.
Code Main Program
$SET INITCALL(ERRORPRC) outdd
$SET dialect "os390"
IDENTIFICATION DIVISION.
PROGRAM-ID. TESTPGM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 val pic 9.
LINKAGE SECTION.
PROCEDURE DIVISION.
000000-MAINLINE.
divide 10 by 0 giving val
GOBACK.
ERRORPRC
working-storage section.
01 install-flag pic x comp-x value 0.
01 install-address usage procedure-pointer.
01 status-code pic 9(4) comp value zeros.
local-storage section.
linkage section.
01 err-msg pic x(325).
procedure division.
set install-address to entry "err-proc".
call "CBL_ERROR_PROC" using install-flag
install-address
returning status-code.
goback.
move 2 to return-code
exit program
stop run.
Am i missing something.. may be i am completely wrong..
Early response is highly appreciated
[Migrated content. Thread originally posted on 03 November 2011]
Hi Guys
We are converting the assembler program to COBOL. So we are looking for equivalent service callable by COBOL program.
We want to imitate the functionality of ESTAE in Microfocus environment using COBOL, Our requirement is to trap the abend and bypass it if required at run time based on the rules.
Can you point us to any lbr or API which is available in microfocus libraries which can be called from COBOL program.
I'm not sure if it was just missed during the copy paste operation to the forum but the whole "err-proc" definition was missing. It should look like this:
working-storage section.
01 install-flag pic x comp-x value 0.
01 install-address usage procedure-pointer.
01 status-code pic 9(4) comp value zeros.
local-storage section.
linkage section.
01 err-msg pic x(325).
procedure division.
set install-address to entry "err-proc".
call "CBL_ERROR_PROC" using install-flag
install-address
returning status-code.
...
...
* Error procedure:
entry "err-proc" using err-msg.
* Process err-msg to find out the error number.
* Act accordingly.
...
* Terminate, but allow other error procedures to be executed.
move 1 to return-code
exit program
stop run.
[Migrated content. Thread originally posted on 03 November 2011]
Hi Guys
We are converting the assembler program to COBOL. So we are looking for equivalent service callable by COBOL program.
We want to imitate the functionality of ESTAE in Microfocus environment using COBOL, Our requirement is to trap the abend and bypass it if required at run time based on the rules.
Can you point us to any lbr or API which is available in microfocus libraries which can be called from COBOL program.
Chris, Thanks for this. It is not making any difference
[Migrated content. Thread originally posted on 03 November 2011]
Hi Guys
We are converting the assembler program to COBOL. So we are looking for equivalent service callable by COBOL program.
We want to imitate the functionality of ESTAE in Microfocus environment using COBOL, Our requirement is to trap the abend and bypass it if required at run time based on the rules.
Can you point us to any lbr or API which is available in microfocus libraries which can be called from COBOL program.
I have been doing some experimenting here and there does appear to be a problem with this.
Please e-mail me your contact information and serial number and I will create a support incident for you for this issue.
Send to chris.glazier@microfocus.com
Thanks.
[Migrated content. Thread originally posted on 03 November 2011]
Hi Guys
We are converting the assembler program to COBOL. So we are looking for equivalent service callable by COBOL program.
We want to imitate the functionality of ESTAE in Microfocus environment using COBOL, Our requirement is to trap the abend and bypass it if required at run time based on the rules.
Can you point us to any lbr or API which is available in microfocus libraries which can be called from COBOL program.
Hi Chris,
I have mailed you the details
[Migrated content. Thread originally posted on 03 November 2011]
Hi Guys
We are converting the assembler program to COBOL. So we are looking for equivalent service callable by COBOL program.
We want to imitate the functionality of ESTAE in Microfocus environment using COBOL, Our requirement is to trap the abend and bypass it if required at run time based on the rules.
Can you point us to any lbr or API which is available in microfocus libraries which can be called from COBOL program.
I suspect you are not expecting to see the JIT debugging prompt? true,
if so this can be turned off as follows:
Create a file called cobconfig:
set debug_on_error=0Then set the environment var COBCONFIG to point to the location: (use �% as
it is in the current directory)
set COBCONFIG=�%\\cobconfigThen run the example, eg: "run testerr... where testerr is..."
working-storage section.
01 install-flag pic x comp-x value 0.
01 install-address usage procedure-pointer.
01 status-code pic 9(4) comp value zeros.
local-storage section.
linkage section.
01 err-msg pic x(325).
procedure division.
set install-address to entry "err-proc".
call "CBL_ERROR_PROC" using
install-flag
install-address
returning status-code.
display status-code
call "fred"
stop run.
.
entry "err-proc" using err-msg.
display "In Error Proc".
move 1 to return-code
exit program