× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Section naming conventions
  • From: pete.lawton@xxxxxxxxxxx (pete lawton)
  • Date: Thu, 26 Aug 1999 08:42:21 GMT

On Wed, 25 Aug 1999 17:17:19 +0100, you wrote:

>I am intrigued to learn the various naming conventions experienced by those of
>you who not averse to using SECTIONS.
>
>
Hi Chris,

Apart from occasional attempts to try new naming conventions, none of
which ever seemed quite right, I've always used section names  in the
format A00-INITIALISATION / B00-PROCESS / Z00-CLOSE.

Sometimes it leads to some fairly convoluted section names -
C00-PROCESS-FILE
   (calls)
CA00-PROCESS-RECORD
  (calls)
CAA00-SET-UP-RECORD
  (calls)
CAAA-DO-SOMETHING
CAAB-DO-SOMETHING-ELSE

etc, etc

But at least you can always see what depends on what.  

I used to format sections as...

C00-PROCESS-FILE
        DO SOMETHING
        DO SOMETHING ELSE
C99-EXIT
        EXIT

but I now format them as...

C00-PROCESS-FILE
        DO SOMETHING
        DO SOMETHING ELSE
EXIT-SECTION
        EXIT

this has the advantage that if you use goto's to go to the end of the
section (these are the only ones I use), then you can copy code around
between sections without the risk of forgetting to change a goto in
the copied code, and accidentally disappearing off to somewhere you
didn't expect.

I've never thought that the formatting of the code in the IBM COBOL
manuals is very good.

---
Regards,

Pete Lawton

pete.lawton@bigfoot.com
+---
| This is the COBOL/400 Mailing List!
| To submit a new message, send your mail to COBOL400-L@midrange.com.
| To subscribe to this list send email to COBOL400-L-SUB@midrange.com.
| To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---END



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.