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] : ".
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
COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co
PROGRAM FOR SCREEN SECTION: identification division. program- id. environment division. data division. working-storage section. 01 a pic 9(2) value
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:
File- Section &Working-Storage Section: a) FILE SECTION: The FILE SECTION includes the explanation of all data items that must be read from or written onto some external
REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec
PROGRAM FOR PERFORM - THRU: We have to write a program to elaborate PERFORM ...THRU statement Identification division. Program- id. Perfthru. Environment division.
WRITE Statement: The WRITE statement for a relative file has the format which is as shown below. WRITE record-name [ FORM identifier ]
SIGN CONDITION: The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif
Program for Sequential File Creation & Rewriting We have to write a program to create a Length file with just two fields: l (Length) and l-c (Length-Code). Add a few records.
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