Program for screen section with files, COBOL Programming

Assignment Help:

PROGRAM FOR SCREEN SECTION WITH FILES:

identification division.

  program- id.

  environment division.

         input-output section.

  file-control.

    select stu- file assign to disk

    file status is fs.

  data division.

  file section.

  fd stu- file

    label records are standard

    value of file- id is 'stu.dat'.

  01 stu-rec.

     02   name  pic x(20).

           02   mark  pic 9(3).

  working-storage section.

          01   ans  pic  x value space.

  01   eof  pic  x value space.

  01   fs   pic  x(2) value spaces.

  screen section.

          01 get-screen.

              02   line 3 column 5 value "Name : ".

       02   line 3 column 15   pic x(5)

                          to  name auto bell reverse-video.

              02   line 5 column 5 value "Mark : ".

       02   line 5 column 15  pic 9(3) to mark bell blink.

              02   line 7 column 5 value "Continue [y/n] : ".

       02   column  plus 3  pic x to ans  bell blink.

    01 b-screen.

              02  blank screen.

          01 put-screen.

              02   line 3 column 25 value "Name : " highlight.

       02   column plus 2 pic x(20) from name blink.

              02   line 5 column 25 value "Mark : "  blink.

              02   column plus 2 pic 9(3) from mark underline.

        procedure division.

  p-1.

        display b-screen.

        open output stu-file.

        display " File Staus Value  ... Exhibit ... display..".

        exhibit fs.

        display fs.

        display " Press a Key!".

        accept ans.

                  perform g-w-para until ans = 'n'.

        close stu-file.

 

        move space to ans.

        open input stu-file.

        read stu- file at end move 'y' to eof.

                  perform disp-para until eof  = 'y'.

        close stu-file.

        stop run.

        g-w-para.

        display b-screen.

        display get-screen.

        accept get-screen.

        write stu-rec.

        disp-para.     

        display (1 1) erase.

                  display put-screen.

        display (15 5) "Press any Key ! ".

        accept ans.

        read stu- file at end move 'y' to eof.


Related Discussions:- Program for screen section with files

Start statement - indexed files, START STATEMENT: The START statement ...

START STATEMENT: The START statement places the files to the initial logical record whose record key satisfies the condition specified by the KEY phrase. The access mode shoul

Program for size error , PROGRAM FOR SIZE ERROR:   We have to write a...

PROGRAM FOR SIZE ERROR:   We have to write an easy program to elaborate the size error option. Identification division. Program- id. sizeerr. Environment division.

Sign condition - cobol programming, SIGN CONDITION:   The sign condit...

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

Direct organization, Direct Organization: Besides the relative or inde...

Direct Organization: Besides the relative or indexed organization, also a direct access file can be designed to have what is termed as direct organization.  In this organizati

Point location - picture clause, Point Location: The position of the d...

Point Location: The position of the decimal point is the other characteristic which can be specified in the case of the numeric data items. If the position is not specified, t

Structure of a cobol program, Structure of a COBOL Program: Every COBO...

Structure of a COBOL Program: Every COBOL program should have the 4 divisions in the order in which they are specified below: 1. Identification division 2. Environment D

File-control paragraph for the relative files, FILE-CONTROL paragraph for t...

FILE-CONTROL paragraph for the relative files: The normal format for the SELECT clause for a relative file is as shown below. SELECT  file-name  ASSIGN  TO  implementor-nam

Program for add corresponding, PROGRAM FOR ADD CORRESPONDING: We have ...

PROGRAM FOR ADD CORRESPONDING: We have to write a simple program to demonstrate Add Corresponding.   identification division.   program- id.   environment division.

Kirat da satikar, bal majduri ik kanuni apradh hai is de bavjud bache ,ghra...

bal majduri ik kanuni apradh hai is de bavjud bache ,ghra,hotla,road, kam karn lai majbur han bacheya te mapeya nu parhai val prerit karn lai ik bashan teyar kro

Selection of file organization, Selection of file Organization: While ...

Selection of file Organization: While designing a file, the programmer should select an appropriate association for a file. The order in which the choice is to be made is as s

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd