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!
Example of If- else statement
Illustration:
IF QUANTITY IS NUMERIC AND QUANTITY IS POSITIVE
MOVE ZERO TO ERROR-CODE. COMPUTE SALES VALUE=QUANTITY*RATE
ELSE MOVE 1 TO ERROR -CODE
MOVE ZERO TO SALES-VALUE
The particular condition tests whether or not the present value of the data name QUANTITY is numeric as well as positive. If the condition is true then ERROR-CODE is set to zero and SALES-VALUE is computed by multiplying the QUANTITY by RATE. On the other hand, when the condition is FALSE, then ERROR CODE is set to 1 and SALES-VALUE is set to zero. In either situation the control goes implicitly to the next statement after this IF sentence. The above sentence is equal to the following flowchart.
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
SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various
We have input file, record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input f
PROGRAMS FOR REDEFINES CLAUSE: We have to write a simple program to explain the REDEFINES clause at 01 level. identification division. program- id. Redef. environment
READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the
Illustration of the abbreviation: A few illustration of the abbreviation are given below: Illustration: The compound condition AMOUNT GREATER THAN 499 AND AMOUNT L
Common form of the READ statements: Format 1 is the common form of the READ statements. Format 2 is used when the access mode is either random or dynamic. For illustration,
MOVE CORRESPONDING: It is frequently required to move some of the data items of one group to some other data items in the other group. If the names of the equivalent data item
ADD VERB: The ADD Verb can be used to find the sum of two or more numbers and to store the sum. The ADD verb takes any one of the two forms as shown below:
single program how may when statement has used
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