Skip to content

TypeCobolErrorSyntax

Olivier Smedile edited this page Sep 22, 2016 · 10 revisions

This page is a work in progress

Error code in TypeCobol

  • TCERR_INTRINSIC_TYPE Error are represented with the intrinsic type ErrorCode. This type is defined like this:
01 ErrorCode TYPEDEF STRONG.
   05 code pic X(04).
  • TCERR_IMPLICIT_ERRORCODE_VAR All functions, procedures and procedure division of a program can access an implicit variable always named "ErrorCode". This variable is declared with a private scope (not GLOBAL or EXTERNAL). This variable is for internal use and to call other functions/procedure/program. This variable can't be received as a parameter.

  • TCERR_IMPLICIT_ERRORCODE_PARAM All functions and procedures have a special parameter named ErrorCode. If another parameter is also named "ErrorCode", there must be an error. All call to a function or procedure must pass this ErroCode variable.

  • TCERR_IMPLICIT_PARAGRAPH An paragraph used to manage error must be present in all programs, functions and procedures. By default, this paragraph is implicit and is always named TC-STANDARD-ERROR-MANAGEMENT. If another paragraph have the same name, there must be an error.

  • TCERR_OVERRIDE_IMPLICIT_PARAGRAPH The implicit paragraph used to manage error can be changed. The sentence error procedure is *MY-PARAGRAPH* must be declared in identification division TODO specify exactly where

This page is a work in progress

Clone this wiki locally