fccFrameWork Good Programming Practices

Program code must not only fulfill its desired function - and perform it efficiently - but must also be maintainable by programmers other than the originator. In the life of any program more time is spent on maintenance and enhancement than was ever spent on the original implementation (derived from A J Marston, COBOL Programming Standards).

Compliance to theses practices is checked as part of the bw-fcc GmbH Quality Control process (see also: Development Tools - Source Code Parser).

 

fccFrameWork Documentation Overview

There are four major documentation sources:

  • generic documents like datasheets, white papers, website content
  • Online Help
    architecture and functional descriptions for users and developers available via Online Help (and various manuals generated out of the Online Help content)
  • bw-fcc GmbH internal only documentation
    for source code containing non-public code (e.g. password encryption, license key structure and encryption)
  • Source Code Documentation (see below).

 

Source Code Documentation

For fccFrameWork source code the following documentation guidelines apply:

  • program header
    • functional description
    • context and environment (parameters, data access, reports, etc.)
    • change control (who changed what and when)
  • sections (functions)
    a meaningful description of the function.

 

COBOL Program Structure

fccFrameWork source code is based on a set of good programming practices:

  • Source Code Format
    • source format is FIXED (ANSI format):
      • columns 1 - 6: sequence number (not used)
      • column 7: indicator area
      • column 8 - 11: area A
      • columns 12 - 72: area B
    • Division headers, section headers and paragraph names start in area A
    • Level numbers can appear either in area A or area B
    • all other COBOL text starts in Area B
    • Comments are identified by an asterisk
    • the source code itself is free text, i.e. no guidelines for upper- or lower writing of keywords or variable names
  • Naming Conventions
    • Program Name:
  • Procedure division is structured into sections, i.e. there's no COBOL statement outside a section
    • a section names has short but meaningful description of the function the section is performing
    • each section must have a single entry point and a single exit point
  • PERFORM THRU and ALTER statements are not allowed
  • explicit statement terminators have to be used (e.g. if - endif, perform - end-perform)
  • GO TO statements are only allowed within a section; i.e. a GO TO must not leave section borders
© 2019 bw-fcc GmbH. All Rights Reserved.