Record description for the variable-length records, COBOL Programming

Record Description for the Variable-length Records:

When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 following the FD entry for the file. The variable part is defined with the OCCURS...DEPENDING clause.

FD VARIABLE-FILE

            RECORD CONTAINS 40 TO 92 CHARACTERS

            BLOCK CONTAINS 933 TO 1024 CHARACTES

            LABEL RECORDS AERA ATANDARDA

            RECORDING MODE IS V

            VALUS OF INDENTIFICATION IS "VARFILE".

01 VARIABLE-RECORD.

            02 ACCOUNT-NUMBER    PIC 9(6).

            02 NAME  PIC  X(20).

            02 NO-OF-PAYAMENTS    PIC 9.

            02 PAYMENTS    OCCURS 1 TO 5 TIMES DEPENDING ON

               NO-OF-PAYMENTS   INDEXED BY TAB-INDEX.

               03 DATE-OF-PAYAMENT   9(6).

               03 AMOUNT-OF-PAYMENT  9(5)V99.

Posted Date: 10/17/2012 8:08:41 AM | Location : United States







Related Discussions:- Record description for the variable-length records, Assignment Help, Ask Question on Record description for the variable-length records, Get Answer, Expert's Help, Record description for the variable-length records Discussions

Write discussion on Record description for the variable-length records
Your posts are moderated
Related Questions
Occurs Clause: Let us establish tables with the help of an illustration. Assume that there are ten different types of income-tax rates that are read from some input medium and

FILE-CONTROL paragraph for the indexed files: The common format for the SELECT clause for a file is as shown below: SELECT  file-name  ASSIGN   TO  implementor -name

WRITE STATEMENT: The records are written to be logical place as determined from the value of the record key. The INVALID KEY condition occurs in the cases shown below: (i)

we have input file ,record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input file


STATEMENTS FOR SEQUENTIAL FILES: A basic operation on a file includes the reading and writing of its records. Whenever the file is sequential, there are three verbs for the

Plus Sign - edit characters for numeric data: + (Plus Sign) : A plus sign is alike to minus sign except that when the item is positive, +sign will be inserted rather th

READ STATEMENTS: The common format for the read statements is as shown bellow. Format 1: READ file-name RECORD [ INTO   identifier ] [  ;  AT   END     imperative-s

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION: We have to write a program to create an Indexed Sequential File in a dynamic mode for Student particulars. Suppose just 3 fields:

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil