COBOL Scan rules
Contrast Scan supports these rules for COBOL.
Severity | Contrast rule | Engine rule ID | Description |
---|---|---|---|
Critical | Avoid Access Not Indexed Table Big | OPT.COBOL.AvoidAccessNotIndexedTableBig | AvoidAccessNotIndexedTableBig: Detected an access to a large table (no. >{} |
Critical | Avoid Access Without Index Big | OPT.COBOL.AvoidAccessWithoutIndexBig | AvoidAccessWithoutIndexBig: Detected access where there is no index fields reported in the WHERE on a large table size (number pages> {} |
Critical | Avoid As In SQL Sentence | OPT.COBOL.AvoidAsInSqlSentence | AvoidAsInSqlSentence: It is not allowed the use of statements that include temporary tables defined using the AS clause |
Critical | Avoid Call Other Section Paragraphs | OPT.COBOL.AvoidCallOtherSectionParagraphs | AvoidCallOtherSectionParagraphs: Call a paragraph from other section |
Critical | Avoid Join With Cost Access | OPT.COBOL.AvoidJoinWithCostAccess | AvoidJoinWithCostAccess: Not allowed to use JOIN containing costly accesses (R0, I0, MX) to one of the tables (no. pages> {} |
Critical | Avoid Paragraphs Out Of Sections | OPT.COBOL.AvoidParagraphsOutOfSections | AvoidParagraphsOutOfSections: Avoid paragraphs outside of sections |
Critical | Check SQL Code After Sequence | OPT.COBOL.CheckSqlCodeAfterSequence | CheckSqlCodeAfterSequence: Check return codes (SQLCODE -359 and / or -845) in SEQUENCE objects with NEXT VALUE or PREVIOUS VALUE |
Critical | Check SQLcode When Rowset | OPT.COBOL.CheckSqlcodeWhenRowset | CheckSqlcodeWhenRowset: Check rows and returned code (SQLCODE {} |
Critical | Check Value Occur | OPT.COBOL.CheckValueOccur | CheckValueOccur: When use MULTIROW, the value of 'n' in FOR n ROWS option, has to be less or equal to OCCURS in the table that receives the rowset |
Critical | Call Paragraph | OPT.COBOL.COBBP.CallParagraph | CallParagraph: Uncalled paragraph/section |
Critical | N D E S | OPT.COBOL.COD_COBOL.NDES | NDES: Do not divide PROCEDURE DIVISION into sections |
Critical | N R | OPT.COBOL.COD_COBOL.NR | NR: Do not use RETURN inside EXEC CICS statements |
Critical | Avoid Collisions In Procedure Names | OPT.COBOL.FIA_COBOL.AvoidCollisionsInProcedureNames | AvoidCollisionsInProcedureNames: Avoid duplicated section names, or paragraph names in same section |
Critical | Close Open Files | OPT.COBOL.FIA_COBOL.CloseOpenFiles | CloseOpenFiles: Check that every opened file is closed |
Critical | Close Open Input Output Files | OPT.COBOL.FIA_COBOL.CloseOpenInputOutputFiles | CloseOpenInputOutputFiles: Check that every opened (input or output) file is closed |
Critical | Open Declared Files | OPT.COBOL.FIA_COBOL.OpenDeclaredFiles | OpenDeclaredFiles: Check that every declared file is opened |
Critical | Read Or Write Open Files | OPT.COBOL.FIA_COBOL.ReadOrWriteOpenFiles | ReadOrWriteOpenFiles: Check that every opened file is read or written |
Critical | Last Rows Invalid Checks | OPT.COBOL.LastRowsInvalidChecks | LastRowsInvalidChecks: Detected control of SQLCODE values ‚Äã‚Äãthat cannot be done. |
Critical | Last Rows Valid Checks | OPT.COBOL.LastRowsValidChecks | LastRowsValidChecks: Missing control of SQLCODE values ‚Äã‚Äãneeded. |
Critical | M L S | OPT.COBOL.MAN_COBOL.MLS | MLS: Avoid exceeding maximum number of lines per Cobol program |
Critical | M S | OPT.COBOL.MAN_COBOL.MS | MS: Use a single program exit point (STOP or GOBACK) per program |
Critical | D C | OPT.COBOL.RG_COBOL.DC | DC: With DIVIDE or COMPUTE with a division, add ON SIZE ERROR to control potential division by zero |
Critical | F D S N | OPT.COBOL.RG_COBOL.FDSN | FDSN: Avoid FD without record descriptor |
Critical | L R S | OPT.COBOL.RG_COBOL.LRS | LRS: Use LABEL RECORD IS STANDARD in file descriptors (FD) |
Critical | N L F | OPT.COBOL.RG_COBOL.NLF | NLF: Avoid programmes with too many lines |
Critical | N U R | OPT.COBOL.RG_COBOL.NUR | NUR: Do not use REPORT clause |
Critical | Avoid Alter | OPT.COBOL.SEC.AvoidAlter | AvoidAlter: Avoid ALTER |
Critical | Cobol Access Control DLI | OPT.COBOL.SEC.Cobol_AccessControlDLI | Cobol_AccessControlDLI: Check user input used in DL/I (IMS) queries |
Critical | Cobol Access Control Database | OPT.COBOL.SEC.Cobol_AccessControlDatabase | Cobol_AccessControlDatabase: Authorization Bypass Through User-Controlled SQL Primary Key |
Critical | Dynamic Storage Leak Rule | OPT.COBOL.SEC.DynamicStorageLeakRule | DynamicStorageLeakRule: Potential dynamic storage area leak |
Critical | Illegal Values For Pointers | OPT.COBOL.SEC.IllegalValuesForPointers | IllegalValuesForPointers: Access of Uninitialized Pointer |
Critical | Path Traversal | OPT.COBOL.SEC.PathTraversal | PathTraversal: Avoid non-neutralized user-controlled input to be part of a pathname (file or directory) used in I/O operations |
Critical | Pointer Arithmetic | OPT.COBOL.SEC.PointerArithmetic | PointerArithmetic: Avoid pointer arithmetic in Cobol |
Critical | Avoid Duplicated Queries | OPT.COBOL.SQL_COBOL.AvoidDuplicatedQueries | AvoidDuplicatedQueries: Avoid duplicated SQL statements |
Critical | Cursor For Update Where Current | OPT.COBOL.SQL_COBOL.CursorForUpdateWhereCurrent | CursorForUpdateWhereCurrent: If a CURSOR is declared FOR UPDATE, DELETE and UPDATE must be used with the WHERE CURRENT specification |
Critical | Detect Unaware Cross Joins | OPT.COBOL.SQL_COBOL.DetectUnawareCrossJoins | DetectUnawareCrossJoins: Do not make "unnoticed" cartesian products in queries |
Critical | Dont Select Known Fields | OPT.COBOL.SQL_COBOL.DontSelectKnownFields | DontSelectKnownFields: SELECT queries never should get fields used in the WHERE specification with {} |
Critical | Fetch And Declare Same Fields | OPT.COBOL.SQL_COBOL.FetchAndDeclareSameFields | FetchAndDeclareSameFields: The number of fields to retrieve specified in the DECLARE CURSOR statement must be the same as the number of fields specified in the FETCH statement |
Critical | Avoid Correlated Sub Selects | OPT.COBOL.SQL_COBOL.AvoidCorrelatedSubSelects | AvoidCorrelatedSubSelects: Avoid nested SELECTs that use columns defined in outer SELECTs |
Critical | Cobol Access Control MQ | OPT.COBOL.SEC.Cobol_AccessControlMQ | Cobol_AccessControlMQ: Do not allow user input to control fields of MQSeries descriptor |
Critical | Cobol Process Control | OPT.COBOL.SEC.Cobol_ProcessControl | Cobol_ProcessControl: Avoid calling subprogram where its name could be controlled by user input |
Critical | Cobol Resource Injection | OPT.COBOL.SEC.Cobol_ResourceInjection | Cobol_ResourceInjection: Improper Control of Resource Identifiers ('Resource Injection') |
Critical | Cross Site Scripting | OPT.COBOL.SEC.CrossSiteScripting | CrossSiteScripting: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') |
Critical | OS Command Injection | OPT.COBOL.SEC.OSCommandInjection | OSCommandInjection: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') |
Critical | SQL Injection | OPT.COBOL.SEC.SqlInjection | SqlInjection: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') |
Critical | Cobol Hardcoded Password | OPT.COBOL.SEC.Cobol_HardcodedPassword | Cobol_HardcodedPassword: Hardcoded passwords can compromise system security in a way that cannot be easily remedied |
Critical | HTTP Header Manipulation | OPT.COBOL.SEC.HTTPHeaderManipulation | HTTPHeaderManipulation: Unvalidated data in HTTP response header |
Critical | Check Crypto Return Code | OPT.COBOL.SEC.CheckCryptoReturnCode | CheckCryptoReturnCode: Validate return code for cryptographic operations |
High | Avoid XML | OPT.COBOL.AvoidXML | AvoidXML: Do not use (read and parse) XML in a cobol program |
High | Avoid XML Generate | OPT.COBOL.AvoidXMLGenerate | AvoidXMLGenerate: Do not generate XML in a cobol program |
High | Link Xctl With Commarea Length | OPT.COBOL.CICS.LinkXctlWithCommareaLength | LinkXctlWithCommareaLength: Specify LENGTH with COMMAREA in CICS LINK/XCTL/RETURN commands |
High | Use Cics Explicit Error Handling | OPT.COBOL.CICS.UseCicsExplicitErrorHandling | UseCicsExplicitErrorHandling: In CICS commands, use error handling with RESP / NOHANDE and test result code |
High | I S E | OPT.COBOL.COBBP.ISE | ISE: Close each IF with END-IF |
High | R I B | OPT.COBOL.COBBP.RIB | RIB: FD descriptor must specify BLOCK CONTAINS 0 RECORDS |
High | C O B N O M Call Naming Convention | OPT.COBOL.COBNOM_CallNamingConvention | COBNOM_CallNamingConvention: CALL naming conventions |
High | Check File Status After I O | OPT.COBOL.FIA_COBOL.CheckFileStatusAfterIO | CheckFileStatusAfterIO: FILE STATUS should be checked after I/O operations |
High | No Stmt After Program Termination | OPT.COBOL.FIA_COBOL.NoStmtAfterProgramTermination | NoStmtAfterProgramTermination: There should be no statements following STOP RUN / GOBACK / EXIT PROGRAM |
High | Use Field W S | OPT.COBOL.FIA_COBOL.UseFieldWS | UseFieldWS: Check that every field declared in WORKING-STORAGE is used |
High | W O E V | OPT.COBOL.FIA_COBOL.WOEV | WOEV: Use WHEN OTHER in EVALUATE |
High | C N P | OPT.COBOL.MAN_COBOL.CNP | CNP: Comment paragraphs and procedure sections |
High | E I F A | OPT.COBOL.MAN_COBOL.EIFA | EIFA: Avoid nesting IF too deeply |
High | I N V F | OPT.COBOL.MAN_COBOL.INVF | INVF: Avoid programs with high integration complexity |
High | M N N | OPT.COBOL.MAN_COBOL.MNN | MNN: DISPLAY instruction with non-normalised message codes |
High | N S T | OPT.COBOL.MAN_COBOL.NST | NST: Limit the number of executable sentences per Cobol program |
High | P COM | OPT.COBOL.MAN_COBOL.PCOM | PCOM: Avoid programs with low code comments rate |
High | P R C D | OPT.COBOL.MAN_COBOL.PRCD | PRCD: Avoid deeply nested flow-control sentences |
High | R A C C | OPT.COBOL.MAN_COBOL.RACC | RACC: Avoid programs/routines with high cyclomatic complexity |
High | S COM | OPT.COBOL.MAN_COBOL.SCOM | SCOM: Avoid sections with low comment percentage |
High | Not Used Fields | OPT.COBOL.NotUsedFields | NotUsedFields: Unused fields retrieved in SELECT or FETCH statements |
High | H I F I | OPT.COBOL.OYR_COBOL.HIFI | HIFI: Avoid high fan-in procedures |
High | H I F O | OPT.COBOL.OYR_COBOL.HIFO | HIFO: Avoid high fan-out procedures |
High | Read Followed By At End Or Invalid Key | OPT.COBOL.ReadFollowedByAtEndOrInvalidKey | ReadFollowedByAtEndOrInvalidKey: READ statement without by AT END or INVALID KEY. |
High | F C T | OPT.COBOL.RG_COBOL.FCT | FCT: Programs must have at least as many counters as tables and files declared in program |
High | F S R | OPT.COBOL.RG_COBOL.FSR | FSR: Define FD as LABEL RECORD STANDARD, 0-record blocks, and recording mode fixed or variable |
High | G O T O | OPT.COBOL.RG_COBOL.GOTO | GOTO: Avoid GO TO statements in program logic |
High | N T P | OPT.COBOL.RG_COBOL.NTP | NTP: Do not use PERFORM ... THRU |
High | Call Parameter Mismatch | OPT.COBOL.SEC.CallParameterMismatch | CallParameterMismatch: Parameter mismatch in CALL |
High | Avoid Declared Unopened Cursors | OPT.COBOL.SQL_COBOL.AvoidDeclaredUnopenedCursors | AvoidDeclaredUnopenedCursors: If a CURSOR is declared, it must be opened |
High | Avoid Included Tables And Not Accessed | OPT.COBOL.SQL_COBOL.AvoidIncludedTablesAndNotAccessed | AvoidIncludedTablesAndNotAccessed: Avoid included table definitions, not accessed after in the programme body |
High | Avoid Opened Unclosed Cursors | OPT.COBOL.SQL_COBOL.AvoidOpenedUnclosedCursors | AvoidOpenedUnclosedCursors: If a CURSOR is opened, it must be closed |
High | Avoid Opened Unused Cursors | OPT.COBOL.SQL_COBOL.AvoidOpenedUnusedCursors | AvoidOpenedUnusedCursors: If a CURSOR is opened, it must be used |
High | Check SQLcode Or Indicator Vars In Select | OPT.COBOL.SQL_COBOL.CheckSqlcodeOrIndicatorVarsInSelect | CheckSqlcodeOrIndicatorVarsInSelect: Check for NULL properly (use host variables in SQL sentence or check for SQLCODE {} |
High | Control SQLcode After Exec SQL | OPT.COBOL.SQL_COBOL.ControlSqlcodeAfterExecSql | ControlSqlcodeAfterExecSql: SQLCODE value should be checked after each EXEC SQL statement |
High | No Current Clause | OPT.COBOL.SQL_COBOL.NoCurrentClause | NoCurrentClause: SQL queries with CURRENT clause are heavy-weighted and must be used only when necessary |
High | Optimize Varchar Moves | OPT.COBOL.SQL_COBOL.OptimizeVarcharMoves | OptimizeVarcharMoves: Control data size on VARCHAR columns |
High | Avoid Union | OPT.COBOL.SQL_COBOL.AvoidUnion | AvoidUnion: Avoid selects with UNION |
High | Use The As Keyword | OPT.COBOL.SQL_COBOL.UseTheAsKeyword | UseTheAsKeyword: Use AS keyword when stablishing an alias to tables |
High | Avoid Numeric References In By Clauses | OPT.COBOL.SQL_COBOL.AvoidNumericReferencesInByClauses | AvoidNumericReferencesInByClauses: Do not refer to column names with number indexes in * BY clauses |
High | No Accept From Untrusted Source | OPT.COBOL.SEC.NoAcceptFromUntrustedSource | NoAcceptFromUntrustedSource: Do not ACCEPT data from untrusted sources |
High | No Active Debug | OPT.COBOL.SEC.NoActiveDebug | NoActiveDebug: Information Exposure Through Debug Information |
High | Weak Crypto Hash | OPT.COBOL.SEC.WeakCryptoHash | WeakCryptoHash: Weak cryptographic hashes cannot guarantee data integrity |
Info | Access In Loop Not Used Index | OPT.COBOL.AccessInLoopNotUsedIndex | AccessInLoopNotUsedIndex: Access detected in a loop to a medium table (no. pages >{} |
Info | Avoid Accept From Console | OPT.COBOL.AvoidAcceptFromConsole | AvoidAcceptFromConsole: Using ACCEPT FROM CONSOLE is not allowed |
Info | Avoid Access Not Indexed Table Small | OPT.COBOL.AvoidAccessNotIndexedTableSmall | AvoidAccessNotIndexedTableSmall: Detected a small table access (no. pages < {} |
Info | Avoid Copy Procedure Division | OPT.COBOL.AvoidCopyProcedureDivision | AvoidCopyProcedureDivision: Using COPY in PROCEDURE DIVISION is not allowed |
Info | Avoid Distinct | OPT.COBOL.AvoidDistinct | AvoidDistinct: Avoid the DISTINCT operator |
Info | Avoid Divide0 | OPT.COBOL.AvoidDivide0 | AvoidDivide0: Avoid division by 0 |
Info | Avoid If Numeric Alphabetic | OPT.COBOL.AvoidIfNumericAlphabetic | AvoidIfNumericAlphabetic: Avoid using IF NUMERIC and IF ALPHABETIC |
Info | Avoid Include Procedure Division | OPT.COBOL.AvoidIncludeProcedureDivision | AvoidIncludeProcedureDivision: Using INCLUDE in PROCEDURE DIVISION is not allowed |
Info | Avoid Mix SQL Code | OPT.COBOL.AvoidMixSqlCode | AvoidMixSqlCode: In a control statement does not combine program variables with return codes (SQL-CODE) |
Info | Avoid No Calified Vars | OPT.COBOL.AvoidNoCalifiedVars | AvoidNoCalifiedVars: Variable with repeated ID detected |
Info | Avoid No Rewind In Sequential Files | OPT.COBOL.AvoidNoRewindInSequentialFiles | AvoidNoRewindInSequentialFiles: Do not use NO REWIND clause in sequential files |
Info | Avoid Recover Equal Fields | OPT.COBOL.AvoidRecoverEqualFields | AvoidRecoverEqualFields: Avoid recovering fields that are condicioned by equal |
Info | Avoid Repeat Calls | OPT.COBOL.AvoidRepeatCalls | AvoidRepeatCalls: Avoid calling to the same routine several times |
Info | Avoid Search Small Working | OPT.COBOL.AvoidSearchSmallWorking | AvoidSearchSmallWorking: For seeking in tables WORKING with less than 50 elements use the SEARCH statement |
Info | Avoid Sentence Acording Size Table Small | OPT.COBOL.AvoidSentenceAcordingSizeTableSmall | AvoidSentenceAcordingSizeTableSmall: Detected a statement oh a small table(No. pages < {} |
Info | Change Cursor To Select | OPT.COBOL.ChangeCursorToSelect | ChangeCursorToSelect: Defined cursor can be transformed into a SELECT |
Info | Check88 Vars | OPT.COBOL.Check88Vars | Check88Vars: It is recommended using level 88 for variables used in conditional statements |
Info | Check Cols Not Modify | OPT.COBOL.CheckColsNotModify | CheckColsNotModify: Do not put columns whose value has not been changed in the UPDATE statement |
Info | Check Complete Insert | OPT.COBOL.CheckCompleteInsert | CheckCompleteInsert: The INSERT statement should be coded with all the variables and in the same order as defined in DECLARE |
Info | Check Cursor For Update | OPT.COBOL.CheckCursorForUpdate | CheckCursorForUpdate: The columns retrieved in the FOR UPDATE clause must match those specified in the SET clause of the WHERE CURRENT OF |
Info | Check Delete For Update | OPT.COBOL.CheckDeleteForUpdate | CheckDeleteForUpdate: When using cursors, to delete rows with DELETE WHERE CURRENT OF, the FOR UPDATE clause must have a single column |
Info | Check Fetch And Cursor | OPT.COBOL.CheckFetchAndCursor | CheckFetchAndCursor: The FETCH statement must include the same columns in the same order they appear in the statement of the cursor |
Info | Check File Operations | OPT.COBOL.CheckFileOperations | CheckFileOperations: Do not use OPEN, READ, and WRITE operations more than once in a program |
Info | Check Filestatus After File Access | OPT.COBOL.CheckFilestatusAfterFileAccess | CheckFilestatusAfterFileAccess: Check the FILE STATUS variable after each file access |
Info | Check List Prefetch | OPT.COBOL.CheckListPrefetch | CheckListPrefetch: LIST PREFETCH has been detected in DB2 access |
Info | Check Type Operations | OPT.COBOL.CheckTypeOperations | CheckTypeOperations: Fields involved in arithmetic operations must be defined as COMP or COMP-3 and have the same length |
Info | Check Updt For Updt | OPT.COBOL.CheckUpdtForUpdt | CheckUpdtForUpdt: The updated columns with UPDATE must be the same as declared in the FOR UPDATE clause |
Info | Check Working Structure | OPT.COBOL.CheckWorkingStructure | CheckWorkingStructure: WORKING tables must be defined at the end of the WORKING and before the declaration of cursors |
Info | C S I M | OPT.COBOL.COBBP.CSIM | CSIM: Do not use comparison symbols, use the corresponding name instead |
Info | S O C | OPT.COBOL.COBBP.SOC | SOC: A single OPEN / CLOSE per file |
Info | N O Don't use masterpage files | OPT.COBOL.COD_COBOL.NOMP | NOMP: Paragraph names must begin with a user-specified prefix |
Info | N O M S | OPT.COBOL.COD_COBOL.NOMS | NOMS: Procedural section names must follow naming convention |
Info | N P A R | OPT.COBOL.COD_COBOL.NPAR | NPAR: Paragraph names must follow naming convention |
Info | N V W S | OPT.COBOL.COD_COBOL.NVWS | NVWS: The names of the variables and constants of the WORKING-STORAGE must follow the user-specified prefixes |
Info | Cols Should Be Used | OPT.COBOL.ColsShouldBeUsed | ColsShouldBeUsed: All columns declared in the SELECT of a cursor defined WITH ROWSET POSITIONING must be used later in the program |
Info | Control Num Rows | OPT.COBOL.ControlNumRows | ControlNumRows: When use the MULTIROW option, rowset size should never be more than 200 rows |
Info | Count Valid Lines | OPT.COBOL.CountValidLines | CountValidLines: Small programs, with less than a certain number of lines, are recommended |
Info | Cursors At The End Of Working | OPT.COBOL.CursorsAtTheEndOfWorking | CursorsAtTheEndOfWorking: NULL indicator, for SQL, must be PIC S9 (4) COMP |
Info | Display At End | OPT.COBOL.DisplayAtEnd | DisplayAtEnd: Using DISPLAY is only allowed by program end or ABEND |
Info | Do Not Include SQLca Without Db2 | OPT.COBOL.DoNotIncludeSqlcaWithoutDb2 | DoNotIncludeSqlcaWithoutDb2: Exclude SQLCA if no DB2 accesses in the program |
Info | Do Not Use Comp2 | OPT.COBOL.DoNotUseComp2 | DoNotUseComp2: Using COMP-2 is not allowed |
Info | Do Not Use Dclgen At Level01 | OPT.COBOL.DoNotUseDclgenAtLevel01 | DoNotUseDclgenAtLevel01: It is not allowed the use of DCLGEN to Level 01 |
Info | Do Not Use Filler At Level01 | OPT.COBOL.DoNotUseFillerAtLevel01 | DoNotUseFillerAtLevel01: Use of FILLER at level 01 is not recommended |
Info | Do Not Use Linage Clause | OPT.COBOL.DoNotUseLinageClause | DoNotUseLinageClause: Use of clause LINAGE is not allowed |
Info | Do Not Use Many Files | OPT.COBOL.DoNotUseManyFiles | DoNotUseManyFiles: The use of more than 10 files in a program is not allowed |
Info | Do Not Use Select To Check A Row | OPT.COBOL.DoNotUseSelectToCheckARow | DoNotUseSelectToCheckARow: Do not use SELECT / FETCH to verify the existence of a row for later reading or updating |
Info | Do Not Use Static Calls Routines | OPT.COBOL.DoNotUseStaticCallsRoutines | DoNotUseStaticCallsRoutines: Do not make calls to routines statically |
Info | Duplicated Data Access | OPT.COBOL.DuplicatedDataAccess | DuplicatedDataAccess: Duplicated SQL accesses were detected |
Info | B T A | OPT.COBOL.FIA_COBOL.BTA | BTA: Do not use TEST AFTER inside a loop |
Info | C E R M | OPT.COBOL.FIA_COBOL.CERM | CERM: Adjust type and length of source and target in a MOVE statement |
Info | D E C P | OPT.COBOL.FIA_COBOL.DECP | DECP: DECIMAL POINT IS COMMA must be specified |
Info | I I N I | OPT.COBOL.FIA_COBOL.IINI | IINI: Variable initialization with INITIALIZE |
Info | M E R G | OPT.COBOL.FIA_COBOL.MERG | MERG: Avoid MERGE statement |
Info | N OS R | OPT.COBOL.FIA_COBOL.NOSR | NOSR: Use GOBACK instead of STOP RUN |
Info | File Without Filestatus | OPT.COBOL.FileWithoutFilestatus | FileWithoutFilestatus: File definition without FILESTATUS or FILESTATUS bad defined |
Info | Group Open And Close | OPT.COBOL.GroupOpenAndClose | GroupOpenAndClose: Opening and closing files should be grouped in one OPEN and CLOSE |
Info | Incorrect Indicator Defined | OPT.COBOL.IncorrectIndicatorDefined | IncorrectIndicatorDefined: NULL indicator, for SQL, must be PIC S9 (4) COMP |
Info | Initialize Var Level01 | OPT.COBOL.InitializeVarLevel01 | InitializeVarLevel01: Use of INITIALIZE is recommended for variables level 01 |
Info | C I N W | OPT.COBOL.MAN_COBOL.CINW | CINW: Use standard naming for WORKING-STORAGE variables |
Info | C M F D | OPT.COBOL.MAN_COBOL.CMFD | CMFD: Before an FD (file descriptor) it is mandatory to add a comment explaining the file purpose and encoded information |
Info | E D P | OPT.COBOL.MAN_COBOL.EDP | EDP: Avoid program descriptions larger than N lines |
Info | I D O P | OPT.COBOL.MAN_COBOL.IDOP | IDOP: Indent properly instruction operands |
Info | I I T | OPT.COBOL.MAN_COBOL.IIT | IIT: Add a prefix for Cobol tables and a suffix for their indexes |
Info | I R T | OPT.COBOL.MAN_COBOL.IRT | IRT: Naming convention for structured tables and their records |
Info | L F D | OPT.COBOL.MAN_COBOL.LFD | LFD: Leave a blank line between file descriptors (FD) |
Info | L I S E | OPT.COBOL.MAN_COBOL.LISE | LISE: Avoid too long procedural sections |
Info | L P R E | OPT.COBOL.MAN_COBOL.LPRE | LPRE: Paragraph name length should be between certain limits |
Info | L T E R | OPT.COBOL.MAN_COBOL.LTER | LTER: Use capital letters for code |
Info | M N M X | OPT.COBOL.MAN_COBOL.MNMX | MNMX: Use uppercase for code and lowercase for comments |
Info | M S E C | OPT.COBOL.MAN_COBOL.MSEC | MSEC: Avoid programs with too many procedural sections |
Info | N C M A | OPT.COBOL.MAN_COBOL.NCMA | NCMA: Avoid commas for separating parameters in DISPLAY statements |
Info | N C S W | OPT.COBOL.MAN_COBOL.NCSW | NCSW: Avoid nesting EVALUATE too deeply |
Info | N R E G | OPT.COBOL.MAN_COBOL.NREG | NREG: FD records naming convention |
Info | O V W S | OPT.COBOL.MAN_COBOL.OVWS | OVWS: WORKING-STORAGE variables must follow a particular order |
Info | P D E S | OPT.COBOL.MAN_COBOL.PDES | PDES: Document program in code comments before PROGRAM-ID |
Info | P I F | OPT.COBOL.MAN_COBOL.PIF | PIF: Limit the number of sentences in IF or ELSE blocks |
Info | P I N I | OPT.COBOL.MAN_COBOL.PINI | PINI: The first paragraph in PROCEDURE DIVISION must follow a standard name |
Info | P L I N | OPT.COBOL.MAN_COBOL.PLIN | PLIN: PIC clauses should be properly aligned |
Info | P P A R | OPT.COBOL.MAN_COBOL.PPAR | PPAR: Paragraphs must contain an empty end line with a single dot |
Info | P R I D | OPT.COBOL.MAN_COBOL.PRID | PRID: PROGRAM-ID must be the same as the program name (filename, without extension) |
Info | P W E | OPT.COBOL.MAN_COBOL.PWE | PWE: Use PERFORM instead of EVALUATE ... WHEN with many nested lines |
Info | V L I N | OPT.COBOL.MAN_COBOL.VLIN | VLIN: Literals of the VALUE clauses for each level in data declarations should be aligned |
Info | No Optional In File Control | OPT.COBOL.NoOptionalInFileControl | NoOptionalInFileControl: The OPTIONAL clause is not allowed in FILE-CONTROL |
Info | Obligatory End Read | OPT.COBOL.ObligatoryEndRead | ObligatoryEndRead: Each READ must be ended with its corresponding END-READ |
Info | Obligatory End Search | OPT.COBOL.ObligatoryEndSearch | ObligatoryEndSearch: Each SEARCH must be ended with its corresponding END-SEARCH |
Info | B I U S | OPT.COBOL.OYR_COBOL.BIUS | BIUS: Do not use BINARY, COMP or COMP-4 with variables/constants with more than 10 digits |
Info | C D I N | OPT.COBOL.OYR_COBOL.CDIN | CDIN: Always CALL subprograms passing parameters BY REFERENCE |
Info | C O P Y | OPT.COBOL.OYR_COBOL.COPY | COPY: Standard copybooks must be included |
Info | D U P | OPT.COBOL.OYR_COBOL.DUP | DUP: Avoid DISPLAY...UPON CONSOLE |
Info | I N DB | OPT.COBOL.OYR_COBOL.INDB | INDB: Variables used as table indexes must be of type S9(2) COMP or S9(4) COMP |
Info | M C O R | OPT.COBOL.OYR_COBOL.MCOR | MCOR: Avoid CORRESPONDING clause in MOVE, ADD and SUBSTRACT statements |
Info | N C P Y | OPT.COBOL.OYR_COBOL.NCPY | NCPY: Avoid including copybooks not present in a standard set |
Info | N D I S | OPT.COBOL.OYR_COBOL.NDIS | NDIS: Avoid arithmetic operations on DISPLAY variables |
Info | N N S | OPT.COBOL.OYR_COBOL.NNS | NNS: Avoid usage of NEXT SENTENCE |
Info | N O R E | OPT.COBOL.OYR_COBOL.NORE | NORE: Do not use RELEASE |
Info | Ocurrences Table Elements | OPT.COBOL.OYR_COBOL.OcurrencesTableElements | OcurrencesTableElements: Optimize access to table elements |
Info | P A R N | OPT.COBOL.OYR_COBOL.PARN | PARN: Avoid routines with too many parameters |
Info | P D I M | OPT.COBOL.OYR_COBOL.PDIM | PDIM: With PACKED-DECIMAL / COMP-3, use less than 16 digits, and even (for signed) or odd (for unsigned) digits |
Info | S I B Y | OPT.COBOL.OYR_COBOL.SIBY | SIBY: Use SYNCHRONIZED with binary (BINARY,COMP,COMP-4 and COMP-5) fields |
Info | S O R T | OPT.COBOL.OYR_COBOL.SORT | SORT: Avoid SORT statement |
Info | T I M E | OPT.COBOL.OYR_COBOL.TIME | TIME: Access only once to system variables DATE, DAY, DAY-OF-WEEK, TIME, CENTURY-DATE, CENTURY-DAY, CURRENT-DATE |
Info | Perform Times With Memory Tables | OPT.COBOL.PerformTimesWithMemoryTables | PerformTimesWithMemoryTables: Using PERFORM N TIMES is only allowed with in-memory tables |
Info | Perform Thru With Exit | OPT.COBOL.PerformThruWithExit | PerformThruWithExit: Each PERFORM THRU must have its corresponding paragrah with EXIT |
Info | A P I C | OPT.COBOL.RG_COBOL.APIC | APIC: Use parenthesis in PIC clauses instead of repeated XX, AA or 99 |
Info | C L A U | OPT.COBOL.RG_COBOL.CLAU | CLAU: Do not include deprecated paragraphs in IDENTIFICATION DIVISION (like DATE-COMPILED, DATE-WRITTEN, INSTALLATION, AUTHOR, SECURITY) |
Info | C P I C | OPT.COBOL.RG_COBOL.CPIC | CPIC: Use PIC instead of PICTURE |
Info | F N F | OPT.COBOL.RG_COBOL.FNF | FNF: Use a specific level and data name for the first entry in WORKING-STORAGE SECTION |
Info | I N B Y | OPT.COBOL.RG_COBOL.INBY | INBY: Use INDEXED BY clause with Cobol tables (fields with OCCURS) |
Info | M V D | OPT.COBOL.RG_COBOL.MVD | MVD: Do not use MOVE with constant literals, use a named constant field instead |
Info | N77 | OPT.COBOL.RG_COBOL.N77 | N77: Do not use 77 levels |
Info | N I | OPT.COBOL.RG_COBOL.NI | NI: Use odd levels for data entries in WORKING-STORAGE SECTION |
Info | N L P | OPT.COBOL.RG_COBOL.NLP | NLP: Do not use literals in PROCEDURE DIVISION sentences |
Info | N N IV | OPT.COBOL.RG_COBOL.NNIV | NNIV: In DATA DIVISION, all data entry levels should be 01 or multiple of 5 |
Info | N P N T | OPT.COBOL.RG_COBOL.NPNT | NPNT: Do not write dots in sentences that do not require them |
Info | N T H N | OPT.COBOL.RG_COBOL.NTHN | NTHN: Do not use THEN in an IF sentence |
Info | Section End Doesnt Exist | OPT.COBOL.SectionEndDoesntExist | SectionEndDoesntExist: Section end does not exist |
Info | SQL Statements Not Executed | OPT.COBOL.SqlStatementsNotExecuted | SqlStatementsNotExecuted: Existence of SQL statements that are not executed |
Info | Too Much Call | OPT.COBOL.TooMuchCall | TooMuchCall: Exceeded the maximum allowed number of calls to routines |
Info | Use Index Field To Check A Row | OPT.COBOL.UseIndexFieldToCheckARow | UseIndexFieldToCheckARow: If you need to know whether there is a row, search it selecting a field that is index |
Info | Use Varying Only With Tables | OPT.COBOL.UseVaryingOnlyWithTables | UseVaryingOnlyWithTables: Using PERFORM VARYING is only allowed with inmemory tables |
Info | Avoid Non Qualified Joins | OPT.COBOL.SQL_COBOL.AvoidNonQualifiedJoins | AvoidNonQualifiedJoins: Make the type of join explicit |
Info | Cobol Password In Comment | OPT.COBOL.SEC.Cobol_PasswordInComment | Cobol_PasswordInComment: Avoid placing passwords and other sensitive info in code comments |
Info | Cobol Privacy Violation | OPT.COBOL.SEC.Cobol_PrivacyViolation | Cobol_PrivacyViolation: Exposure of Private Information ('Privacy Violation') |
Low | Access In Loop More Than One Index | OPT.COBOL.AccessInLoopMoreThanOneIndex | AccessInLoopMoreThanOneIndex: Access detected in a loop which use more than one index to resolve the access to a table (no. pages > |
Low | Access In Loop Without Index | OPT.COBOL.AccessInLoopWithoutIndex | AccessInLoopWithoutIndex: Access detected in a loop in which there are not informed index fields in a table WHERE (no. pages > |
Low | Avoid Select With Low Conditions | OPT.COBOL.AvoidSelectWithLowConditions | AvoidSelectWithLowConditions: Avoid using 'SELECT function' with low discriminity conditions in WHERE clause |
Low | Avoid Access Not Indexed Table Medium | OPT.COBOL.AvoidAccessNotIndexedTableMedium | AvoidAccessNotIndexedTableMedium: Detected an access to a table size medium (7 < no. pages < 10.000) in which the first index fields or DB2 can not use them are not reported |
Low | Avoid Access Without Index Medium | OPT.COBOL.AvoidAccessWithoutIndexMedium | AvoidAccessWithoutIndexMedium: Access is detected in which there is no index fields in the WHERE informed on a medium size table (7 < no. pages < 10.000) |
Low | Avoid Big Tables | OPT.COBOL.AvoidBigTables | AvoidBigTables: Definition of a table in LINKAGE or WORKING with a very large size or too many elements |
Low | Avoid Bulk Updates In A Sentence | OPT.COBOL.AvoidBulkUpdatesInASentence | AvoidBulkUpdatesInASentence: It is not allowed bulk updates using a SQL statement |
Low | Avoid Cancel | OPT.COBOL.AvoidCancel | AvoidCancel: Using clause CANCEL is not allowed |
Low | Avoid On Size Error | OPT.COBOL.AvoidOnSizeError | AvoidOnSizeError: Do not use ON SIZE ERROR |
Low | Avoid Select Ast Check Rows | OPT.COBOL.AvoidSelectAstCheckRows | AvoidSelectAstCheckRows: Do not use SELECT COUNT(*) to verify the existence of rows |
Low | Avoid Sentence Acording Size Table Medium | OPT.COBOL.AvoidSentenceAcordingSizeTableMedium | AvoidSentenceAcordingSizeTableMedium: Detected a sentence with a medium sized table (7 < no. pages < 10.000) that uses more than one index to resolve access |
Low | Avoid Sentence Acording Size Table Big | OPT.COBOL.AvoidSentenceAcordingSizeTableBig | AvoidSentenceAcordingSizeTableBig: Detected a sentece with a big table(No. pages > {} |
Low | Check Cursor Instead Of Statements | OPT.COBOL.CheckCursorInsteadOfStatements | CheckCursorInsteadOfStatements: Use CURSOR FOR UPDATE instead SELECT and UPDATE/DELETE |
Low | Check Cursor Positionning Fetch | OPT.COBOL.CheckCursorPositionningFetch | CheckCursorPositionningFetch: If a cursor is defined WITH ROWSET POSITIONING, the FETCH for that cursor must be defined with the NEXT ROWSET clause and viceversa |
Low | Check Deq After Enq | OPT.COBOL.CheckDeqAfterEnq | CheckDeqAfterEnq: When the ENQ command is used it must issue the DEQ command as soon as possible |
Low | Check Func Columns | OPT.COBOL.CheckFuncColumns | CheckFuncColumns: It is not allowed to use functions on columns in the WHERE clause of SQL statements |
Low | Check Func Host Vars In Where | OPT.COBOL.CheckFuncHostVarsInWhere | CheckFuncHostVarsInWhere: It is not allowed to use functions on HOST variables in the WHERE clause of SQL statements |
Low | Check Low Volume Tables Very Accessed | OPT.COBOL.CheckLowVolumeTablesVeryAccessed | CheckLowVolumeTablesVeryAccessed: DB2 tables of low volume and very accessed must be copied in WORKING at the beginning of the program execution |
Low | Check Order Sentences | OPT.COBOL.CheckOrderSentences | CheckOrderSentences: The statement triggers a process management DB2 expensive due to the high number of selected rows |
Low | Check Return In Cics | OPT.COBOL.CheckReturnInCics | CheckReturnInCics: Always check the return code of CICS statements to avoid ABENDs in transactions |
Low | Check Search At End | OPT.COBOL.CheckSearchAtEnd | CheckSearchAtEnd: In the SEARCH statement, use the AT END clause |
Low | Check Vars To Read | OPT.COBOL.CheckVarsToRead | CheckVarsToRead: Do not use in READ the file record, or a WORKING variable smaller than the file record. |
Low | Check Vars To Write | OPT.COBOL.CheckVarsToWrite | CheckVarsToWrite: Do not use in WRITE the file record, or a WORKING variable greater than the record size. |
Low | Check Where Like | OPT.COBOL.CheckWhereLike | CheckWhereLike: Avoid using LIKE '%' and LIKE '_' |
Low | Check Write Stmnt | OPT.COBOL.CheckWriteStmnt | CheckWriteStmnt: Do not use AFTER or BEFORE in WRITE operation |
Low | IP L | OPT.COBOL.COBBP.IPL | IPL: One statement per line |
Low | P V A C | OPT.COBOL.COBBP.PVAC | PVAC: Avoid empty paragraphs |
Low | C I N | OPT.COBOL.COD_COBOL.CIN | CIN: Called subprogram name should follow naming convention |
Low | Data Division | OPT.COBOL.COD_COBOL.DataDivision | DataDivision: There are data definitions outside DATA DIVISION |
Low | Working Storage Var Names | OPT.COBOL.COD_COBOL.WorkingStorageVarNames | WorkingStorageVarNames: WORKING STORAGE variables and constants name format |
Low | Type Time | OPT.COBOL.COD_COBOL.TypeTime | TypeTime: TIMESTAMP and TIME variables format |
Low | Do Not Open In Bucle | OPT.COBOL.DoNotOpenInBucle | DoNotOpenInBucle: Avoid multiple Open/Close for the same file in the program |
Low | Do Not Repeat Access | OPT.COBOL.DoNotRepeatAccess | DoNotRepeatAccess: Recover data from a table using a single access to it |
Low | Do Not Use Return Code | OPT.COBOL.DoNotUseReturnCode | DoNotUseReturnCode: Not allowed to use the RETURN-CODE variable |
Low | Do Not Use Rewrite In Sequential | OPT.COBOL.DoNotUseRewriteInSequential | DoNotUseRewriteInSequential: You are not allowed to use REWRITE on sequential files |
Low | C B U C | OPT.COBOL.FIA_COBOL.CBUC | CBUC: Do not use equal as end-loop condition |
Low | C F D | OPT.COBOL.MAN_COBOL.CFD | CFD: Use COPYs for file/sort record definitions |
Low | F L C B | OPT.COBOL.MAN_COBOL.FLCB | FLCB: Separate paragraphs with empty comments |
Low | I A I D | OPT.COBOL.MAN_COBOL.IAID | IAID: Include AUTHOR field in Division Identification |
Low | I I E | OPT.COBOL.MAN_COBOL.IIE | IIE: Avoid incorrect ELSE indentation |
Low | I I I | OPT.COBOL.MAN_COBOL.III | III: Use correct indentation within IF statements |
Low | I I R | OPT.COBOL.MAN_COBOL.IIR | IIR: Indent READ statements properly |
Low | I I R W | OPT.COBOL.MAN_COBOL.IIRW | IIRW: Indent REWRITE statements properly |
Low | I I W | OPT.COBOL.MAN_COBOL.IIW | IIW: Indent WRITE sentences properly |
Low | N C F D | OPT.COBOL.MAN_COBOL.NCFD | NCFD: Do not use COPYs for file/sort descriptors |
Low | Register Validation With Select | OPT.COBOL.RegisterValidationWithSelect | RegisterValidationWithSelect: Validating if a record exists by SELECT |
Low | W D | OPT.COBOL.RG_COBOL.WD | WD: Working-storage section definitions order |
Low | Avoid Insert Without Fields Specification | OPT.COBOL.SQL_COBOL.AvoidInsertWithoutFieldsSpecification | AvoidInsertWithoutFieldsSpecification: Every INSERT statement must include the field specification (i.e : INSERT INTO table(column1,column2) VALUES (value1,value2)) |
Low | Avoid Qualified Tables In Queries | OPT.COBOL.SQL_COBOL.AvoidQualifiedTablesInQueries | AvoidQualifiedTablesInQueries: Table names should not be qualified in queries |
Low | Qualified Tables In Queries | OPT.COBOL.SQL_COBOL.QualifiedTablesInQueries | QualifiedTablesInQueries: Every table referenced in the query must be qualified |
Low | Use Search All | OPT.COBOL.UseSearchAll | UseSearchAll: For seeking in tables WORKING with more than 50 elements use the SEARCH ALL statement |
Medium | Close Statements With Nested Body | OPT.COBOL.COBBP.CloseStatementsWithNestedBody | CloseStatementsWithNestedBody: Close statements that may include code blocks with explicit END delimiter |
Medium | To End Paragraph | OPT.COBOL.COBBP.ToEndParagraph | ToEndParagraph: Check that top-level paragraphs have an exit paragraph |
Medium | Avoid Arithmetic Operations In If | OPT.COBOL.FIA_COBOL.AvoidArithmeticOperationsInIf | AvoidArithmeticOperationsInIf: Check that there are no arithmetic operations in the condition for IF statements |
Medium | Obligatory End Evaluate | OPT.COBOL.FIA_COBOL.ObligatoryEndEvaluate | ObligatoryEndEvaluate: Check that every EVALUATE is closed by an END-EVALUATE |
Medium | Avoid Explicit Data In Linkage | OPT.COBOL.MAN_COBOL.AvoidExplicitDataInLinkage | AvoidExplicitDataInLinkage: LINKAGE SECTION should not contain explicit data description entries |
Medium | Avoid Procedural Copybook | OPT.COBOL.MAN_COBOL.AvoidProceduralCopybook | AvoidProceduralCopybook: Avoid including copybooks to share procedural code |
Medium | Avoid Too Deep Perform Chains | OPT.COBOL.MAN_COBOL.AvoidTooDeepPerformChains | AvoidTooDeepPerformChains: Avoid too deep PERFORM chains |
Medium | C C A L | OPT.COBOL.MAN_COBOL.CCAL | CCAL: Document all program calls immediatly before the call |
Medium | Copy Book With Data Or Procedures | OPT.COBOL.MAN_COBOL.CopyBookWithDataOrProcedures | CopyBookWithDataOrProcedures: Copybooks should contain data definitions or procedural code only |
Medium | H I C E | OPT.COBOL.MAN_COBOL.HICE | HICE: Avoid programs with too many GOTO |
Medium | I N01 | OPT.COBOL.MAN_COBOL.IN01 | IN01: Comment any top-level variable (level 01) |
Medium | N A M I N G P R O G R A M I D | OPT.COBOL.MAN_COBOL.NAMINGPROGRAMID | NAMINGPROGRAMID: Program name must follow a naming standard |
Medium | P I C | OPT.COBOL.MAN_COBOL.PIC | PIC: Program name variables in CALL statements must follow naming convention |
Medium | Reference Modifier | OPT.COBOL.OYR_COBOL.ReferenceModifier | ReferenceModifier: Position and length variables in VAR(position:length) should have short binary types |
Medium | V O D T | OPT.COBOL.OYR_COBOL.VODT | VODT: Do not perform arithmetic operations on variables of different types |
Medium | C W S V | OPT.COBOL.RG_COBOL.CWSV | CWSV: Avoid entries in WORKING-STORAGE SECTION without initial value |
Medium | D P I C | OPT.COBOL.RG_COBOL.DPIC | DPIC: Include DECIMAL-POINT IS COMMA when there is at least one edited field or constant decimal in the programme |
Medium | I F W | OPT.COBOL.RG_COBOL.IFW | IFW: Convention for working end and beginning |
Medium | N E P | OPT.COBOL.RG_COBOL.NEP | NEP: Do not use EXIT |
Medium | Cobol System Information Leak | OPT.COBOL.SEC.Cobol_SystemInformationLeak | Cobol_SystemInformationLeak: Avoid dumping system info (typically for debugging) in production code |
Medium | Poor Error Handling | OPT.COBOL.SEC.PoorErrorHandling | PoorErrorHandling: Ignoring error conditions may allow an attacker to induce unexpected behavior unnoticed |
Medium | Avoid Natural Joins | OPT.COBOL.SQL_COBOL.AvoidNaturalJoins | AvoidNaturalJoins: NATURAL JOINs are buggy and unmaintenable |
Medium | Avoid Select Asterisk | OPT.COBOL.SQL_COBOL.AvoidSelectAsterisk | AvoidSelectAsterisk: Do not use SELECT * |
Medium | Prefer On Over Using | OPT.COBOL.SQL_COBOL.PreferOnOverUsing | PreferOnOverUsing: Replace Using clause for its equivalent On counterpart |
Medium | Detect Implicit Joins | OPT.COBOL.SQL_COBOL.DetectImplicitJoins | DetectImplicitJoins: Never use implicit JOINS |
Medium | Avoid Too Many Joins | OPT.COBOL.SQL_COBOL.AvoidTooManyJoins | AvoidTooManyJoins: Avoid queries with too many JOINs |
Medium | Avoid Queries On Many Tables | OPT.COBOL.SQL_COBOL.AvoidQueriesOnManyTables | AvoidQueriesOnManyTables: Avoid JOIN queries referencing too many tables |
Medium | Avoid Nested Selects | OPT.COBOL.SQL_COBOL.AvoidNestedSelects | AvoidNestedSelects: Avoid nested selects |
Medium | Cobol Password With Weak Crypto | OPT.COBOL.SEC.Cobol_PasswordWithWeakCrypto | Cobol_PasswordWithWeakCrypto: Weak Cryptography for Passwords |