Category: Cobol

Continue and Next Sentence in COBOL

Continue and Next Sentence in COBOL are No Operation statements which does nothing except to pass control to the statement after the scope terminators. But the difference is the place that it passes the control to. CONTINUE: Continue gives the control after the next explicit scope terminator. Explicit Scope terminators are END-IF, END-PERFORM, END-EVALUATE, etc.

DB2 Equivalent COBOL Data Types

As DB2/SQL and COBOL field declarations are different, It is important to have Equivalanet COBOL data types to the corresponding DB2 table columns in COBOL programs to process the data correctly. More importantly, the precompiler uses the equivalent SQL data types for the declared Host variables. So if the host variable declaration is not correct,

COBOL DISPLAY Statement

COBOL DISPLAY Statement is used to Display the data on Output device. This is a procedure division statement and very useful to get the required data on output device. Syntax: DISPLAY identifier/Literal Identifier is any declared variable of the program. Literal is any text string or figurative constants like ZEROES, SPACES, QUOTES, HIGH-VALUES, LOW-VALUES. Example  for

Multi Dimensional Arrays in COBOL

Multi dimensional arrays in COBOL are supported and it is possible to have up to 7 dimensions which is its MAX limit. But more than two dimension array creates confusion.So in general two dimensional arrays and Single dimensional arrays are used mostly. Let us see how to declare and process multi dimensional arrays in COBOL.

COBOL 77 Level Number Uses

77 Level Number Uses, significance:77 is a special Level number in COBOL which is used to declare the Individual Elementary data items. Of course, Individual elementary data items can be declared using 01 level but 77 declared fields does not allow any sub ordinate data field declarations. These have been very useful in earlier versions

COBOL Stop Run, GO Back and Exit Program

STOP Run Vs GOBACK  Vs Exit Program in COBOL: Stop Run, Go Back and Exit statements are to give control back from the program (in which these are coded as a last statement) to where this program is being called.  All works in the same by giving the control back but one gives it to OS where

COBOL Accept Statement

COBOL ACCEPT Statement: Accept statement in COBOL with examples – It is used to receive the data that has been sent from outside of that program. Data can be sent from any Terminal or from JCL or from system defined items like date functions. ACCEPTING multiple records from input is also possible. Accepting Data from

COBOL 88 level number with Examples

COBOL 88 Level Number or Condition Names  88 level number in COBOL is one of the most used declarations in mainframes development and it is considered as a special level number which is used to improve the readability of COBOL programs. As it gives a name to a condition, it is also called as ‘Condition

Important COBOL compiler options

Important Cobol Compiler Options SSRANGE, APOST, RENT, OFFSET, LIST COBOL programs which are coded are called Source module that are not executable. Source code goes thru a process called Compilation that produces object module or Load Module which is an executable code format. These Load modules are stored in a Load Library and are made