<?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_4_Naming_Conventions</id>
	<title>COBOL Std 4 Naming Conventions - 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_4_Naming_Conventions"/>
	<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=COBOL_Std_4_Naming_Conventions&amp;action=history"/>
	<updated>2026-09-11T12:09:47Z</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_4_Naming_Conventions&amp;diff=4721&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;== 4. Naming Conventions ==  === 4.1 General Rules ===  * Use hyphens (&lt;code&gt;-&lt;/code&gt;) as word separators — never underscores or camelCase. * Maximum 30 characters for data names; 30 characters for paragraph names. * COBOL reserved words in ALL CAPS; user-defined names in ALL CAPS (consistent with GnuCOBOL case-insensitivity). * Names must reflect business purpose; avoid single-letter names and meaningless abbreviations. * Approved abbreviations are listed in #Append...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.webhuis.nl:443/index.php?title=COBOL_Std_4_Naming_Conventions&amp;diff=4721&amp;oldid=prev"/>
		<updated>2026-03-25T11:12:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 4. Naming Conventions ==  === 4.1 General Rules ===  * Use hyphens (&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;) as word separators — never underscores or camelCase. * Maximum 30 characters for data names; 30 characters for paragraph names. * COBOL reserved words in ALL CAPS; user-defined names in ALL CAPS (consistent with GnuCOBOL case-insensitivity). * Names must reflect business purpose; avoid single-letter names and meaningless abbreviations. * Approved abbreviations are listed in #Append...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 4. Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== 4.1 General Rules ===&lt;br /&gt;
&lt;br /&gt;
* Use hyphens (&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;) as word separators — never underscores or camelCase.&lt;br /&gt;
* Maximum 30 characters for data names; 30 characters for paragraph names.&lt;br /&gt;
* COBOL reserved words in ALL CAPS; user-defined names in ALL CAPS (consistent with GnuCOBOL case-insensitivity).&lt;br /&gt;
* Names must reflect business purpose; avoid single-letter names and meaningless abbreviations.&lt;br /&gt;
* Approved abbreviations are listed in [[#Appendix A — Approved Abbreviations|Appendix A]].&lt;br /&gt;
&lt;br /&gt;
=== 4.2 Working-Storage and Linkage Prefixes ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
! Prefix !! Usage !! Example&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WS-&amp;lt;/code&amp;gt; || Working-Storage variables || &amp;lt;code&amp;gt;WS-CUSTOMER-ID&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LS-&amp;lt;/code&amp;gt; || Linkage-Section parameters || &amp;lt;code&amp;gt;LS-INPUT-RECORD&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FS-&amp;lt;/code&amp;gt; || File-Section records || &amp;lt;code&amp;gt;FS-CUSTOMER-FILE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SW-&amp;lt;/code&amp;gt; || Switch / flag fields || &amp;lt;code&amp;gt;SW-END-OF-FILE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CTR-&amp;lt;/code&amp;gt; || Counters || &amp;lt;code&amp;gt;CTR-RECORD-COUNT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ERR-&amp;lt;/code&amp;gt; || Error-handling fields || &amp;lt;code&amp;gt;ERR-MESSAGE-TEXT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DB-&amp;lt;/code&amp;gt; || SQL host variables || &amp;lt;code&amp;gt;DB-CUSTOMER-ROW&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DAL-&amp;lt;/code&amp;gt; || Data Access Layer interface || &amp;lt;code&amp;gt;DAL-METHOD-CODE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;UI-&amp;lt;/code&amp;gt; || User Interface / output fields || &amp;lt;code&amp;gt;UI-SCREEN-MESSAGE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DC-&amp;lt;/code&amp;gt; || Data-conversion work fields || &amp;lt;code&amp;gt;DC-AMOUNT-WORK&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 4.3 Paragraph Naming — Numeric Prefix Scheme ===&lt;br /&gt;
&lt;br /&gt;
Paragraphs use a four-digit numeric prefix to indicate their tier and purpose. The prefix creates an implicit call-hierarchy that is visible when reading source or a cross-reference listing.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
! Range !! Section Purpose !! Example&lt;br /&gt;
|-&lt;br /&gt;
| A000–A999 || Main control / entry point || &amp;lt;code&amp;gt;A000-MAIN-CONTROL&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| B000–B999 || Initialisation routines || &amp;lt;code&amp;gt;B000-INITIALISE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| C000–C999 || Main processing || &amp;lt;code&amp;gt;C100-PROCESS-RECORD&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D000–D999 || Validation routines || &amp;lt;code&amp;gt;D000-VALIDATE-INPUT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| E000–E999 || Error handling || &amp;lt;code&amp;gt;E000-HANDLE-ERROR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| R000–R999 || Business logic routines || &amp;lt;code&amp;gt;R080-GET-NEXT-PRIME&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| S000–S999 || Database / system routines || &amp;lt;code&amp;gt;S000-DB-CONNECT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Z000–Z999 || Termination / cleanup || &amp;lt;code&amp;gt;Z000-PROGRAM-END&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 4.4 Copybook Naming ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
! Suffix !! Purpose !! Example&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-REC&amp;lt;/code&amp;gt; || Record layouts || &amp;lt;code&amp;gt;CUSTOMER-REC&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-DAL&amp;lt;/code&amp;gt; || Data Access Layer interface || &amp;lt;code&amp;gt;PRIMES-DAL&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-UI&amp;lt;/code&amp;gt; || User Interface layouts || &amp;lt;code&amp;gt;PRIMES-UI&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-TAB&amp;lt;/code&amp;gt; || SQL host-variable table layouts || &amp;lt;code&amp;gt;PRIMES-TAB&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-ERR&amp;lt;/code&amp;gt; || Error-code definitions || &amp;lt;code&amp;gt;SYSTEM-ERR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-SES&amp;lt;/code&amp;gt; || Session / orchestration blocks || &amp;lt;code&amp;gt;PRIMES-SES&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Ambox&lt;br /&gt;
| type  = notice&lt;br /&gt;
| text  = &amp;#039;&amp;#039;&amp;#039;File naming&amp;#039;&amp;#039;&amp;#039; — copybook file names must use hyphens, not underscores. The pgcobol project contains both &amp;lt;code&amp;gt;primes-table.cpy&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;primes_table.cpy&amp;lt;/code&amp;gt;; this ambiguity is a known defect and must not be replicated.&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>