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!
PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION (RANDOM MODE):
We have to write a program to create an Indexed Sequential File in random mode for Student particulars. Suppose just 2 fields: rno(Roll Number), name(Name of Student)
identification division.
program- id.
environment division.
input-output section.
file-control.
select stu- file assign to disk
organization is indexed
access mode is random
record key is rno
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 rno pic 9(3).
02 name pic x(20).
working-storage section.
01 fs pic x(2) value spaces.
01 ans pic x value space.
procedure division.
p-1.
open i-o stu-file.
if fs = "30"
open output stu-file
close stu-file
perform g-w-para until ans = "n".
close stu-file.
stop run.
g-w-para.
display(1 1) erase.
display(3 5) "Rno : ".
accept rno.
display(5 5) "Name : ".
accept name.
write stu-rec invalid key display(15 5) "Error!".
display(20 5) "Continue [y/n] : ".
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
Comparison of Nonnumeric Operands: A nonnumeric operand can be compared to the other nonnumeric operand according to the rules as shown below: (i) Fields of Equal Sizes:
WRITE statement: The WRITE statement for tape and sequential-disk files has the syntax shown below. WRITE record-name [ FROM identifier ] As a resu
RULES OF RENAMES CLAUSE: The rules below should be observed while using the RENAMES clause: (i) All RENAMES entries should be written only after the last record descript
PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica
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
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.
Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke
RULES FOR INDEXED TABLES: The rules of indexing a table with an INDEXED phrase are as shown below: (1) If indexing is completed for any one level of a table, then indexing
SIMPLE MERGE VERB: Like sorting, the merging of files is often required in different commercial application. It is likely to merge two or more files with the help of one MERGE
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd