Cobol Archive

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: [crayon-5da6ad5bc9152015992285/] 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 Identifier 

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

COBOL date functions list, add find Duration

Below are COBOL date functions to add, Subtract and Find the duration between Dates, Times and Time stamps. 1. ADD-DURATION This is rarely seen in our programs but really a helpful Intrinsic function that COBOL provided. This is to add a specific duration to a date/time variable/value. For example if 1 year needs to be

COBOL Edited Picture Clause Examples

Edited Picture Clause in COBOL is to format the the display of data in required format. COBOL provides symbols to format the data, these are called “Edit Symbols” and the PIC clauses that contains these symbols are called as “Edited Picture clauses”. There are basically two types of Edited picture clauses based on their type

Initialization in Cobol

Initialization in COBOL is used to set the declared variable values to an initial value. It sets the Alphanumeric type(alphabetic, alphanumeric, alphanumeric-edited, DBCS, national, or national-edited) field values to Spaces and Numeric type(numeric or numeric-edited) field values to Zeroes. It is equivalent of moving eirther zeroes are spaces to the variables according to their data