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 IF -ELSE:
We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE.
Identification division.
Program- id. IfElse.
Environment division.
Data division.
Working-storage section.
01 n pic 9(3) value 0.
01 q pic 9(3) value 0.
01 r pic 9(3) value 0.
Procedure division.
Para-1.
Display(1 1) erase.
Display( 3 5) " Enter a Number :".
Accept n.
Divide n by 2 giving q remainder r.
If (r = 0)
Display(10 5) " EVEN NUMBER"
else
Display(10 5) " ODD NUMBER".
Stop run.
When using the accept verb in cobol is it possible to assign something other then "SYSIN" for a ddname?
Example of condition names: The illustration below is of the use of the condition names 77 MARITAL-STATUS PIC 9 88 SINGLE VALUE IS ZERO 88 MA
FILE STATUS clause: This clause has been involved in the above syntax for completeness. The ORGANIZATION, REVERSE, ACCESS and STATUS clause can be specified in any order.
Direct Organization: Besides the relative or indexed organization, also a direct access file can be designed to have what is termed as direct organization. In this organizati
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
THE SIMPLE SORT VERB: The process of sequencing the records in some preferred manner is termed as sorting. The Sorting is done upon some key data item in the record. For illus
DIVIDE VERB: The aim of the DIVIDE verb is to divide one number by the other and to store the result. There are few forms of this verb. One of its forms is as shown below:
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
PROGRAM FOR SCREEN SECTION WITH FILES: identification division. program- id. environment division. input-output section. file-control. select
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)
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