COBOL Rule Set

Column 7 for * and D Only

Mnemonic: COLUMN7

Description: Only * and D shall be used in column 7.

Artefact Type: PROGRAM

Default Value: 0

Code in Uppercase

Mnemonic: UPPERCASE

Description: The program shall be written in uppercase except literals.

Artefact Type: PROGRAM

Default Value: 0

Empty line after EXIT

Mnemonic: CPRS_EXIT

Description: An empty line shall follow an EXIT statement.

Artefact Type: PROGRAM

Default Value: 0

Empty lines around DIVISION

Mnemonic: CPRS_DIVISION

Description: An empty line shall precede and follow a DIVISION.

Artefact Type: PROGRAM

Default Value: 0

Empty line after SECTION

Mnemonic: CPRS_SECTION

Description: An empty line shall follow a SECTION.

Artefact Type: PROGRAM

Default Value: 0

COMPUTE instead of ADD

Mnemonic: NOCPXADD

Description: COMPUTE shall be used to add more than 3 data instead of ADD.

Artefact Type: PROGRAM

Default Value: 0

COMPUTE instead of SUBSTRACT

Mnemonic: NOCPXSUBSTRACT

Description: COMPUTE shall be used to add more than 3 data instead of SUBSTRACT.

Artefact Type: PROGRAM

Default Value: 0

No Conditional GOTO

Mnemonic: NOCONDGOTO

Description: Conditional GO TO shall not be used. Use EVALUATE instead.

Artefact Type: PROGRAM

Default Value: 0

Perform with no THRU

Mnemonic: PERFORMWITHTHRU

Description: The call of a paragraph shall be made in the use of PERFORM paragraphName THRU paragraphNameExit.

Artefact Type: PROGRAM

Default Value: 0

Missing END-IF

Mnemonic: IFWITHENDIF

Description: An IF statement shall be closed by an END-IF

Artefact Type: PROGRAM

Default Value: 0

Missing END-EVALUATE

Mnemonic: EVALWITHENDEVAL

Description: An EVALUATE statement shall be closed by END-EVALUATE

Artefact Type: PROGRAM

Default Value: 0

Variable declaration format

Mnemonic: DCLWS

Description: A variable shall be declared in the WORKING STORAGE using the format ^W

Artefact Type: PROGRAM

Default Value: 0

No Backward Goto

Mnemonic: BWGOTO

Description: Backward gotos shall not be used.

Artefact Type: PROGRAM

Default Value: 0

Single GOBACK

Mnemonic: GOBACK

Description: Only a single GOBACK shall be used in a subprgram.

Artefact Type: PROGRAM

Default Value: 0

No procedural COPY

Mnemonic: NOPROCCOPY

Description: Procedural COPY clauses shall not be used. Use subprograms instead.

Artefact Type: PROGRAM

Default Value: 0

No RENAMES

Mnemonic: NORENAMES

Description: The RENAMES clause shall not be used.

Artefact Type: PROGRAM

Default Value: 0

No Homonymous

Mnemonic: VARNAME

Description: There shall be no homonymous variables.

Artefact Type: PROGRAM

Default Value: 0

No more than 3 nested IF

Mnemonic: NESTEDIF

Description: There shall be no more than 3 nexted IF statements

Artefact Type: PROGRAM

Default Value: 0

No ALTER

Mnemonic: NOALTER

Description: The ALTER statement shall not be used. Labels are decided only at execution time.

Artefact Type: PROGRAM

Default Value: 0

No MOVE CORRESPONDING

Mnemonic: NOCORRESPONDING

Description: MOVE CORRESPONDING shall not be used.

Artefact Type: PROGRAM

Default Value: 0

Use COMP for OCCURS

Mnemonic: OCCURSCOMP

Description: For the OCCURS DEPENDING ON clause, the corresponding item shall be declared using COMP.

Artefact Type: PROGRAM

Default Value: 0

Use SYNCHRONIZED

Mnemonic: USESYNCH

Description: SYNCHRONIZED shall be used for COMP, COMP-1, COMP-2, POINTER and INDEX variables.

Artefact Type: PROGRAM

Default Value: 0

Open file once

Mnemonic: FILEOPENONCE

Description: A file shall be opened only once

Artefact Type: PROGRAM

Default Value: 0

Close file once

Mnemonic: FILECLOSEONCE

Description: A file shall be closed only once

Artefact Type: PROGRAM

Default Value: 0

No DEBUG MODE

Mnemonic: NODEBUG

Description: DEBUGGING-MODE shall not be used

Artefact Type: PROGRAM

Default Value: 0

No Variables S9(9)

Mnemonic: NOVARS9

Description: The variables shall not be declared in S9(9) COMP. It implies a conversion

Artefact Type: PROGRAM

Default Value: 0

BLOCK Clause

Mnemonic: BLOCKSIZE

Description: In the FILE-DESCRIPTION section, each file description shall always use the BLOCK CONTAINS 0 RECORDS clause. The system will assign the BLOCK-SIZE automatically when allocating the file.

Artefact Type: PROGRAM

Default Value: 0

Use WHEN OTHER

Mnemonic: WHENOTHER

Description: EVALUATE shall end by a WHEN OTHER clause.

Artefact Type: PROGRAM

Default Value: 0

No INITIALIZE

Mnemonic: NOINITIALIZE

Description: INITIALIZE shall not be used. Use MOVE to initialize variable.

Artefact Type: PROGRAM

Default Value: 0

Close open file

Mnemonic: FILEOPENCLOSE

Description: A file shall be opened and closed in the same program

Artefact Type: PROGRAM

Default Value: 0

Use FILE STATUS

Mnemonic: FILESTATUS

Description: FILE STATUS shall be used to manage I/O errors.

Artefact Type: PROGRAM

Default Value: 0

READ-WRITE Instruction

Mnemonic: READWRITE

Description: READ A INTO B or WRITE A FROM B forms shall be used for reading/writing a file.

Artefact Type: PROGRAM

Default Value: 0

Standard Label

Mnemonic: LABELSTD

Description: In the FILE-DESCRIPTION section, each file description shall always use the LABEL RECORD STANDARD clause. Only the standard labels are checked by the system.

Artefact Type: PROGRAM

Default Value: 0