Primes

From PostgreSQL_wiki
Revision as of 20:53, 9 December 2025 by Martin (talk | contribs) (Created page with "The subprograms are in fact object, containing methods and data. = Program structure = The program consists of a main program and three subprograms. The main program primesm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The subprograms are in fact object, containing methods and data.

Program structure

The program consists of a main program and three subprograms. The main program primesmain.cbl is invoked by the command 'primesmain report'. The sample program pgcobol.cbl makes use of the sample database: employee. When executed pgcobol puts out the file pgcobol.prt.
The pgcobol program file is available for download here: pgcobol.cbl .

Sample database

The employee database is a very simple database, with one table containing three lines. The pg_dump file is in the link.

The cobc GNUCobol compilation

The command invoking the precompile process is as follows:

/usr/bin/cobc -x pgcobol.cbsql -l:libgixsql.so -T pgcobol.out

This results in the executable program file pgcobol and the compilation listing pgcobol.out.



Back to: voorpagina