Author: admin

  • File Handling Verbs

    File handling verbs are used to perform various operations on files. Following are the file handling verbs − Open Verb Open is the first file operation that must be performed. If Open is successful, then only further operations are possible on a file. Only after opening a file, the variables in the file structure are…

  • File Access Mode

    Till now, file organization schemes have been discussed. For each file organization scheme, different access modes can be used. Following are the types of file access modes − The syntaxes in this module, mentioned along with their respective terms, only refer to their usage in the program. The complete programs using these syntaxes would be…

  • File Organization

    File organization indicates how the records are organized in a file. There are different types of organizations for files so as to increase their efficiency of accessing the records. Following are the types of file organization schemes − The syntaxes in this module, mentioned along with their respective terms, only refer to their usage in…

  • File Handling

    The concept of files in COBOL is different from that in C/C++. While learning the basics of ‘File’ in COBOL, the concepts of both languages should not be corelated. Simple text files cannot be used in COBOL, instead PS (Physical Sequential) and VSAM files are used. PS files will be discussed in this module. To understand file handling in…

  • Table Processing

    Arrays in COBOL are known as tables. An array is a linear data structure and is a collection of individual data items of same type. Data items of a table are internally sorted. Table Declaration Table is declared in Data Division. Occurs clause is used to define a table. Occurs clause indicates the repetition of data name…

  • String Handling

    String handling statements in COBOL are used to do multiple functional operations on strings. Following are the string handling statements − Inspect Inspect verb is used to count or replace the characters in a string. String operations can be performed on alphanumeric, numeric, or alphabetic values. Inspect operations are performed from left to right. The…

  • Loop Statements

    There are some tasks that need to be done over and over again like reading each record of a file till its end. The loop statements used in COBOL are − Perform Thru Perform Thru is used to execute a series of paragraph by giving the first and last paragraph names in the sequence. After…

  • Conditional Statements

    Conditional statements are used to change the execution flow depending on certain conditions specified by the programmer. Conditional statements will always evaluate to true or false. Conditions are used in IF, Evaluate, and Perform statements. The different types of conditions are as follows − IF Condition Statement IF statement checks for conditions. If a condition…

  • Data Layout

    COBOL layout is the description of use of each field and the values present in it. Following are the data description entries used in COBOL − Redefines Clause Redefines clause is used to define a storage with different data description. If one or more data items are not used simultaneously, then the same storage can…

  • Data Types

    Data Division is used to define the variables used in a program. To describe data in COBOL, one must understand the following terms − Data Name Data names must be defined in the Data Division before using them in the Procedure Division. They must have a user-defined name; reserved words cannot be used. Data names…