Category: Cobol

Cobol-DB2 Cursor Overview

Db2-Cursor: Cursors in the application program are used to retrieve the multiple rows and process them one by one . Generally by using a singleton select statement in the application program, it is possible to retrieve only one row at a time as the host variable structure allows keeping one value at a time. Ex:

COBOL Renames Clause with Examples

COBOL Renames clause is used to regroup the elementary data items and gives them an alternative name. This is a logical grouping of the elementary data items which are defined in a sequential order.It is useful for renaming by overlapping elementary elements.66 Level number is used for defining it. ex: 01 WW-VAR1. 05 WW-V1 PIC

COBOL Arrays or Tables

Single dimensional arrays: Arrays are data structures that are used to simplify coding and improve processing efficiency. The primary uses of arrays are to define:  a series of similarly formatted input or output record fields in the FILE SECTION  a group of accumulators in WORKING-STORAGE for different categories of totals  a table in WORKING-STORAGE that


STRING AND UNSTRING with examples: TALLYING and COUNT options String is used to combine two or more strings/variables in to a single string. Examples: 01 name-in. 05 first-name pic x(10) value 'Mahender ' 05 Last name pic x(10) value 'Reddy ' 05 initial pic x(2) value 'G ' If you display the ‘name-in’ it shows