<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.webhuis.nl:443/index.php?action=history&amp;feed=atom&amp;title=Data-Dictionary</id>
	<title>Data-Dictionary - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.webhuis.nl:443/index.php?action=history&amp;feed=atom&amp;title=Data-Dictionary"/>
	<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;action=history"/>
	<updated>2026-09-11T02:05:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4703&amp;oldid=prev</id>
		<title>Martin at 22:57, 24 March 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4703&amp;oldid=prev"/>
		<updated>2026-03-24T22:57:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;amp;diff=4703&amp;amp;oldid=4702&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4702&amp;oldid=prev</id>
		<title>Martin at 22:55, 24 March 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4702&amp;oldid=prev"/>
		<updated>2026-03-24T22:55:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;amp;diff=4702&amp;amp;oldid=4701&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4701&amp;oldid=prev</id>
		<title>Martin: Replaced content with &quot;&lt;span id=&quot;data-dictionary&quot;&gt;&lt;/span&gt; = Data Dictionary =  &#039;&#039;&#039;Project:&#039;&#039;&#039; pgcobol — Prime Numbers Application&lt;br /&gt; &#039;&#039;&#039;Version:&#039;&#039;&#039; 1.0 (reverse-engineered)&lt;br /&gt; &#039;&#039;&#039;Date:&#039;&#039;&#039; 2026-03-17   -----  &lt;span id=&quot;conventions&quot;&gt;&lt;/span&gt; == 1. Conventions ==  {| ! Column ! Meaning |- | Name | COBOL data-name as written in source |- | Level | 01 / 03 / 05 / 07 hierarchy level |- &lt;tern/CobolDesign/03_data_dictionary.mediawiki&quot; 1085L, 16199B 1,1           Top&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4701&amp;oldid=prev"/>
		<updated>2026-03-24T22:54:03Z</updated>

		<summary type="html">&lt;p&gt;Replaced content with &amp;quot;&amp;lt;span id=&amp;quot;data-dictionary&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; = Data Dictionary =  &amp;#039;&amp;#039;&amp;#039;Project:&amp;#039;&amp;#039;&amp;#039; pgcobol — Prime Numbers Application&amp;lt;br /&amp;gt; &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 1.0 (reverse-engineered)&amp;lt;br /&amp;gt; &amp;#039;&amp;#039;&amp;#039;Date:&amp;#039;&amp;#039;&amp;#039; 2026-03-17   -----  &amp;lt;span id=&amp;quot;conventions&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; == 1. Conventions ==  {| ! Column ! Meaning |- | Name | COBOL data-name as written in source |- | Level | 01 / 03 / 05 / 07 hierarchy level |- &amp;lt;tern/CobolDesign/03_data_dictionary.mediawiki&amp;quot; 1085L, 16199B 1,1           Top&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:54, 24 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span id=&quot;data-dictionary&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-left&quot; title=&quot;Paragraph was moved. Click to jump to new location.&quot; href=&quot;#movedpara_6_0_rhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_1_0_lhs&quot;&gt;&lt;/a&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Data Dictionary = &lt;/del&gt;&#039;&#039;&#039;Project:&#039;&#039;&#039; pgcobol — Prime Numbers Application&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Data Dictionary =&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-left&quot; title=&quot;Paragraph was moved. Click to jump to new location.&quot; href=&quot;#movedpara_6_1_rhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_3_0_lhs&quot;&gt;&lt;/a&gt;&#039;&#039;&#039;Version:&#039;&#039;&#039; 1.0 (reverse-engineered)&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Date:&#039;&#039;&#039; 2026-03-17 ----- == 1. Conventions == {| ! Column ! Meaning |- | Name | COBOL data-name as written in source |- | Level | 01 / 03 / 05 / 07 hierarchy level |- | Picture | COBOL PICTURE clause |- | Usage | DISPLAY (default) / COMP-3 / COMP-5 |- | Source | Copybook or program where defined |- | Description | Semantic meaning and valid values |} Condition-names (88-level) are listed under the field they qualify. ----- == 2. Copybook: primes-session.cpy == &#039;&#039;&#039;Control block for the session (main → business-logic) tier.&#039;&#039;&#039; {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | primes-session | 01 | — | — | Root of session control block; passed as linkage to primesgen |- | methods | 03 | X(32) | DISPLAY | Operation verb set by primesmain before calling primesgen |- | — report-primes | 88 | — | — | VALUE “report” — run the report path |- | — generate-primes | 88 | — | — | VALUE “generate” — run the sieve path |- | — start-primes | 88 | — | — | VALUE “start” — (reserved, not used in current flow) |- | — stop-primes | 88 | — | — | VALUE “stop” — (reserved, not used in current flow) |- | — invalid-method | 88 | — | — | VALUE “bad” — sentinel for bad dispatch |- | session-result | 03 | 9(2) | DISPLAY | Result code written back by primesgen; initial value ZERO |- | — session-method-ok | 88 | — | — | VALUE 0 — operation succeeded |- | — session-method-nok | 88 | — | — | VALUE 1 — operation failed |- | — session-method-eof | 88 | — | — | VALUE 9 — cursor exhausted (end of data) |} ----- == 3. Copybook: primes-dal.cpy == &#039;&#039;&#039;Control block for the DAL (business-logic → data-access) tier.&#039;&#039;&#039; {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | primes-dal | 01 | — | — | Root of DAL control block; passed as linkage to primes |- | dal-methods | 03 | X(32) | DISPLAY | Operation verb set by caller |- | — next-prime | 88 | — | — | VALUE “next-prime” — fetch next row from cursor |- | — next-divider | 88 | — | — | VALUE “next-divider” — select divider by ident |- | — write-prime | 88 | — | — | VALUE “write” — insert prime into table |- | — db-cursor | 88 | — | — | VALUE “cursor” — start transaction and open cursor |- | — db-connect | 88 | — | — | VALUE “connect” — connect to PostgreSQL |- | — db-disconnect | 88 | — | — | VALUE “disconnect” — disconnect from PostgreSQL |- | — invalid-method | 88 | — | — | VALUE “bad” — sentinel for bad dispatch |- | primes-data | 03 | — | — | One-row data payload |- | primes-sequence | 05 | 9(9) | DISPLAY | Sequence / ident of the current prime row |- | prime-number | 05 | 9(9) | DISPLAY | Value of the current prime |- | dal-result | 03 | 9(2) | DISPLAY | Result code written back by primes; initial value ZERO |- | — dal-method-ok | 88 | — | — | VALUE 0 — operation succeeded |- | — dal-method-nok | 88 | — | — | VALUE 1 — operation failed |- | — dal-method-eof | 88 | — | — | VALUE 99 — cursor exhausted |} ----- == 4. Copybook: primes-ui.cpy == &#039;&#039;&#039;Control block for the UI tier; included by all four programs.&#039;&#039;&#039; {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | primes-ui | 01 | — | — | Root of UI control block; passed as linkage to primesui |- | ui-methods | 03 | X(32) | DISPLAY | Operation verb set by caller |- | — write-ui | 88 | — | — | VALUE “write” — add one prime row to print buffer |- | — message-ui | 88 | — | — | VALUE “log-message” — display console message |- | — start-ui | 88 | — | — | VALUE “start” — open print file |- | — stop-ui | 88 | — | — | VALUE “stop” — flush and close print file |- | process-message | 03 | — | — | Structured console log record |- | program-name | 05 | X(20) | DISPLAY | Name of the calling program (for log messages) |- | program-line | 05 | — | — | Group: paragraph name + message text |- | program-paragraph | 07 | X(20) | DISPLAY | Name of the calling paragraph |- | program-message | 07 | X(92) | DISPLAY | Human-readable status or error message |- | u-primes | 03 | — | — | One prime row for the print writer |- | u-sequence | 05 | 9(9) | DISPLAY | Prime sequence number (ident) to print |- | u-number | 05 | 9(9) | DISPLAY | Prime value to print |- | ui-method-result | 03 | 9(2) | DISPLAY | Result code from primesui; initial value ZERO |- | — ui-method-ok | 88 | — | — | VALUE 0 — operation succeeded |- | — ui-method-nok | 88 | — | — | VALUE 1 — operation failed |} ----- == 5. Copybook: primes-table.cpy == &#039;&#039;&#039;SQL host variable — character (DISPLAY) format.&#039;&#039;&#039; {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | primes-table | 01 | — | — | Host variable group for SQL bind/into |- | ident | 03 | S9(9) | DISPLAY | Row identity (sequence number), signed |- | prime | 03 | S9(9) | DISPLAY | Prime value, signed |} ----- == 6. Copybook: primes_table.cpy == &#039;&#039;&#039;SQL host variable — packed-decimal (COMP-3) format. Alternate version of primes-table.cpy.&#039;&#039;&#039; {| ! Name ! Level ! Picture ! Usage ! Description |- | primes_table | 01 | — | — | Host variable group for SQL bind/into |- | ident | 03 | S9(9) | COMP-3 | Row identity, packed decimal |- | prime | 03 | S9(9) | COMP-3 | Prime value, packed decimal |} ----- == 7. Copybook: SQLCA.cpy == &#039;&#039;&#039;GixSQL SQL Communications Area — standard across all embedded-SQL programs.&#039;&#039;&#039; {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | SQLCA | 01 | — | — | SQL communications area |- | SQLCAID | 05 | X(8) | DISPLAY | SQLCA identifier string |- | SQLCABC | 05 | S9(9) | COMP-5 | Byte length of SQLCA |- | SQLCODE | 05 | S9(9) | COMP-5 | SQL return code: 0 = success, negative = error, +100 = not found |- | SQLERRM | 05 | — | — | Error message group |- | SQLERRML | 49 | S9(4) | COMP-5 | Length of error message text |- | SQLERRMC | 49 | X(70) | DISPLAY | Error message text |- | SQLERRP | 05 | X(8) | DISPLAY | Error program (not used) |- | SQLERRD | 05 | S9(9) OCCURS 6 | COMP-5 | Diagnostic codes; SQLERRD(3) = rows processed |- | SQLWARN | 05 | — | — | Warning flags group (not used) |- | SQLWARN0–SQLWARN7 | 10 | X(1) | DISPLAY | Individual warning flags |- | SQLSTATE | 05 | X(5) | DISPLAY | ANSI SQL state code |} ----- == 8. Program: primesmain — Working Storage == {| !width=&quot;16%&quot;| Name !width=&quot;16%&quot;| Level !width=&quot;16%&quot;| Picture !width=&quot;16%&quot;| Usage !width=&quot;16%&quot;| Source !width=&quot;16%&quot;| Description |- | filler | 01 | X(32) VALUE “Start WS primesmain” | DISPLAY | primesmain.cbl | Debug marker to locate WS in memory dump |- | commandline-args | 01 | X(32) | DISPLAY | primesmain.cbl | Command-line argument accepted from OS |- | — execute-generate | 88 | — | — | primesmain.cbl | VALUE “generate” |- | — execute-report | 88 | — | — | primesmain.cbl | VALUE “report” |- | primes-session | 01 | (group) | — | COPY | See §2 |- | primes-ui | 01 | (group) | — | COPY | See §4 |} ----- == 9. Program: primesgen — Working Storage == {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | filler | 01 | X(32) VALUE “Start WS primesgen” | DISPLAY | Debug WS marker |- | file-buffer | 01 | X(132) | DISPLAY | FD record area for fprinter (declared but file not opened in primesgen) |- | printer | 01 | — | — | Print control group (unused in primesgen; print handled by primesui) |- | print-buffer | 03 | X(132) | DISPLAY | Line buffer |- | line-number | 03 | 99 VALUE 99 | DISPLAY | Current line counter |- | page-number | 03 | 9(4) VALUE ZERO | DISPLAY | Current page counter |- | test-quot | 01 | 9(9) | DISPLAY | Quotient from DIVIDE in sieve loop |- | primes | 01 | — | — | Local sieve control group (mirrors primes-dal structure) |- | gen-methods | 03 | X(32) | DISPLAY | Method verb for internal DAL calls |- | — query-process | 88 | — | — | VALUE “query” |- | — start-process | 88 | — | — | VALUE “start” |- | — next-divider | 88 | — | — | VALUE “get” |- | — write-prime | 88 | — | — | VALUE “put” |- | — stop-process | 88 | — | — | VALUE “stop” |- | primes-result | 03 | 9(2) VALUE ZERO | DISPLAY | Result of sieve DAL call |- | — init-primes-ok | 88 | — | — | VALUE 1 |- | — first-divider-ok | 88 | — | — | VALUE 2 |- | — next-divider-ok | 88 | — | — | VALUE 3 |- | test-number | 03 | 9(9) | DISPLAY | Current candidate being tested for primality |- | test-number-sqr | 03 | 9(9)V9(9) | DISPLAY | Square root of test-number (decimal) |- | test-divider | 03 | 9(9) | DISPLAY | Current trial divisor fetched from DB |- | test-rest | 03 | 9(9)V9(9) | DISPLAY | Remainder from DIVIDE |- | old-test-number | 03 | 9(9) | DISPLAY | Previous test-number (diagnostic / unused) |- | old-ident | 03 | 9(9) | DISPLAY | ident of the last divider fetched; incremented before next fetch |- | new-ident | 03 | 9(9) | DISPLAY | old-ident + 1; used as key in SELECT to get next divider |- | primes-ui | 01 | (group) | — | COPY — see §4 |- | primes-dal | 01 | (group) | — | COPY — see §3 |} &#039;&#039;&#039;Linkage section:&#039;&#039;&#039; {| ! Name ! Source ! Description |- | primes-session | COPY primes-session | Passed in by primesmain |} ----- == 10. Program: primes (DAL) — Working Storage == {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | filler | 01 | X(32) VALUE “Start WS primes” | DISPLAY | Debug WS marker |- | DATASRC | 01 | X(64) VALUE “pgsql://localhost:5432/primes&amp;amp;default_schema=primes” | DISPLAY | GixSQL connection string |- | DBUSR | 01 | X(64) VALUE “primes_user” | DISPLAY | Database user name |- | DBPWD | 01 | X(64) VALUE “pr1mes_user” | DISPLAY | Database password (plain-text) |- | CUR-STEP | 01 | X(16) | DISPLAY | Diagnostic: current SQL step (“CONNECT” / “DISCONNECT”) |- | primes-row | 01 | — | — | FETCH target for cursor |- | r-ident | 03 | 9(9) | COMP-3 | Fetched ident value |- | r-prime | 03 | 9(9) | COMP-3 | Fetched prime value |- | prime-count | 01 | 9(9) | DISPLAY | (Unused in current flow) |- | prime_seq | 01 | 9(9) | DISPLAY | (Unused in current flow) |- | divider | 01 | 9(9) | DISPLAY | (Unused in current flow) |- | primes | 01 | — | — | Local copy of sieve control (mirrors primes-dal; used for internal paragraphs) |- | SQLCA | 01 | — | — | COPY SQLCA — see §7 |- | primes-table | 01 | — | — | EXEC SQL INCLUDE primes-table — see §5 |- | primes-ui | 01 | — | — | COPY primes-ui — see §4 |} &#039;&#039;&#039;Linkage section:&#039;&#039;&#039; {| ! Name ! Source ! Description |- | primes-dal | COPY primes-dal | Passed in by primesgen |} ----- == 11. Program: primesui — Working Storage == {| !width=&quot;20%&quot;| Name !width=&quot;20%&quot;| Level !width=&quot;20%&quot;| Picture !width=&quot;20%&quot;| Usage !width=&quot;20%&quot;| Description |- | filler | 01 | X(32) VALUE “start ws primesui” | DISPLAY | Debug WS marker |- | primes-table | 01 | — | — | 6-column print accumulator (OCCURS 6) |- | primes-cel | 03 | OCCURS 6 INDEXED primes-idx | — | One cell per prime entry on a print line |- | t-ident | 05 | Z(9) | DISPLAY | Sequence number, zero-suppressed |- | filler | 05 | X(2) | DISPLAY | Column separator spaces |- | t-prime | 05 | Z(9) | DISPLAY | Prime value, zero-suppressed |- | filler | 05 | X(2) | DISPLAY | Column separator spaces |- | table-header | 01 | — | — | Heading row (OCCURS 6) — “Sequence Prime” × 6 |- | printer | 01 | — | — | Print control group |- | print-buffer | 03 | X(132) | DISPLAY | Current line being built |- | primes-prt-status | 03 | X(2) | DISPLAY | File-status code for fprinter |- | page-number | 03 | 9(4) VALUE 1 | DISPLAY | Current page number |- | print-new-page | 03 | 9 VALUE 1 | DISPLAY | Flag: 1 = new page needed |- | — new-page | 88 | — | — | VALUE 1 |- | primes-heading | 01 | X(118) VALUE “primes overview” | DISPLAY | Page heading text |- | primes-footing | 01 | — | — | Page footing group |- | filler | 03 | X(118) VALUE SPACE | DISPLAY | Left padding |- | filler | 03 | X(6) VALUE “page:” | DISPLAY | Label |- | f-page-number | 03 | Z(3)9 VALUE 1 | DISPLAY | Formatted page number |- | primes-line | 01 | — | — | (Declared but not used in current flow) |- | primes-total | 01 | — | — | (Declared but not used in current flow) |- | primes-count | 03 | 9(8) | DISPLAY | (Declared but not used in current flow) |} &#039;&#039;&#039;Linkage section:&#039;&#039;&#039; {| ! Name ! Source ! Description |- | primes-ui | COPY primes-ui | Passed in by all callers |} ----- == 12. Database Objects == {| !width=&quot;20%&quot;| Object !width=&quot;20%&quot;| Type !width=&quot;20%&quot;| Schema !width=&quot;20%&quot;| Owner !width=&quot;20%&quot;| Definition |- | primes | Schema | — | primes_user | Container schema |- | asc_ident | Sequence | primes | primes_user | INTEGER, START 1, INCREMENT 1 |- | primes | Table | primes | primes_user | See below |- | primescursor | Cursor | runtime | — | DECLARE … CURSOR FOR SELECT * FROM primes |} === Table: primes.primes === {| !width=&quot;20%&quot;| Column !width=&quot;20%&quot;| Type !width=&quot;20%&quot;| Nullable !width=&quot;20%&quot;| Default !width=&quot;20%&quot;| Description |- | ident | INTEGER | YES | nextval(‘primes.asc_ident’) | Auto-assigned insertion sequence |- | prime | INTEGER | YES | — | Prime number value |}&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-right&quot; title=&quot;Paragraph was moved. Click to jump to old location.&quot; href=&quot;#movedpara_1_0_lhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_6_0_rhs&quot;&gt;&lt;/a&gt;&#039;&#039;&#039;Project:&#039;&#039;&#039; pgcobol — Prime Numbers Application&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-right&quot; title=&quot;Paragraph was moved. Click to jump to old location.&quot; href=&quot;#movedpara_3_0_lhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_6_1_rhs&quot;&gt;&lt;/a&gt;&#039;&#039;&#039;Version:&#039;&#039;&#039; 1.0 (reverse-engineered)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Date:&#039;&#039;&#039; 2026-03-17&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-----&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span id=&quot;conventions&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 1. Conventions ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{|&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Column&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Meaning&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Name&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| COBOL data-name as written in source&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Level&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 01 / 03 / 05 / 07 hierarchy level&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tern/CobolDesign/03_data_dictionary.mediawiki&quot; 1085L, 16199B 1,1           Top&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-mediawiki-:diff:wikidiff2:1.12:old-4700:rev-4701:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4700&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;= Data Dictionary = &#039;&#039;&#039;Project:&#039;&#039;&#039; pgcobol — Prime Numbers Application &#039;&#039;&#039;Version:&#039;&#039;&#039; 1.0 (reverse-engineered) &#039;&#039;&#039;Date:&#039;&#039;&#039; 2026-03-17 ----- == 1. Conventions == {| ! Column ! Meaning |- | Name | COBOL data-name as written in source |- | Level | 01 / 03 / 05 / 07 hierarchy level |- | Picture | COBOL PICTURE clause |- | Usage | DISPLAY (default) / COMP-3 / COMP-5 |- | Source | Copybook or program where defined |- | Description | Semantic meaning and valid values |} Condi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=Data-Dictionary&amp;diff=4700&amp;oldid=prev"/>
		<updated>2026-03-24T22:41:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Data Dictionary = &amp;#039;&amp;#039;&amp;#039;Project:&amp;#039;&amp;#039;&amp;#039; pgcobol — Prime Numbers Application &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 1.0 (reverse-engineered) &amp;#039;&amp;#039;&amp;#039;Date:&amp;#039;&amp;#039;&amp;#039; 2026-03-17 ----- == 1. Conventions == {| ! Column ! Meaning |- | Name | COBOL data-name as written in source |- | Level | 01 / 03 / 05 / 07 hierarchy level |- | Picture | COBOL PICTURE clause |- | Usage | DISPLAY (default) / COMP-3 / COMP-5 |- | Source | Copybook or program where defined |- | Description | Semantic meaning and valid values |} Condi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Data Dictionary = &amp;#039;&amp;#039;&amp;#039;Project:&amp;#039;&amp;#039;&amp;#039; pgcobol — Prime Numbers Application&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 1.0 (reverse-engineered)&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Date:&amp;#039;&amp;#039;&amp;#039; 2026-03-17 ----- == 1. Conventions == {| ! Column ! Meaning |- | Name | COBOL data-name as written in source |- | Level | 01 / 03 / 05 / 07 hierarchy level |- | Picture | COBOL PICTURE clause |- | Usage | DISPLAY (default) / COMP-3 / COMP-5 |- | Source | Copybook or program where defined |- | Description | Semantic meaning and valid values |} Condition-names (88-level) are listed under the field they qualify. ----- == 2. Copybook: primes-session.cpy == &amp;#039;&amp;#039;&amp;#039;Control block for the session (main → business-logic) tier.&amp;#039;&amp;#039;&amp;#039; {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | primes-session | 01 | — | — | Root of session control block; passed as linkage to primesgen |- | methods | 03 | X(32) | DISPLAY | Operation verb set by primesmain before calling primesgen |- | — report-primes | 88 | — | — | VALUE “report” — run the report path |- | — generate-primes | 88 | — | — | VALUE “generate” — run the sieve path |- | — start-primes | 88 | — | — | VALUE “start” — (reserved, not used in current flow) |- | — stop-primes | 88 | — | — | VALUE “stop” — (reserved, not used in current flow) |- | — invalid-method | 88 | — | — | VALUE “bad” — sentinel for bad dispatch |- | session-result | 03 | 9(2) | DISPLAY | Result code written back by primesgen; initial value ZERO |- | — session-method-ok | 88 | — | — | VALUE 0 — operation succeeded |- | — session-method-nok | 88 | — | — | VALUE 1 — operation failed |- | — session-method-eof | 88 | — | — | VALUE 9 — cursor exhausted (end of data) |} ----- == 3. Copybook: primes-dal.cpy == &amp;#039;&amp;#039;&amp;#039;Control block for the DAL (business-logic → data-access) tier.&amp;#039;&amp;#039;&amp;#039; {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | primes-dal | 01 | — | — | Root of DAL control block; passed as linkage to primes |- | dal-methods | 03 | X(32) | DISPLAY | Operation verb set by caller |- | — next-prime | 88 | — | — | VALUE “next-prime” — fetch next row from cursor |- | — next-divider | 88 | — | — | VALUE “next-divider” — select divider by ident |- | — write-prime | 88 | — | — | VALUE “write” — insert prime into table |- | — db-cursor | 88 | — | — | VALUE “cursor” — start transaction and open cursor |- | — db-connect | 88 | — | — | VALUE “connect” — connect to PostgreSQL |- | — db-disconnect | 88 | — | — | VALUE “disconnect” — disconnect from PostgreSQL |- | — invalid-method | 88 | — | — | VALUE “bad” — sentinel for bad dispatch |- | primes-data | 03 | — | — | One-row data payload |- | primes-sequence | 05 | 9(9) | DISPLAY | Sequence / ident of the current prime row |- | prime-number | 05 | 9(9) | DISPLAY | Value of the current prime |- | dal-result | 03 | 9(2) | DISPLAY | Result code written back by primes; initial value ZERO |- | — dal-method-ok | 88 | — | — | VALUE 0 — operation succeeded |- | — dal-method-nok | 88 | — | — | VALUE 1 — operation failed |- | — dal-method-eof | 88 | — | — | VALUE 99 — cursor exhausted |} ----- == 4. Copybook: primes-ui.cpy == &amp;#039;&amp;#039;&amp;#039;Control block for the UI tier; included by all four programs.&amp;#039;&amp;#039;&amp;#039; {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | primes-ui | 01 | — | — | Root of UI control block; passed as linkage to primesui |- | ui-methods | 03 | X(32) | DISPLAY | Operation verb set by caller |- | — write-ui | 88 | — | — | VALUE “write” — add one prime row to print buffer |- | — message-ui | 88 | — | — | VALUE “log-message” — display console message |- | — start-ui | 88 | — | — | VALUE “start” — open print file |- | — stop-ui | 88 | — | — | VALUE “stop” — flush and close print file |- | process-message | 03 | — | — | Structured console log record |- | program-name | 05 | X(20) | DISPLAY | Name of the calling program (for log messages) |- | program-line | 05 | — | — | Group: paragraph name + message text |- | program-paragraph | 07 | X(20) | DISPLAY | Name of the calling paragraph |- | program-message | 07 | X(92) | DISPLAY | Human-readable status or error message |- | u-primes | 03 | — | — | One prime row for the print writer |- | u-sequence | 05 | 9(9) | DISPLAY | Prime sequence number (ident) to print |- | u-number | 05 | 9(9) | DISPLAY | Prime value to print |- | ui-method-result | 03 | 9(2) | DISPLAY | Result code from primesui; initial value ZERO |- | — ui-method-ok | 88 | — | — | VALUE 0 — operation succeeded |- | — ui-method-nok | 88 | — | — | VALUE 1 — operation failed |} ----- == 5. Copybook: primes-table.cpy == &amp;#039;&amp;#039;&amp;#039;SQL host variable — character (DISPLAY) format.&amp;#039;&amp;#039;&amp;#039; {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | primes-table | 01 | — | — | Host variable group for SQL bind/into |- | ident | 03 | S9(9) | DISPLAY | Row identity (sequence number), signed |- | prime | 03 | S9(9) | DISPLAY | Prime value, signed |} ----- == 6. Copybook: primes_table.cpy == &amp;#039;&amp;#039;&amp;#039;SQL host variable — packed-decimal (COMP-3) format. Alternate version of primes-table.cpy.&amp;#039;&amp;#039;&amp;#039; {| ! Name ! Level ! Picture ! Usage ! Description |- | primes_table | 01 | — | — | Host variable group for SQL bind/into |- | ident | 03 | S9(9) | COMP-3 | Row identity, packed decimal |- | prime | 03 | S9(9) | COMP-3 | Prime value, packed decimal |} ----- == 7. Copybook: SQLCA.cpy == &amp;#039;&amp;#039;&amp;#039;GixSQL SQL Communications Area — standard across all embedded-SQL programs.&amp;#039;&amp;#039;&amp;#039; {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | SQLCA | 01 | — | — | SQL communications area |- | SQLCAID | 05 | X(8) | DISPLAY | SQLCA identifier string |- | SQLCABC | 05 | S9(9) | COMP-5 | Byte length of SQLCA |- | SQLCODE | 05 | S9(9) | COMP-5 | SQL return code: 0 = success, negative = error, +100 = not found |- | SQLERRM | 05 | — | — | Error message group |- | SQLERRML | 49 | S9(4) | COMP-5 | Length of error message text |- | SQLERRMC | 49 | X(70) | DISPLAY | Error message text |- | SQLERRP | 05 | X(8) | DISPLAY | Error program (not used) |- | SQLERRD | 05 | S9(9) OCCURS 6 | COMP-5 | Diagnostic codes; SQLERRD(3) = rows processed |- | SQLWARN | 05 | — | — | Warning flags group (not used) |- | SQLWARN0–SQLWARN7 | 10 | X(1) | DISPLAY | Individual warning flags |- | SQLSTATE | 05 | X(5) | DISPLAY | ANSI SQL state code |} ----- == 8. Program: primesmain — Working Storage == {| !width=&amp;quot;16%&amp;quot;| Name !width=&amp;quot;16%&amp;quot;| Level !width=&amp;quot;16%&amp;quot;| Picture !width=&amp;quot;16%&amp;quot;| Usage !width=&amp;quot;16%&amp;quot;| Source !width=&amp;quot;16%&amp;quot;| Description |- | filler | 01 | X(32) VALUE “Start WS primesmain” | DISPLAY | primesmain.cbl | Debug marker to locate WS in memory dump |- | commandline-args | 01 | X(32) | DISPLAY | primesmain.cbl | Command-line argument accepted from OS |- | — execute-generate | 88 | — | — | primesmain.cbl | VALUE “generate” |- | — execute-report | 88 | — | — | primesmain.cbl | VALUE “report” |- | primes-session | 01 | (group) | — | COPY | See §2 |- | primes-ui | 01 | (group) | — | COPY | See §4 |} ----- == 9. Program: primesgen — Working Storage == {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | filler | 01 | X(32) VALUE “Start WS primesgen” | DISPLAY | Debug WS marker |- | file-buffer | 01 | X(132) | DISPLAY | FD record area for fprinter (declared but file not opened in primesgen) |- | printer | 01 | — | — | Print control group (unused in primesgen; print handled by primesui) |- | print-buffer | 03 | X(132) | DISPLAY | Line buffer |- | line-number | 03 | 99 VALUE 99 | DISPLAY | Current line counter |- | page-number | 03 | 9(4) VALUE ZERO | DISPLAY | Current page counter |- | test-quot | 01 | 9(9) | DISPLAY | Quotient from DIVIDE in sieve loop |- | primes | 01 | — | — | Local sieve control group (mirrors primes-dal structure) |- | gen-methods | 03 | X(32) | DISPLAY | Method verb for internal DAL calls |- | — query-process | 88 | — | — | VALUE “query” |- | — start-process | 88 | — | — | VALUE “start” |- | — next-divider | 88 | — | — | VALUE “get” |- | — write-prime | 88 | — | — | VALUE “put” |- | — stop-process | 88 | — | — | VALUE “stop” |- | primes-result | 03 | 9(2) VALUE ZERO | DISPLAY | Result of sieve DAL call |- | — init-primes-ok | 88 | — | — | VALUE 1 |- | — first-divider-ok | 88 | — | — | VALUE 2 |- | — next-divider-ok | 88 | — | — | VALUE 3 |- | test-number | 03 | 9(9) | DISPLAY | Current candidate being tested for primality |- | test-number-sqr | 03 | 9(9)V9(9) | DISPLAY | Square root of test-number (decimal) |- | test-divider | 03 | 9(9) | DISPLAY | Current trial divisor fetched from DB |- | test-rest | 03 | 9(9)V9(9) | DISPLAY | Remainder from DIVIDE |- | old-test-number | 03 | 9(9) | DISPLAY | Previous test-number (diagnostic / unused) |- | old-ident | 03 | 9(9) | DISPLAY | ident of the last divider fetched; incremented before next fetch |- | new-ident | 03 | 9(9) | DISPLAY | old-ident + 1; used as key in SELECT to get next divider |- | primes-ui | 01 | (group) | — | COPY — see §4 |- | primes-dal | 01 | (group) | — | COPY — see §3 |} &amp;#039;&amp;#039;&amp;#039;Linkage section:&amp;#039;&amp;#039;&amp;#039; {| ! Name ! Source ! Description |- | primes-session | COPY primes-session | Passed in by primesmain |} ----- == 10. Program: primes (DAL) — Working Storage == {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | filler | 01 | X(32) VALUE “Start WS primes” | DISPLAY | Debug WS marker |- | DATASRC | 01 | X(64) VALUE “pgsql://localhost:5432/primes&amp;amp;default_schema=primes” | DISPLAY | GixSQL connection string |- | DBUSR | 01 | X(64) VALUE “primes_user” | DISPLAY | Database user name |- | DBPWD | 01 | X(64) VALUE “pr1mes_user” | DISPLAY | Database password (plain-text) |- | CUR-STEP | 01 | X(16) | DISPLAY | Diagnostic: current SQL step (“CONNECT” / “DISCONNECT”) |- | primes-row | 01 | — | — | FETCH target for cursor |- | r-ident | 03 | 9(9) | COMP-3 | Fetched ident value |- | r-prime | 03 | 9(9) | COMP-3 | Fetched prime value |- | prime-count | 01 | 9(9) | DISPLAY | (Unused in current flow) |- | prime_seq | 01 | 9(9) | DISPLAY | (Unused in current flow) |- | divider | 01 | 9(9) | DISPLAY | (Unused in current flow) |- | primes | 01 | — | — | Local copy of sieve control (mirrors primes-dal; used for internal paragraphs) |- | SQLCA | 01 | — | — | COPY SQLCA — see §7 |- | primes-table | 01 | — | — | EXEC SQL INCLUDE primes-table — see §5 |- | primes-ui | 01 | — | — | COPY primes-ui — see §4 |} &amp;#039;&amp;#039;&amp;#039;Linkage section:&amp;#039;&amp;#039;&amp;#039; {| ! Name ! Source ! Description |- | primes-dal | COPY primes-dal | Passed in by primesgen |} ----- == 11. Program: primesui — Working Storage == {| !width=&amp;quot;20%&amp;quot;| Name !width=&amp;quot;20%&amp;quot;| Level !width=&amp;quot;20%&amp;quot;| Picture !width=&amp;quot;20%&amp;quot;| Usage !width=&amp;quot;20%&amp;quot;| Description |- | filler | 01 | X(32) VALUE “start ws primesui” | DISPLAY | Debug WS marker |- | primes-table | 01 | — | — | 6-column print accumulator (OCCURS 6) |- | primes-cel | 03 | OCCURS 6 INDEXED primes-idx | — | One cell per prime entry on a print line |- | t-ident | 05 | Z(9) | DISPLAY | Sequence number, zero-suppressed |- | filler | 05 | X(2) | DISPLAY | Column separator spaces |- | t-prime | 05 | Z(9) | DISPLAY | Prime value, zero-suppressed |- | filler | 05 | X(2) | DISPLAY | Column separator spaces |- | table-header | 01 | — | — | Heading row (OCCURS 6) — “Sequence Prime” × 6 |- | printer | 01 | — | — | Print control group |- | print-buffer | 03 | X(132) | DISPLAY | Current line being built |- | primes-prt-status | 03 | X(2) | DISPLAY | File-status code for fprinter |- | page-number | 03 | 9(4) VALUE 1 | DISPLAY | Current page number |- | print-new-page | 03 | 9 VALUE 1 | DISPLAY | Flag: 1 = new page needed |- | — new-page | 88 | — | — | VALUE 1 |- | primes-heading | 01 | X(118) VALUE “primes overview” | DISPLAY | Page heading text |- | primes-footing | 01 | — | — | Page footing group |- | filler | 03 | X(118) VALUE SPACE | DISPLAY | Left padding |- | filler | 03 | X(6) VALUE “page:” | DISPLAY | Label |- | f-page-number | 03 | Z(3)9 VALUE 1 | DISPLAY | Formatted page number |- | primes-line | 01 | — | — | (Declared but not used in current flow) |- | primes-total | 01 | — | — | (Declared but not used in current flow) |- | primes-count | 03 | 9(8) | DISPLAY | (Declared but not used in current flow) |} &amp;#039;&amp;#039;&amp;#039;Linkage section:&amp;#039;&amp;#039;&amp;#039; {| ! Name ! Source ! Description |- | primes-ui | COPY primes-ui | Passed in by all callers |} ----- == 12. Database Objects == {| !width=&amp;quot;20%&amp;quot;| Object !width=&amp;quot;20%&amp;quot;| Type !width=&amp;quot;20%&amp;quot;| Schema !width=&amp;quot;20%&amp;quot;| Owner !width=&amp;quot;20%&amp;quot;| Definition |- | primes | Schema | — | primes_user | Container schema |- | asc_ident | Sequence | primes | primes_user | INTEGER, START 1, INCREMENT 1 |- | primes | Table | primes | primes_user | See below |- | primescursor | Cursor | runtime | — | DECLARE … CURSOR FOR SELECT * FROM primes |} === Table: primes.primes === {| !width=&amp;quot;20%&amp;quot;| Column !width=&amp;quot;20%&amp;quot;| Type !width=&amp;quot;20%&amp;quot;| Nullable !width=&amp;quot;20%&amp;quot;| Default !width=&amp;quot;20%&amp;quot;| Description |- | ident | INTEGER | YES | nextval(‘primes.asc_ident’) | Auto-assigned insertion sequence |- | prime | INTEGER | YES | — | Prime number value |}&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>