Skip to main content

Hello,

I am newbie on this forum and not speaking/writing well english, so don't hesitate to ask me more information if my text is not clear...

I try to start fault finder using CBL_FFND_REPORT routine in my main cobol program inside an error procedure installed with CBL_ERROR_PROC, so that i can produce a report in case of system error (like error 114 or 173). Could you please expain me how to set the value of rtserr argument ? Is there any way to get de rts error code that launch the error procedure installed with CBL_ERROR_PROC ?

Regards,

Raphaël RABU.


#fault_finder

Hello,

I am newbie on this forum and not speaking/writing well english, so don't hesitate to ask me more information if my text is not clear...

I try to start fault finder using CBL_FFND_REPORT routine in my main cobol program inside an error procedure installed with CBL_ERROR_PROC, so that i can produce a report in case of system error (like error 114 or 173). Could you please expain me how to set the value of rtserr argument ? Is there any way to get de rts error code that launch the error procedure installed with CBL_ERROR_PROC ?

Regards,

Raphaël RABU.


#fault_finder

You cannot tell CBL_ERROR_PROC to be executed only for specific RTS error values.

However, when the error procedure is called a RTS error message is passed to it as a parameter.

You could parse this parameter to look for the exact RTS error that occurred:

In docs:

Parameter Passed to the Error Procedure

When an installed error procedure is called, the characters containing the relevant RTS error message is passed as a parameter.

You should define this parameter in the Linkage Section as PIC X(325), and include it in the USING phrase of the entry to the error procedure. An example of the RTS error message string follows:

Load Error : file 'prog-name'\\n

error code: 173, pc=0, call=-1, seg=0\\n

173  Called program file not found in drive/directory\\n\\0

where \\n is a new-line character and \\0 is a null (x"00") terminator. This format is described in your Error Messages.

Example:

The following is an example of installing an error procedure, and the skeleton of the error procedure that is called if an error occurs.

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.


Hello,

I am newbie on this forum and not speaking/writing well english, so don't hesitate to ask me more information if my text is not clear...

I try to start fault finder using CBL_FFND_REPORT routine in my main cobol program inside an error procedure installed with CBL_ERROR_PROC, so that i can produce a report in case of system error (like error 114 or 173). Could you please expain me how to set the value of rtserr argument ? Is there any way to get de rts error code that launch the error procedure installed with CBL_ERROR_PROC ?

Regards,

Raphaël RABU.


#fault_finder

Hello,

Thanks for your answer. I have already implement the error procedure and I don't want to filter call to error procedure. I just expected that there may have another way to get the RTS error code without parsing the error message. I have done the parsing, but now I have another problem, when I call CBL_FFND_REPORT to generate faultfinder_report I move the RTS error code to the first argument, but nothing appear in the report, I only have the beginning of line 'RTS Error:', but not the RTS code.

If I hard code a value for this argument the result is the same. How can I set the argument so that the RTS code appear in the report ?

Here are variables declaration and call to CBL_FFND_REPORT

     01  CBL-FFND-REPORT-RTSERR  PIC X(4) COMP-5 VALUE 0.

      01  CBL-FFND-REPORT-TER     PIC X(4) COMP-5 VALUE 0.

      01  CBL-FFND-REPORT-RC      PIC S9(4) COMP VALUE 0.

==============================================================

         MOVE 173 TO CBL-FFND-REPORT-RTSERR

         CALL "CBL_FFND_REPORT" USING CBL-FFND-REPORT-RTSERR

                                       CBL-FFND-REPORT-TER

                             RETURNING CBL-FFND-REPORT-RC

          END-CALL

=============================================

Regards,

Raphaël RABU


Hello,

I am newbie on this forum and not speaking/writing well english, so don't hesitate to ask me more information if my text is not clear...

I try to start fault finder using CBL_FFND_REPORT routine in my main cobol program inside an error procedure installed with CBL_ERROR_PROC, so that i can produce a report in case of system error (like error 114 or 173). Could you please expain me how to set the value of rtserr argument ? Is there any way to get de rts error code that launch the error procedure installed with CBL_ERROR_PROC ?

Regards,

Raphaël RABU.


#fault_finder

The first two parameters should be passed by value:

Try:

CALL "CBL_FFND_REPORT"

       USING BY VALUE CBL-FFND-REPORT-RTSERR

                   BY VALUE  CBL-FFND-REPORT-TER

       RETURNING CBL-FFND-REPORT-RC

END-CALL


Hello,

I am newbie on this forum and not speaking/writing well english, so don't hesitate to ask me more information if my text is not clear...

I try to start fault finder using CBL_FFND_REPORT routine in my main cobol program inside an error procedure installed with CBL_ERROR_PROC, so that i can produce a report in case of system error (like error 114 or 173). Could you please expain me how to set the value of rtserr argument ? Is there any way to get de rts error code that launch the error procedure installed with CBL_ERROR_PROC ?

Regards,

Raphaël RABU.


#fault_finder

IT works fine, thank you !

Raphaël RABU