Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
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 these rates are stored in a table named INCOME-TAX-RATE. The DATA DIVISION entries for this table may be as
As shown below:
Clearly, there are ten different data names, like TAX-RATE-1, TAX-RATE-2 etc., in the table namely the INCOME-TAX-RATE and each of these items is of two digits. As the picture of all these items are similar, these can be explained by having just one entry and then specifying that the explanation is to be repeated ten times. This is completed as shown below:
01 INCOME-TAX-RATE
02 TAX-RATE PIC 99 OCCURS 10 TIMES.
This OCCURS clause specifies that the table named INCOME-TAX-RATE is having ten elements and each one is of two digits. In order to refer to an individual element exclusively we should use a subscript. The initial element is referred to as TAX-RATE (1), the second one as TAX-RATE (2), the seventh one as TAX-RATE (7), and so on. TAX-RATE (1), TAX-RATE (2) etc., are termed as subscripted data names and 1, 2 etc., that are enclosed in parentheses and are known as subscripts.
The common format of OCCURS clause is as shown below:
{OC} integer TIMES
{OCCURS}
B (Blank Insertion) : The occurrence of a B anyplace in the picture will insert a space character in the edited data. There can be more than one B in the picture. Examples:
Example of Level numbers - cobol programming: To explain the hierarchical structure introduced above, the concept of the level number is employed in COBOL. The most broad
Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM
OPEN STATEMENT: Whenever a READ or a WRITE operation is executed on a file, then it should be open. The opening of a file may be completed with the help of the OPEN verb. With
Format for COBOL Programs: The COBOL is a high-level language. Therefore, a COBOL program can be executed on a computer for which a COBOL compiler exists. The compiler transla
How do i write a simple cobol programming that works
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
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
SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various
Object-Computer - Configuration section: The computer name specifies a specific computer on which the object program is to be executed. The MEMORY SIZE is used to show the
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd