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] : ".
Size: The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item. All the 4 general characteristics explained can
LABEL RECORD CLAUSE: This clause specifies whether or not the standard header and trailer labels must be present in the magnetic-tape files. VALUE OF CLAUSE: The VAL
PERFORM STATEMENT: The PERFORM statement can be used to execute the group of consecutive statements written elsewhere in the program. We refer to this group of statements a
Block Size: The normal practice is to group a number of consecutive records to form that is termed as a block or a physical record. The number of records in a block is frequen
Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing. Z * $ - + CR DB . , B O /
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)
calculate simple interest
PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr
INDEXED SEQUENTIAL FILES: In the indexed sequential files which are also known as indexed files, the records are stored in the sequence order generally in ascending order. In
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
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