<?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=COBOL_Std_10_Configuration_and_Credentials</id>
	<title>COBOL Std 10 Configuration and Credentials - 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=COBOL_Std_10_Configuration_and_Credentials"/>
	<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=COBOL_Std_10_Configuration_and_Credentials&amp;action=history"/>
	<updated>2026-09-11T05:02:00Z</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=COBOL_Std_10_Configuration_and_Credentials&amp;diff=4727&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;== 10. Configuration and Credentials ==  === 10.1 Externalise Credentials ===  Hard-coded database credentials in WORKING-STORAGE (pgcobol defect D-04) are prohibited in production code. Use one of the following patterns, in preference order:  # Environment variables accepted via &lt;code&gt;ACCEPT … FROM ENVIRONMENT-VALUE&lt;/code&gt; at runtime. # A configuration file read at startup, with path supplied via an environment variable. # A GnuCOBOL external data item shared from a c...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=COBOL_Std_10_Configuration_and_Credentials&amp;diff=4727&amp;oldid=prev"/>
		<updated>2026-03-25T11:19:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 10. Configuration and Credentials ==  === 10.1 Externalise Credentials ===  Hard-coded database credentials in WORKING-STORAGE (pgcobol defect D-04) are prohibited in production code. Use one of the following patterns, in preference order:  # Environment variables accepted via &amp;lt;code&amp;gt;ACCEPT … FROM ENVIRONMENT-VALUE&amp;lt;/code&amp;gt; at runtime. # A configuration file read at startup, with path supplied via an environment variable. # A GnuCOBOL external data item shared from a c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 10. Configuration and Credentials ==&lt;br /&gt;
&lt;br /&gt;
=== 10.1 Externalise Credentials ===&lt;br /&gt;
&lt;br /&gt;
Hard-coded database credentials in WORKING-STORAGE (pgcobol defect D-04) are prohibited in production code. Use one of the following patterns, in preference order:&lt;br /&gt;
&lt;br /&gt;
# Environment variables accepted via &amp;lt;code&amp;gt;ACCEPT … FROM ENVIRONMENT-VALUE&amp;lt;/code&amp;gt; at runtime.&lt;br /&gt;
# A configuration file read at startup, with path supplied via an environment variable.&lt;br /&gt;
# A GnuCOBOL external data item shared from a configuration sub-program.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cobol&amp;quot;&amp;gt;&lt;br /&gt;
       01 WS-DB-USER     PIC X(64).&lt;br /&gt;
       01 WS-DB-PWD      PIC X(64).&lt;br /&gt;
       ...&lt;br /&gt;
       B000-INITIALISE.&lt;br /&gt;
           ACCEPT WS-DB-USER FROM ENVIRONMENT-VALUE &amp;#039;PRIMES_DB_USER&amp;#039;&lt;br /&gt;
           ACCEPT WS-DB-PWD  FROM ENVIRONMENT-VALUE &amp;#039;PRIMES_DB_PWD&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 10.2 Connection String ===&lt;br /&gt;
&lt;br /&gt;
Store the full connection string in a named constant in WORKING-STORAGE. The GixSQL pgsql driver string format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cobol&amp;quot;&amp;gt;&lt;br /&gt;
       01 WS-DATASRC     PIC X(64)&lt;br /&gt;
           VALUE &amp;#039;pgsql://localhost:5432/primes&amp;amp;default_schema=primes&amp;#039;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Ambox&lt;br /&gt;
| type  = notice&lt;br /&gt;
| text  = &amp;#039;&amp;#039;&amp;#039;GixSQL note&amp;#039;&amp;#039;&amp;#039; — The &amp;lt;code&amp;gt;&amp;amp;default_schema=&amp;lt;/code&amp;gt; parameter sets the PostgreSQL &amp;lt;code&amp;gt;search_path&amp;lt;/code&amp;gt; for the session. Always include it to avoid schema-qualification issues in SQL statements.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;#039;&amp;#039;[[Cobol programming standards|← Back to index]]&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>