Skip to content

Namespaces

Olivier Smedile edited this page Apr 10, 2017 · 3 revisions

TypeCobol doesn't support namespace for now. However we support to add Program as a qualifier.

Example: With the following program

       IDENTIFICATION DIVISION.
       PROGRAM-ID. PGM1.
       DATA DIVISION .
       working-STORAGE SECTION.
      
       PROCEDURE DIVISION.
       declare procedure isDateValid private
            input    date1  type Date
            output   result type Bool.
       procedure division.
      *     code of the procedure here...
            set result to true
            .
       end-declare.
       END PROGRAM PGM1.

You can write:

01 myData type PGM1::Person.

call PGM1::isDateValid input myDate
                       output result
Clone this wiki locally