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!
CLOSE STATEMENT:
When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is as shown below:
CLOSE file-name-1 [, file-name-2] ...
The file should be open when a close statement can be executed. And once a file is closed, it is no longer accessible to the program. It must be opened again if the file is needed consequently. It may be noted that dissimilar the OPEN statement, the nature of the use of the input & output file must not be mentioned in the CLOSE statement.
Illustration:
CLOSE OLD-MASTER, TRANSACTION, NEW-MASTER, PRINT-FILE.
This statement will close all the 4 files - TRANSACTION, OLD-MASTER, PRINT-FILE and the NEW MASTER.
DATA RECORD CLAUSE: The DATA RECORD clause, documents the record names defined for the file. For illustration, DATA RECORDS ARE REC-1, REC-2, REC-3 that means there are 3diffe
PROGRAM FOR COMPUTE VERB: We have to write an easy program to elaborate the COMPUTE verb. Identification division. Program- id. compverb. Environment division. Da
MERGE VERB WITH OUTPUT PROCEDURE: Like the sort verb, the merge verb can also have an output procedure. The syntax of the MERGE verb is as shown below: The r
ARITHMETIC VERBS: Most of the problems need some computations to be performed on the input or intermediate data that are numeric in nature. The Arithmetic verbs are used to pe
Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il
WRITE Statement: The WRITE statement for a relative file has the format which is as shown below. WRITE record-name [ FORM identifier ]
Example of If- else statement Illustration: IF QUANTITY IS NUMERIC AND QUANTITY IS POSITIVE MOVE ZERO TO ERROR-CODE. COMPUTE SALES VALUE=QUANTITY*RATE
STATEMENTS FOR SEQUENTIAL FILES: A basic operation on a file includes the reading and writing of its records. Whenever the file is sequential, there are three verbs for the
PROGRAM FOR INVENTORY We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil
WRITE statement: The WRITE statement for tape and sequential-disk files has the syntax shown below. WRITE record-name [ FROM identifier ] As a resu
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