Cobol Tutorial

 
 
 

Basic Programming

Print account report Use of Sign clause Create attendence sheet Displays on printer - divide operation quotient Binary search on student name, print roll number job appl checking candidate is eligible or not Read data from input file and move to output file

Mathematical Program

Print bill report Purchase and rebate amount payslip Example of string and unstring Describe Functionality of two dimension table Insert, delete, update, view in index file Display the pattern of square School management system Converting integer to its number of words Use of move clause for numeric values Use multiple array Inventory transactions Sort records of file Displays alphanumeric char on screen graphic mode Student details using relative file

Sorting Programs

Store content in file,record of field - other file Calculate Total percentage Classfor each student Edit character Display pattern of numbers in reverse pattern User input data and stores it in to the file Multiplication table Generate sales register Draw a line Use of Tables with INPUT clause Check student is pass or fail i/p result from user Calculate monthly sales amount -sequential access Sescribes how to use Sort technique Declares data to the compiler Input record into file using extend mode

Clause

Describe Functionality of Relative File Print addition of two nos and sum is third or not Use of perform verbs Bank Report depending upon user choice Create result statement for given semester Search name from file display roll no of student Generating julian date Evaluates arithmetic expression - stores result Use of evaluate clause Describe use of IF CONDITION and PRINT Calculate Total percentage Class for each student Displays alphanumeric character in graphics mode Reads in states until end of data Read student details from file - read operation Print presence report based on provided data Use of Inspect clause Check entered date is valid birth date or not Draws rectangle filled with one color Search perticular record Find age from accepted date from user Merge 2 files with students records

File Programs

Check two same condition name is allow or not Arithmetic operations add,sub,div and mul Display on Console a message entered by user Display message entered by user on console Generate student mark sheet using file r/w op Check if a number is a fibonacci or not Print mark sheet of a student with grades Use of Redefine clause Create marksheet of student Use of leading and trailing Sequential search Class condition Student detail management using indexed file

Search Programs

Enter value is alphabetic,numeric,alphanumeric Find yearly depreciation Unstring word Find smallest quotation for given item Write records reside in i/p file- show on screen Sum of series 1 + 1/4 + 1/9 Using sign test for numeric value Draw polygon Use of EVALUATE clause Count number of char Date manipulation Bubble sort DOS standard o/p device Create the index file

String Programs

Includes external source file in current file Gross salary, deduction, net salary of employee Count character for no of times in input string Display triangle of numbers FILE Read Operation Add two numbers Generate sales report item wise Divides one or more operands by another IF-ELSE Clause Group wise stock summary Attendence Report of Employees SORTING Operation Add 2 or more operands and stores result Relative file - insertion,deletion,updation, print Describe Functionality of table by using File Fahrenheit into temperature - C = (5/9) * (f - 32) Use of Control Break clause Print employee detail Draws an ellipse or a circle Binary search using files Generating date and time

General Programs

Evaluate gender from user and print Display input number is prime or not Display on printer message entered by user Displays message entered by user on printer Merging two files in a single file Generate arithmetic operation - evaluate clause
 
 
       Identification Division.
       Program-Id. Quotations.
       Environment Division.
       Input-output section.
       File-control.
           Select Infile assign to disk
             Organization is line sequential.
           Select outfile1 assign to disk
             Organization is line sequential.
           Select outfile2 assign to disk
             Organization is line sequential.
           Select sortfile assign to disk.
       Data Division.
       File Section.
       Fd infile 
           Label records are standard
             Value of File-id is \"Ass11.dat\".
       01  in-rec.
           02 Filler pic xx.
           02 Icode pic x(5).
           02 Filler pic xx.
           02 SupName pic x(20).
           02 Filler pic xx.
           02 Price pic 9(4)v99.
       Fd outfile1
           Label Records are standard
             Value of File-id is \"ass11.srt\".
       01  Out1-rec.
           02 Filler pic xx.
           02 Icode pic x(5).
           02 Filler pic xx.
           02 Supname pic x(20).
           02 Filler pic xx.
           02 Price pic 9(4)v99.
       Fd outfile2
           Label records are standard
             Value of File-Id is \"ass11.res\".
       01  Out-rec.
           02 Filler pic xx.
           02 Icode pic x(5).
           02 Filler pic xx.
           02 Supname pic x(20).
           02 Filler pic xx.
           02 Price pic zzz9.99.
       SD sortfile.
       01 sort-rec.
           02 Filler pic xx.
           02 Icode pic x(5).
           02 Filler pic xx.
           02 Supname pic x(20).
           02 Filler pic xx.
           02 Price pic 9(4)v99.
       Working-Storage Section.
       01  Head pic x(38) Value all spaces.
       01  Head1 pic x(38) Value all \"~\".
       01  Head2 pic x(38) Value \"   List of all the Quotations\".
       01  Head3.
           02 Filler pic x(7) Value \"  Item\".
           02 Filler pic x(22) Value \"     Supplier Name\".
           02 Filler pic x(9) Value \"   Price\".
       01  Temp-rec.
           02 Filler pic xx.
           02 Icode pic x(5).
           02 Filler pic xx.
           02 Supname pic x(20).
           02 Filler pic xx.
           02 Price pic 9(4)v99.
       77  EOF pic x value \"N\".
       77  n pic 99 value 1.
       Procedure division.
       Main-Para.
           Sort sortfile on Ascending Key Icode of Sort-rec 
               Ascending Key Price of Sort-rec Using infile giving
               outfile1.
           Open input outfile1
                output outfile2.
           Read outfile1 at End Move \"Y\" to EOF.
           Write out-rec from Head.
           Write out-rec from Head2.
           Write out-rec from Head.
           Write out-rec from Head1.
           Write out-rec from Head3.
           Write out-rec from Head1.
           Move spaces to out-rec.
           Perform Process-para until EOF = \"Y\".
           Write out-rec from Head1.
           Move \"The total No. of quotations received\" to out-rec.
           Write out-rec.
           Move spaces to out-rec.
           Move n to price of out-rec.
           Write out-rec.
           Close outfile1 outfile2.
           Stop Run.
       Process-para.
            Compute n = n + 1.
            If (Icode of out1-rec not = Icode of temp-rec)
                Move corr out1-rec to out-rec
                write out-rec.
            Move out1-rec to temp-rec.
            Read outfile1 at end move \"Y\" to EOF.

    Related Post:
  1. Program that Displays one or more data on the DOS standard output device

  2. Find the yearly Depreciation. Yearly Depreciation = (Cost - Scap Value) / Years of life.Output file should contain no name no of year and depreciated

  3. Program to generate arithmetic operation by using evaluate clause

  4. Calculate Total percentage Class (Dist , First) for each student and output file should contain Each information and also display no, name, percentage

  5. Evaluates an arithmetic expression and stores the result

  6. Program to calculate gross salary, deduction, net salary of an employee

  7. PROGRAM TO CHECK WHETHER THE TWO SAME CONDITION NAME IS ALLOW OR NOT

  8. Program of purchase and rebate amount payslip

  9. PROGRAM TO DISPLAY TRIANGLE OF NUMBERS

  10. Program to print addition of two numbers and print if summation is equal to third number or not

  11. Program that illustrates the Use of Control Break

  12. PROGRAM FOR READ SALES DATA FROM INPUT-FILE AND MOVE INTO OUTPUT-FILE

  13. programs uses two input files and produces output using binary search on criteria fields

  14. PROGRAM WHICH SEARCH THE NAME FROM THE FILE AND DISPLAY THE CORRESPONDING ROLL NO OF THE STUDENT

  15. Program of job appl checking candidate is eligible if he / she is was born before 1960 ,is graduate 5 years of experience, is post graduate few expr

  16. Program that Draws a rectangle filled with one color

  17. Program for using sign test for numeric value

  18. PROGRAM TO USE REDEFINE CLAUSE

  19. Program describes how to use Sort technique

  20. Program to find the smallest quotation for the given item

 
 
Didn't find what you were looking for? Find more on Program to find the smallest quotation for the given item