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 - PROGRAM:
We have to write a program to demonstrate the occurs clause. Get names of the students and show them on the screen.
identification division.
program- id.
environment division.
data division.
working-storage section.
01 n pic 9(2) value 0.
01 i pic 9(2) value 0.
01 name-in.
02 name pic x(20) occurs 20 times.
01 key- in pic x value space.
procedure division.
p-1.
display(1 1) erase.
display(3 5) "Enter How many times".
accept n.
perform get-para n times.
move 0 to i.
perform disp-para n times.
stop run.
get-para.
accept name(i).
add 1 to i.
disp-para.
display name(i).
accept key- in.
SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa
ADD VERB: The ADD Verb can be used to find the sum of two or more numbers and to store the sum. The ADD verb takes any one of the two forms as shown below:
Non numeric: The nonnumeric literal is used in normal to output messages or headings. The Characters which are enclosed between " " constitute nonnumeric literal. The maximum
ON SIZE ERROR OPTION: Whenever a size error occurs, the contents of the result field after the operation is unpredictable. Though, the processing is not-terminated and the co
FILE DESCRIPTION- FIXED-LENGTH RECORDS: The normal characteristics of a file are explained in the file description (FD) entry of the DATA DIVISION.
REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE record-name [ FROM ide
Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi
, (Comma) : A comma, whenever used in a picture, is considered as an insertion character and inserted wherever it become visible. There can be more than one comma in the pictu
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:
Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an
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